Sha256: d20cdd62e8ade53bbf8cade3964f82c762a6001b20bfcb5892dcaba98e5edaaa
Contents?: true
Size: 1.14 KB
Versions: 14
Compression:
Stored size: 1.14 KB
Contents
# frozen_string_literal: true module FriendlyShipping module Services class UpsFreight class GeneratePickupRequestHash class << self def call(pickup_request_options:) return unless pickup_request_options { AdditionalComments: pickup_request_options.comments, Requester: { ThirdPartyRequester: pickup_request_options.third_party_requester ? '' : nil, AttentionName: pickup_request_options.requester.name, EMailAddress: pickup_request_options.requester_email, Name: pickup_request_options.requester.company_name, Phone: { Number: pickup_request_options.requester.phone }.compact }.compact, PickupDate: pickup_request_options.pickup_time_window.begin.strftime('%Y%m%d'), EarliestTimeReady: pickup_request_options.pickup_time_window.begin.strftime('%H%M'), LatestTimeReady: pickup_request_options.pickup_time_window.end.strftime('%H%M'), }.compact end end end end end end
Version data entries
14 entries across 14 versions & 1 rubygems