Class: FriendlyShipping::Services::UpsJson::GenerateCityStateLookupPayload

Inherits:
Object
  • Object
show all
Defined in:
lib/friendly_shipping/services/ups_json/generate_city_state_lookup_payload.rb

Class Method Summary collapse

Class Method Details

.call(location:) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/friendly_shipping/services/ups_json/generate_city_state_lookup_payload.rb', line 7

def self.call(location:)
  {
    XAVRequest: {
      RegionalRequestIndicator: "1",
      AddressKeyFormat: [
        {
          PostcodePrimaryLow: location.zip,
          CountryCode: location.country.code
        }
      ]
    }
  }
end