Class: Peddler::APIs::ShippingV2

Inherits:
Peddler::API show all
Defined in:
lib/peddler/apis/shipping_v2.rb,
lib/peddler/apis/shipping_v2/item.rb,
lib/peddler/apis/shipping_v2/rate.rb,
lib/peddler/apis/shipping_v2/error.rb,
lib/peddler/apis/shipping_v2/event.rb,
lib/peddler/apis/shipping_v2/weight.rb,
lib/peddler/apis/shipping_v2/address.rb,
lib/peddler/apis/shipping_v2/carrier.rb,
lib/peddler/apis/shipping_v2/geocode.rb,
lib/peddler/apis/shipping_v2/package.rb,
lib/peddler/apis/shipping_v2/promise.rb,
lib/peddler/apis/shipping_v2/service.rb,
lib/peddler/apis/shipping_v2/benefits.rb,
lib/peddler/apis/shipping_v2/location.rb,
lib/peddler/apis/shipping_v2/item_list.rb,
lib/peddler/apis/shipping_v2/rate_item.rb,
lib/peddler/apis/shipping_v2/rate_list.rb,
lib/peddler/apis/shipping_v2/date_range.rb,
lib/peddler/apis/shipping_v2/dimensions.rb,
lib/peddler/apis/shipping_v2/error_list.rb,
lib/peddler/apis/shipping_v2/tax_detail.rb,
lib/peddler/apis/shipping_v2/charge_list.rb,
lib/peddler/apis/shipping_v2/goods_owner.rb,
lib/peddler/apis/shipping_v2/service_ids.rb,
lib/peddler/apis/shipping_v2/time_of_day.rb,
lib/peddler/apis/shipping_v2/time_window.rb,
lib/peddler/apis/shipping_v2/access_point.rb,
lib/peddler/apis/shipping_v2/package_list.rb,
lib/peddler/apis/shipping_v2/print_option.rb,
lib/peddler/apis/shipping_v2/document_size.rb,
lib/peddler/apis/shipping_v2/liquid_volume.rb,
lib/peddler/apis/shipping_v2/active_account.rb,
lib/peddler/apis/shipping_v2/rate_item_list.rb,
lib/peddler/apis/shipping_v2/active_accounts.rb,
lib/peddler/apis/shipping_v2/carrier_account.rb,
lib/peddler/apis/shipping_v2/channel_details.rb,
lib/peddler/apis/shipping_v2/ineligible_rate.rb,
lib/peddler/apis/shipping_v2/invoice_details.rb,
lib/peddler/apis/shipping_v2/operating_hours.rb,
lib/peddler/apis/shipping_v2/tax_detail_list.rb,
lib/peddler/apis/shipping_v2/carrier_accounts.rb,
lib/peddler/apis/shipping_v2/charge_component.rb,
lib/peddler/apis/shipping_v2/excluded_benefit.rb,
lib/peddler/apis/shipping_v2/get_rates_result.rb,
lib/peddler/apis/shipping_v2/linkable_carrier.rb,
lib/peddler/apis/shipping_v2/ndr_request_data.rb,
lib/peddler/apis/shipping_v2/package_document.rb,
lib/peddler/apis/shipping_v2/tracking_summary.rb,
lib/peddler/apis/shipping_v2/access_point_list.rb,
lib/peddler/apis/shipping_v2/claim_proof_ur_ls.rb,
lib/peddler/apis/shipping_v2/excluded_benefits.rb,
lib/peddler/apis/shipping_v2/get_rates_request.rb,
lib/peddler/apis/shipping_v2/included_benefits.rb,
lib/peddler/apis/shipping_v2/print_option_list.rb,
lib/peddler/apis/shipping_v2/service_selection.rb,
lib/peddler/apis/shipping_v2/get_rates_response.rb,
lib/peddler/apis/shipping_v2/request_attributes.rb,
lib/peddler/apis/shipping_v2/collect_on_delivery.rb,
lib/peddler/apis/shipping_v2/get_tracking_result.rb,
lib/peddler/apis/shipping_v2/shipper_instruction.rb,
lib/peddler/apis/shipping_v2/validation_metadata.rb,
lib/peddler/apis/shipping_v2/value_added_service.rb,
lib/peddler/apis/shipping_v2/access_point_details.rb,
lib/peddler/apis/shipping_v2/amazon_order_details.rb,
lib/peddler/apis/shipping_v2/create_claim_request.rb,
lib/peddler/apis/shipping_v2/ineligibility_reason.rb,
lib/peddler/apis/shipping_v2/ineligible_rate_list.rb,
lib/peddler/apis/shipping_v2/carrier_account_input.rb,
lib/peddler/apis/shipping_v2/create_claim_response.rb,
lib/peddler/apis/shipping_v2/get_tracking_response.rb,
lib/peddler/apis/shipping_v2/linkable_account_type.rb,
lib/peddler/apis/shipping_v2/package_document_list.rb,
lib/peddler/apis/shipping_v2/tracking_detail_codes.rb,
lib/peddler/apis/shipping_v2/direct_purchase_result.rb,
lib/peddler/apis/shipping_v2/linkable_carriers_list.rb,
lib/peddler/apis/shipping_v2/amazon_shipment_details.rb,
lib/peddler/apis/shipping_v2/client_reference_detail.rb,
lib/peddler/apis/shipping_v2/dangerous_goods_details.rb,
lib/peddler/apis/shipping_v2/direct_purchase_request.rb,
lib/peddler/apis/shipping_v2/package_document_detail.rb,
lib/peddler/apis/shipping_v2/accessibility_attributes.rb,
lib/peddler/apis/shipping_v2/cancel_shipment_response.rb,
lib/peddler/apis/shipping_v2/client_reference_details.rb,
lib/peddler/apis/shipping_v2/direct_purchase_response.rb,
lib/peddler/apis/shipping_v2/get_access_points_result.rb,
lib/peddler/apis/shipping_v2/purchase_shipment_result.rb,
lib/peddler/apis/shipping_v2/validation_metadata_list.rb,
lib/peddler/apis/shipping_v2/carrier_account_attribute.rb,
lib/peddler/apis/shipping_v2/collections_form_document.rb,
lib/peddler/apis/shipping_v2/exception_operating_hours.rb,
lib/peddler/apis/shipping_v2/one_click_shipment_result.rb,
lib/peddler/apis/shipping_v2/purchase_shipment_request.rb,
lib/peddler/apis/shipping_v2/supported_document_detail.rb,
lib/peddler/apis/shipping_v2/carrier_account_attributes.rb,
lib/peddler/apis/shipping_v2/get_access_points_response.rb,
lib/peddler/apis/shipping_v2/linkable_account_type_list.rb,
lib/peddler/apis/shipping_v2/one_click_shipment_request.rb,
lib/peddler/apis/shipping_v2/purchase_shipment_response.rb,
lib/peddler/apis/shipping_v2/carrier_account_inputs_list.rb,
lib/peddler/apis/shipping_v2/one_click_shipment_response.rb,
lib/peddler/apis/shipping_v2/submit_ndr_feedback_request.rb,
lib/peddler/apis/shipping_v2/value_added_service_details.rb,
lib/peddler/apis/shipping_v2/get_carrier_accounts_request.rb,
lib/peddler/apis/shipping_v2/get_collection_form_response.rb,
lib/peddler/apis/shipping_v2/link_carrier_account_request.rb,
lib/peddler/apis/shipping_v2/package_document_detail_list.rb,
lib/peddler/apis/shipping_v2/excluded_benefit_reason_codes.rb,
lib/peddler/apis/shipping_v2/get_carrier_accounts_response.rb,
lib/peddler/apis/shipping_v2/get_shipment_documents_result.rb,
lib/peddler/apis/shipping_v2/link_carrier_account_response.rb,
lib/peddler/apis/shipping_v2/requested_label_customization.rb,
lib/peddler/apis/shipping_v2/requested_value_added_service.rb,
lib/peddler/apis/shipping_v2/get_additional_inputs_response.rb,
lib/peddler/apis/shipping_v2/unlink_carrier_account_request.rb,
lib/peddler/apis/shipping_v2/unmanifested_shipment_location.rb,
lib/peddler/apis/shipping_v2/collection_forms_history_record.rb,
lib/peddler/apis/shipping_v2/get_shipment_documents_response.rb,
lib/peddler/apis/shipping_v2/unlink_carrier_account_response.rb,
lib/peddler/apis/shipping_v2/generate_collection_form_request.rb,
lib/peddler/apis/shipping_v2/requested_document_specification.rb,
lib/peddler/apis/shipping_v2/supported_document_specification.rb,
lib/peddler/apis/shipping_v2/unmanifested_carrier_information.rb,
lib/peddler/apis/shipping_v2/generate_collection_form_response.rb,
lib/peddler/apis/shipping_v2/get_unmanifested_shipments_request.rb,
lib/peddler/apis/shipping_v2/requested_value_added_service_list.rb,
lib/peddler/apis/shipping_v2/available_value_added_service_group.rb,
lib/peddler/apis/shipping_v2/direct_fulfillment_item_identifiers.rb,
lib/peddler/apis/shipping_v2/get_collection_form_history_request.rb,
lib/peddler/apis/shipping_v2/get_unmanifested_shipments_response.rb,
lib/peddler/apis/shipping_v2/unmanifested_shipment_location_list.rb,
lib/peddler/apis/shipping_v2/collection_forms_history_record_list.rb,
lib/peddler/apis/shipping_v2/get_collection_form_history_response.rb,
lib/peddler/apis/shipping_v2/supported_document_specification_list.rb,
lib/peddler/apis/shipping_v2/unmanifested_carrier_information_list.rb,
lib/peddler/apis/shipping_v2/one_click_shipment_value_added_service.rb,
lib/peddler/apis/shipping_v2/available_value_added_service_group_list.rb,
lib/peddler/apis/shipping_v2/get_carrier_account_form_inputs_response.rb,
lib/peddler/apis/shipping_v2/one_click_shipment_value_added_service_details.rb

Overview

Amazon Shipping API

The Amazon Shipping API is designed to support outbound shipping use cases both for orders originating on Amazon-owned marketplaces as well as external channels/marketplaces. With these APIs, you can request shipping rates, create shipments, cancel shipments, and track shipments.

Defined Under Namespace

Classes: AccessPointList, ActiveAccounts, AvailableValueAddedServiceGroupList, CarrierAccountAttributes, CarrierAccountInputsList, CarrierAccounts, ChargeList, ClaimProofURLs, ClientReferenceDetails, CollectionFormsHistoryRecordList, ExcludedBenefitReasonCodes, ExcludedBenefits, IncludedBenefits, IneligibleRateList, ItemList, LinkableAccountTypeList, LinkableCarriersList, OneClickShipmentValueAddedServiceDetails, PackageDocumentDetailList, PackageDocumentList, PackageList, PrintOptionList, RateItemList, RateList, RequestAttributes, RequestedValueAddedServiceList, ServiceIds, SupportedDocumentSpecificationList, TaxDetailList, UnmanifestedCarrierInformationList, UnmanifestedShipmentLocationList, ValidationMetadataList

Constant Summary collapse

Item =

An item in a package.

Structure.new do
  # @return [Integer] The number of units. This value is required.
  attribute(:quantity, Integer)

  # @return [DangerousGoodsDetails]
  attribute?(:dangerous_goods_details, DangerousGoodsDetails, from: "dangerousGoodsDetails")

  # @return [String] The product description of the item.
  attribute?(:description, String)

  # @return [DirectFulfillmentItemIdentifiers]
  attribute?(:direct_fulfillment_item_identifiers, DirectFulfillmentItemIdentifiers, from: "directFulfillmentItemIdentifiers")

  # @return [InvoiceDetails]
  attribute?(:invoice_details, InvoiceDetails, from: "invoiceDetails")

  # @return [:boolean] When true, the item qualifies as hazardous materials (hazmat). Defaults to false.
  attribute?(:hazmat, :boolean, from: "isHazmat")

  # @return [String] A unique identifier for an item provided by the client.
  attribute?(:item_identifier, String, from: "itemIdentifier")

  # @return [Money]
  attribute?(:item_value, Money, from: "itemValue")

  # @return [LiquidVolume]
  attribute?(:liquid_volume, LiquidVolume, from: "liquidVolume")

  # @return [String] The product type of the item.
  attribute?(:product_type, String, from: "productType")

  # @return [Array<String>] A list of unique serial numbers in an Amazon package that can be used to guarantee
  # non-fraudulent items. The number of serial numbers in the list must be less than or equal to the quantity of
  # items being shipped. Only applicable when channel source is Amazon.
  attribute?(:serial_numbers, [String], from: "serialNumbers")

  # @return [Weight]
  attribute?(:weight, Weight)
end
Rate =

The details of a shipping service offering.

Structure.new do
  # @return [String]
  attribute(:carrier_id, String, from: "carrierId")

  # @return [String]
  attribute(:carrier_name, String, from: "carrierName")

  # @return [Promise]
  attribute(:promise, Promise)

  # @return [String]
  attribute(:rate_id, String, from: "rateId")

  # @return [:boolean] When true, indicates that additional inputs are required to purchase this shipment service.
  # You must then call the getAdditionalInputs operation to return the JSON schema to use when providing the
  # additional inputs to the purchaseShipment operation.
  attribute(:requires_additional_inputs, :boolean, from: "requiresAdditionalInputs")

  # @return [String]
  attribute(:service_id, String, from: "serviceId")

  # @return [String]
  attribute(:service_name, String, from: "serviceName")

  # @return [Array<SupportedDocumentSpecification>]
  attribute(:supported_document_specifications, [SupportedDocumentSpecification], from: "supportedDocumentSpecifications")

  # @return [Money]
  attribute(:total_charge, Money, from: "totalCharge")

  # @return [Array<AvailableValueAddedServiceGroup>]
  attribute?(:available_value_added_service_groups, [AvailableValueAddedServiceGroup], from: "availableValueAddedServiceGroups")

  # @return [Benefits]
  attribute?(:benefits, Benefits)

  # @return [Weight]
  attribute?(:billed_weight, Weight, from: "billedWeight")

  # @return [String]
  attribute?(:payment_type, String, from: "paymentType")

  # @return [Array<RateItem>]
  attribute?(:rate_item_list, [RateItem], from: "rateItemList")
end
Error =

Error response returned when the request is unsuccessful.

Structure.new do
  # @return [String] An error code that identifies the type of error that occurred.
  attribute(:code, String)

  # @return [String] A message that describes the error condition.
  attribute(:message, String)

  # @return [String] Additional details that can help the caller understand or fix the issue.
  attribute?(:details, String)
end
Event =

A tracking event.

Structure.new do
  # @return [String]
  attribute(:event_code, String, from: "eventCode")

  # @return [Time] The ISO 8601 formatted timestamp of the event.
  attribute(:event_time, Time, from: "eventTime")

  # @return [Location]
  attribute?(:location, Location)

  # @return [String]
  attribute?(:shipment_type, String, from: "shipmentType")
end
Weight =

The weight in the units indicated.

Structure.new do
  # @return [String] The unit of measurement.
  attribute(:unit, String)

  # @return [Float] The measurement value.
  attribute(:value, Float)
end
Address =

The address.

Structure.new do
  # @return [String] The first line of the address.
  attribute(:address_line1, String, from: "addressLine1")

  # @return [String]
  attribute(:city, String)

  # @return [String]
  attribute(:country_code, String, from: "countryCode")

  # @return [String] The name of the person, business or institution at the address.
  attribute(:name, String)

  # @return [String]
  attribute(:postal_code, String, from: "postalCode")

  # @return [String]
  attribute(:state_or_region, String, from: "stateOrRegion")

  # @return [String] Additional address information, if required.
  attribute?(:address_line2, String, from: "addressLine2")

  # @return [String] Additional address information, if required.
  attribute?(:address_line3, String, from: "addressLine3")

  # @return [String] The name of the business or institution associated with the address.
  attribute?(:company_name, String, from: "companyName")

  # @return [String] The email address of the contact associated with the address.
  attribute?(:email, String)

  # @return [Geocode]
  attribute?(:geocode, Geocode)

  # @return [String] The phone number of the person, business or institution located at that address, including
  # the country calling code.
  attribute?(:phone_number, String, from: "phoneNumber")
end
Carrier =

Carrier Related Info

Structure.new do
  # @return [String]
  attribute(:id, String)

  # @return [String]
  attribute(:name, String)
end
Geocode =

Defines the latitude and longitude of the access point.

Structure.new do
  # @return [String] The latitude of access point.
  attribute?(:latitude, String)

  # @return [String] The longitude of access point.
  attribute?(:longitude, String)
end
Package =

A package to be shipped through a shipping service offering.

Structure.new do
  # @return [Dimensions]
  attribute(:dimensions, Dimensions)

  # @return [Money]
  attribute(:insured_value, Money, from: "insuredValue")

  # @return [Array<Item>]
  attribute(:items, [Item])

  # @return [String]
  attribute(:package_client_reference_id, String, from: "packageClientReferenceId")

  # @return [Weight]
  attribute(:weight, Weight)

  # @return [Array<ChargeComponent>]
  attribute?(:charges, [ChargeComponent])

  # @return [:boolean] When true, the package contains hazardous materials. Defaults to false.
  attribute?(:hazmat, :boolean, from: "isHazmat")

  # @return [String] The seller name displayed on the label.
  attribute?(:seller_display_name, String, from: "sellerDisplayName")
end
Promise =

The time windows promised for pickup and delivery events.

Structure.new do
  # @return [TimeWindow]
  attribute?(:delivery_window, TimeWindow, from: "deliveryWindow")

  # @return [TimeWindow]
  attribute?(:pickup_window, TimeWindow, from: "pickupWindow")
end
Service =

Service Related Info

Structure.new do
  # @return [String]
  attribute(:id, String)

  # @return [String]
  attribute(:name, String)
end
Benefits =

Benefits that are included and excluded for each shipping offer. Benefits represents services provided by Amazon (eg. CLAIMS_PROTECTED, etc.) when sellers purchase shipping through Amazon. Benefit details will be made available for any shipment placed on or after January 1st 2024 00:00 UTC.

Structure.new do
  # @return [Array<ExcludedBenefit>]
  attribute(:excluded_benefits, [ExcludedBenefit], from: "excludedBenefits")

  # @return [Array<String>]
  attribute(:included_benefits, [String], from: "includedBenefits")
end
Location =

The location where the person, business or institution is located.

Structure.new do
  # @return [String]
  attribute?(:city, String)

  # @return [String]
  attribute?(:country_code, String, from: "countryCode")

  # @return [String]
  attribute?(:postal_code, String, from: "postalCode")

  # @return [String]
  attribute?(:state_or_region, String, from: "stateOrRegion")
end
RateItem =

Rate Item for shipping (base cost, transaction fee, confirmation, insurance, etc.) Data source definition:

Structure.new do
  # @return [Money]
  attribute?(:rate_item_charge, Money, from: "rateItemCharge")

  # @return [String]
  attribute?(:rate_item_id, String, from: "rateItemID")

  # @return [String] Used for the localization.
  attribute?(:rate_item_name_localization, String, from: "rateItemNameLocalization")

  # @return [String]
  attribute?(:rate_item_type, String, from: "rateItemType")
end
DateRange =

Date Range for query the results.

Structure.new do
  # @return [Time] end date for query.
  attribute?(:end_date, Time, from: "endDate")

  # @return [Time] Start Date for query .
  attribute?(:start_date, Time, from: "startDate")
end
Dimensions =

A set of measurements for a three-dimensional object.

Structure.new do
  # @return [Float] The height of the package.
  attribute(:height, Float)

  # @return [Float] The length of the package.
  attribute(:length, Float)

  # @return [String] The unit of measurement.
  attribute(:unit, String)

  # @return [Float] The width of the package.
  attribute(:width, Float)
end
ErrorList =

A list of error responses returned when a request is unsuccessful.

Structure.new do
  # @return [Array<Error>] Array of Errors
  attribute(:errors, [Error])
end
TaxDetail =

Indicates the tax specifications associated with the shipment for customs compliance purposes in certain regions.

Structure.new do
  # @return [String] The shipper's tax registration number associated with the shipment for customs compliance
  # purposes in certain regions.
  attribute(:tax_registration_number, String, from: "taxRegistrationNumber")

  # @return [String]
  attribute(:tax_type, String, from: "taxType")
end
GoodsOwner =

The seller owning the goods before handing them over to the carrier

Structure.new do
  # @return [String] The Amazon Merchant Identifier (merchantId) of the seller owning the goods before handing
  # them over to the carrier
  attribute(:merchant_id, String, from: "merchantId")
end
TimeOfDay =

Denotes time of the day, used for defining opening or closing time of access points

Structure.new do
  # @return [Integer] Denotes hour of the day, used for defining opening or closing time of access points
  attribute?(:hour_of_day, Integer, from: "hourOfDay")

  # @return [Integer] Denotes minute of the hour, used for defining opening or closing time of access points
  attribute?(:minute_of_hour, Integer, from: "minuteOfHour")

  # @return [Integer] Denotes second of the minute, used for defining opening or closing time of access points
  attribute?(:second_of_minute, Integer, from: "secondOfMinute")
end
TimeWindow =

The start and end time that specifies the time interval of an event.

Structure.new do
  # @return [Time] The end time of the time window.
  attribute?(:end, Time)

  # @return [Time] The start time of the time window.
  attribute?(:start, Time)
end
AccessPoint =

Access point details

Structure.new do
  # @return [String]
  attribute?(:access_point_id, String, from: "accessPointId")

  # @return [AccessibilityAttributes]
  attribute?(:accessibility_attributes, AccessibilityAttributes, from: "accessibilityAttributes")

  # @return [Address]
  attribute?(:address, Address)

  # @return [String] Assistance type enum for Access point i.e. STAFF_ASSISTED or SELF_ASSISTED
  attribute?(:assistance_type, String, from: "assistanceType")

  # @return [Array<ExceptionOperatingHours>] Exception operating hours for Access Point
  attribute?(:exception_operating_hours, [ExceptionOperatingHours], from: "exceptionOperatingHours")

  # @return [String] Name of entity (store/hub etc) where this access point is located
  attribute?(:name, String)

  # @return [String] The score of access point, based on proximity to postal code and sorting preference. This can
  # be used to sort access point results on shipper's end.
  attribute?(:score, String)

  # @return [Hash]
  attribute?(:standard_operating_hours, Hash, from: "standardOperatingHours")

  # @return [String] Timezone of access point
  attribute?(:timezone, String)

  # @return [String]
  attribute?(:type, String)
end
PrintOption =

The format options available for a label.

Structure.new do
  # @return [Array<SupportedDocumentDetail>] A list of the supported documented details.
  attribute(:supported_document_details, [SupportedDocumentDetail], from: "supportedDocumentDetails")

  # @return [Array<NeedFileJoining>] A list of the supported needFileJoining boolean values for a document.
  attribute(:supported_file_joining_options, Array, from: "supportedFileJoiningOptions")

  # @return [Array<PageLayout>] A list of the supported page layout options for a document.
  attribute(:supported_page_layouts, Array, from: "supportedPageLayouts")

  # @return [Array<Dpi>] A list of the supported DPI options for a document.
  attribute?(:supported_dp_is, Array, from: "supportedDPIs")
end
DocumentSize =

The size dimensions of the label.

Structure.new do
  # @return [Float] The length of the document measured in the units specified.
  attribute(:length, Float)

  # @return [String] The unit of measurement.
  attribute(:unit, String)

  # @return [Float] The width of the document measured in the units specified.
  attribute(:width, Float)
end
LiquidVolume =

Liquid Volume.

Structure.new do
  # @return [String] The unit of measurement.
  attribute(:unit, String)

  # @return [Float] The measurement value.
  attribute(:value, Float)
end
ActiveAccount =

Active Account Details

Structure.new do
  # @return [String]
  attribute?(:account_id, String, from: "accountId")

  # @return [String]
  attribute?(:carrier_id, String, from: "carrierId")
end
CarrierAccount =

Carrier Account details used to fetch rates.

Structure.new do
  # @return [String]
  attribute(:carrier_account_id, String, from: "carrierAccountId")

  # @return [String]
  attribute(:carrier_id, String, from: "carrierId")
end
ChannelDetails =

Shipment source channel related information.

Structure.new do
  # @return [String]
  attribute(:channel_type, String, from: "channelType")

  # @return [AmazonOrderDetails]
  attribute?(:amazon_order_details, AmazonOrderDetails, from: "amazonOrderDetails")

  # @return [AmazonShipmentDetails]
  attribute?(:amazon_shipment_details, AmazonShipmentDetails, from: "amazonShipmentDetails")
end
IneligibleRate =

Detailed information for an ineligible shipping service offering.

Structure.new do
  # @return [String]
  attribute(:carrier_id, String, from: "carrierId")

  # @return [String]
  attribute(:carrier_name, String, from: "carrierName")

  # @return [Array<IneligibilityReason>] A list of reasons why a shipping service offering is ineligible.
  attribute(:ineligibility_reasons, [IneligibilityReason], from: "ineligibilityReasons")

  # @return [String]
  attribute(:service_id, String, from: "serviceId")

  # @return [String]
  attribute(:service_name, String, from: "serviceName")
end
InvoiceDetails =

The invoice details for charges associated with the goods in the package. Only applies to certain regions.

Structure.new do
  # @return [Time] The invoice date of the item in ISO 8061 format.
  attribute?(:invoice_date, Time, from: "invoiceDate")

  # @return [String] The invoice number of the item.
  attribute?(:invoice_number, String, from: "invoiceNumber")
end
OperatingHours =

The hours in which the access point shall remain operational

Structure.new do
  # @return [TimeOfDay]
  attribute?(:closing_time, TimeOfDay, from: "closingTime")

  # @return [Array<TimeOfDay>] midDayClosures operating hours array
  attribute?(:mid_day_closures, [TimeOfDay], from: "midDayClosures")

  # @return [TimeOfDay]
  attribute?(:opening_time, TimeOfDay, from: "openingTime")
end
ChargeComponent =

The type and amount of a charge applied on a package.

Structure.new do
  # @return [Money]
  attribute?(:amount, Money)

  # @return [String] The type of charge.
  attribute?(:charge_type, String, from: "chargeType")
end
ExcludedBenefit =

Object representing a benefit that is excluded for a shipping offer or rate.

Structure.new do
  # @return [String] benefit
  attribute(:benefit, String)

  # @return [Array<String>]
  attribute?(:reason_codes, [String], from: "reasonCodes")
end
GetRatesResult =

The payload for the getRates operation.

Structure.new do
  # @return [Array<Rate>]
  attribute(:rates, [Rate])

  # @return [String]
  attribute(:request_token, String, from: "requestToken")

  # @return [Array<IneligibleRate>]
  attribute?(:ineligible_rates, [IneligibleRate], from: "ineligibleRates")
end
LinkableCarrier =

Info About Linkable Carrier

Structure.new do
  # @return [String]
  attribute?(:carrier_id, String, from: "carrierId")

  # @return [Array<LinkableAccountType>]
  attribute?(:linkable_account_types, [LinkableAccountType], from: "linkableAccountTypes")
end
NdrRequestData =

Additional information required for the NDR action that has been filed. If the NDR Action is RESCHEDULE, rescheduleDate is a required field. Otherwise, if the NDR Action is REATTEMPT, additionalAddressNotes is a required field.

Structure.new do
  # @return [String]
  attribute?(:additional_address_notes, String, from: "additionalAddressNotes")

  # @return [Time] The date on which the Seller wants to reschedule shipment delivery, in ISO-8601 date/time
  # format
  attribute?(:reschedule_date, Time, from: "rescheduleDate")
end
PackageDocument =

A document related to a package.

Structure.new do
  # @return [String]
  attribute(:contents, String)

  # @return [String]
  attribute(:format, String)

  # @return [String]
  attribute(:type, String)
end
TrackingSummary =

A package status summary.

Structure.new do
  # @return [String]
  attribute?(:status, String)

  # @return [TrackingDetailCodes]
  attribute?(:tracking_detail_codes, TrackingDetailCodes, from: "trackingDetailCodes")
end
GetRatesRequest =

The request schema for the getRates operation. When the channelType is Amazon, the shipTo address is not required and will be ignored.

Structure.new do
  # @return [ChannelDetails]
  attribute(:channel_details, ChannelDetails, from: "channelDetails")

  # @return [Array<Package>]
  attribute(:packages, [Package])

  # @return [Address] The ship from address.
  attribute(:ship_from, Address, from: "shipFrom")

  # @return [Array<CarrierAccount>]
  attribute?(:carrier_accounts, [CarrierAccount], from: "carrierAccounts")

  # @return [Array<ClientReferenceDetail>]
  attribute?(:client_reference_details, [ClientReferenceDetail], from: "clientReferenceDetails")

  # @return [AccessPointDetails]
  attribute?(:destination_access_point_details, AccessPointDetails, from: "destinationAccessPointDetails")

  # @return [Address] The return to address.
  attribute?(:return_to, Address, from: "returnTo")

  # @return [Time] The ship date and time (the requested pickup). This defaults to the current date and time.
  attribute?(:ship_date, Time, from: "shipDate")

  # @return [Address] The ship to address.
  attribute?(:ship_to, Address, from: "shipTo")

  # @return [String]
  attribute?(:shipment_type, String, from: "shipmentType")

  # @return [ShipperInstruction] This field describe shipper instruction.
  attribute?(:shipper_instruction, ShipperInstruction, from: "shipperInstruction")

  # @return [Array<TaxDetail>]
  attribute?(:tax_details, [TaxDetail], from: "taxDetails")

  # @return [ValueAddedServiceDetails]
  attribute?(:value_added_services, ValueAddedServiceDetails, from: "valueAddedServices")
end
ServiceSelection =

Service Selection Criteria.

Structure.new do
  # @return [Array<String>]
  attribute(:service_id, [String], from: "serviceId")
end
GetRatesResponse =

The response schema for the getRates operation.

Structure.new do
  # @return [GetRatesResult]
  attribute?(:payload, GetRatesResult)
end
CollectOnDelivery =

The amount to collect on delivery.

Structure.new do
  # @return [Money]
  attribute(:amount, Money)
end
GetTrackingResult =

The payload for the getTracking operation.

Structure.new do
  # @return [String]
  attribute(:alternate_leg_tracking_id, String, from: "alternateLegTrackingId")

  # @return [Array<Event>] A list of tracking events.
  attribute(:event_history, [Event], from: "eventHistory")

  # @return [Time] The date and time by which the shipment is promised to be delivered.
  attribute(:promised_delivery_date, Time, from: "promisedDeliveryDate")

  # @return [TrackingSummary]
  attribute(:summary, TrackingSummary)

  # @return [String]
  attribute(:tracking_id, String, from: "trackingId")
end
ShipperInstruction =

The shipper instruction.

Structure.new do
  # @return [String] The delivery notes for the shipment
  attribute?(:delivery_notes, String, from: "deliveryNotes")
end
ValidationMetadata =

ValidationMetadata Details

Structure.new do
  # @return [String] errorMessage for the error.
  attribute?(:error_message, String, from: "errorMessage")

  # @return [String] validationStrategy for the error.
  attribute?(:validation_strategy, String, from: "validationStrategy")

  # @return [String] Value.
  attribute?(:value, String)
end
ValueAddedService =

A value-added service available for purchase with a shipment service offering.

Structure.new do
  # @return [Money] The cost of the value-added service.
  attribute(:cost, Money)

  # @return [String] The identifier for the value-added service.
  attribute(:id, String)

  # @return [String] The name of the value-added service.
  attribute(:name, String)
end
AccessPointDetails =

AccessPointDetails object

Structure.new do
  # @return [String]
  attribute?(:access_point_id, String, from: "accessPointId")
end
AmazonOrderDetails =

Amazon order information. This is required if the shipment source channel is Amazon.

Structure.new do
  # @return [String] The Amazon order ID associated with the Amazon order fulfilled by this shipment.
  attribute(:order_id, String, from: "orderId")
end
CreateClaimRequest =

The request schema for the CreateClaim operation

Structure.new do
  # @return [String]
  attribute(:claim_reason, String, from: "claimReason")

  # @return [String]
  attribute(:settlement_type, String, from: "settlementType")

  # @return [String]
  attribute(:tracking_id, String, from: "trackingId")

  # @return [Money] This is required for off-Amazon shipments to determine value of shipments
  attribute?(:declared_value, Money, from: "declaredValue")

  # @return [:boolean] Applicable for only On Amazon shipments to identify if replacement was sent
  attribute?(:replacement_package_sent, :boolean, from: "isReplacementPackageSent")

  # @return [Array<String>]
  attribute?(:proofs, [String])
end
IneligibilityReason =

The reason why a shipping service offering is ineligible.

Structure.new do
  # @return [String]
  attribute(:code, String)

  # @return [String] The ineligibility reason.
  attribute(:message, String)
end
CarrierAccountInput =

Info About CarrierAccountInput

Structure.new do
  # @return [String] descriptionLocalizationKey value .
  attribute?(:description_localization_key, String, from: "descriptionLocalizationKey")

  # @return [String] groupName value .
  attribute?(:group_name, String, from: "groupName")

  # @return [String]
  attribute?(:input_type, String, from: "inputType")

  # @return [:boolean] is value is Confidential .
  attribute?(:confidential, :boolean, from: "isConfidential")

  # @return [:boolean] is value is hidden .
  attribute?(:hidden, :boolean, from: "isHidden")

  # @return [:boolean] mandatory or not value .
  attribute?(:mandatory, :boolean, from: "isMandatory")

  # @return [String] name value .
  attribute?(:name, String)

  # @return [Array<ValidationMetadata>]
  attribute?(:validation_metadata, [ValidationMetadata], from: "validationMetadata")
end
CreateClaimResponse =

The response schema for the createClaim operation.

Structure.new do
  # @return [String]
  attribute?(:claim_id, String, from: "claimId")
end
GetTrackingResponse =

The response schema for the getTracking operation.

Structure.new do
  # @return [GetTrackingResult]
  attribute?(:payload, GetTrackingResult)
end
LinkableAccountType =

Info About Linkable Account Type

Structure.new do
  # @return [String]
  attribute?(:account_type, String, from: "accountType")

  # @return [Array<CarrierAccountInput>]
  attribute?(:carrier_account_inputs, [CarrierAccountInput], from: "carrierAccountInputs")
end
TrackingDetailCodes =

Contains detail codes that provide additional details related to the forward and return leg of the shipment.

Structure.new do
  # @return [Array<DetailCodes>] Contains detail codes that provide additional details related to the forward leg
  # of the shipment.
  attribute(:forward, Array)

  # @return [Array<DetailCodes>] Contains detail codes that provide additional details related to the return leg
  # of the shipment.
  attribute(:returns, Array)
end
DirectPurchaseResult =

The payload for the directPurchaseShipment operation.

Structure.new do
  # @return [String]
  attribute(:shipment_id, String, from: "shipmentId")

  # @return [Array<PackageDocumentDetail>]
  attribute?(:package_document_detail_list, [PackageDocumentDetail], from: "packageDocumentDetailList")
end
AmazonShipmentDetails =

Amazon shipment information.

Structure.new do
  # @return [String] This attribute is required only for a Direct Fulfillment shipment. This is the encrypted
  # shipment ID.
  attribute(:shipment_id, String, from: "shipmentId")
end
ClientReferenceDetail =

Client Reference Details

Structure.new do
  # @return [String] The Client Reference Id.
  attribute(:client_reference_id, String, from: "clientReferenceId")

  # @return [String] Client Reference type.
  attribute(:client_reference_type, String, from: "clientReferenceType")
end
DangerousGoodsDetails =

Details related to any dangerous goods/items that are being shipped.

Structure.new do
  # @return [String] The specific packaging group of the item being shipped.
  attribute?(:packing_group, String, from: "packingGroup")

  # @return [String] The specific packing instruction of the item being shipped.
  attribute?(:packing_instruction, String, from: "packingInstruction")

  # @return [String] The specific regulatory class of the item being shipped.
  attribute?(:transportation_regulatory_class, String, from: "transportationRegulatoryClass")

  # @return [String] The specific UNID of the item being shipped.
  attribute?(:united_nations_regulatory_id, String, from: "unitedNationsRegulatoryId")
end
DirectPurchaseRequest =

The request schema for the directPurchaseShipment operation. When the channel type is Amazon, the shipTo address is not required and will be ignored.

Structure.new do
  # @return [ChannelDetails]
  attribute(:channel_details, ChannelDetails, from: "channelDetails")

  # @return [RequestedDocumentSpecification] The document (label) specifications requested. The default label
  # returned is PNG DPI 203 4x6 if no label specification is provided. Requesting an invalid file format results
  # in a failure.
  attribute?(:label_specifications, RequestedDocumentSpecification, from: "labelSpecifications")

  # @return [Array<Package>]
  attribute?(:packages, [Package])

  # @return [Address] The address where the package will be returned if it cannot be delivered.
  attribute?(:return_to, Address, from: "returnTo")

  # @return [Address] The address where the package will be picked up.
  attribute?(:ship_from, Address, from: "shipFrom")

  # @return [Address] The address where the shipment will be delivered. For vendor orders, shipTo information is
  # pulled directly from the Amazon order.
  attribute?(:ship_to, Address, from: "shipTo")
end
PackageDocumentDetail =

The post-purchase details of a package that will be shipped using a shipping service.

Structure.new do
  # @return [String]
  attribute(:package_client_reference_id, String, from: "packageClientReferenceId")

  # @return [Array<PackageDocument>]
  attribute(:package_documents, [PackageDocument], from: "packageDocuments")

  # @return [String]
  attribute?(:tracking_id, String, from: "trackingId")
end
AccessibilityAttributes =

Defines the accessibility details of the access point.

Structure.new do
  # @return [String] The approximate distance of access point from input postalCode's centroid.
  attribute?(:distance, String)

  # @return [Integer] The approximate (static) drive time from input postal code's centroid.
  attribute?(:drive_time, Integer, from: "driveTime")
end
CancelShipmentResponse =

Response schema for the cancelShipment operation.

Structure.new do
  # @return [Hash]
  attribute?(:payload, Hash)
end
DirectPurchaseResponse =

The response schema for the directPurchaseShipment operation.

Structure.new do
  # @return [DirectPurchaseResult]
  attribute?(:payload, DirectPurchaseResult)
end
GetAccessPointsResult =

The payload for the GetAccessPoints API.

Structure.new do
  # @return [Hash]
  attribute(:access_points_map, Hash, from: "accessPointsMap")
end
PurchaseShipmentResult =

The payload for the purchaseShipment operation.

Structure.new do
  # @return [Array<PackageDocumentDetail>]
  attribute(:package_document_details, [PackageDocumentDetail], from: "packageDocumentDetails")

  # @return [Promise]
  attribute(:promise, Promise)

  # @return [String]
  attribute(:shipment_id, String, from: "shipmentId")

  # @return [Benefits]
  attribute?(:benefits, Benefits)
end
CarrierAccountAttribute =

Attribute Properties required by carrier

Structure.new do
  # @return [String] Attribute Name .
  attribute?(:attribute_name, String, from: "attributeName")

  # @return [String] Property Group.
  attribute?(:property_group, String, from: "propertyGroup")

  # @return [String] Value .
  attribute?(:value, String)
end
CollectionsFormDocument =

Collection Form Document Details

Structure.new do
  # @return [String] Base64 document Value of Collection.
  attribute?(:base64_encoded_content, String, from: "base64EncodedContent")

  # @return [String] Collection Document format is PDF.
  attribute?(:document_format, String, from: "documentFormat")
end
ExceptionOperatingHours =

Defines exceptions to standard operating hours for certain date ranges.

Structure.new do
  # @return [DateRange]
  attribute?(:date_range, DateRange, from: "dateRange")

  # @return [OperatingHours]
  attribute?(:operating_hours, OperatingHours, from: "operatingHours")
end
OneClickShipmentResult =

The payload for the OneClickShipment API.

Structure.new do
  # @return [Carrier]
  attribute(:carrier, Carrier)

  # @return [Array<PackageDocumentDetail>]
  attribute(:package_document_details, [PackageDocumentDetail], from: "packageDocumentDetails")

  # @return [Promise]
  attribute(:promise, Promise)

  # @return [Service]
  attribute(:service, Service)

  # @return [String]
  attribute(:shipment_id, String, from: "shipmentId")

  # @return [Money]
  attribute(:total_charge, Money, from: "totalCharge")
end
PurchaseShipmentRequest =

The request schema for the purchaseShipment operation.

Structure.new do
  # @return [String]
  attribute(:rate_id, String, from: "rateId")

  # @return [String]
  attribute(:request_token, String, from: "requestToken")

  # @return [RequestedDocumentSpecification]
  attribute(:requested_document_specification, RequestedDocumentSpecification, from: "requestedDocumentSpecification")

  # @return [Hash] The additional inputs required to purchase a shipping offering, in JSON format. The JSON
  # provided here must adhere to the JSON schema that is returned in the response to the getAdditionalInputs
  # operation.
  #
  # Additional inputs are only required when indicated by the requiresAdditionalInputs property in the response to
  # the getRates operation.
  attribute?(:additional_inputs, Hash, from: "additionalInputs")

  # @return [Array<RequestedValueAddedService>]
  attribute?(:requested_value_added_services, [RequestedValueAddedService], from: "requestedValueAddedServices")
end
SupportedDocumentDetail =

The supported document types for a service offering.

Structure.new do
  # @return [:boolean] When true, the supported document type is required.
  attribute(:mandatory, :boolean, from: "isMandatory")

  # @return [String]
  attribute(:name, String)
end
GetAccessPointsResponse =

The response schema for the GetAccessPoints operation.

Structure.new do
  # @return [GetAccessPointsResult]
  attribute?(:payload, GetAccessPointsResult)
end
OneClickShipmentRequest =

The request schema for the OneClickShipment operation. When the channelType is not Amazon, shipTo is required and when channelType is Amazon shipTo is ignored.

Structure.new do
  # @return [ChannelDetails]
  attribute(:channel_details, ChannelDetails, from: "channelDetails")

  # @return [RequestedDocumentSpecification]
  attribute(:label_specifications, RequestedDocumentSpecification, from: "labelSpecifications")

  # @return [Array<Package>]
  attribute(:packages, [Package])

  # @return [ServiceSelection]
  attribute(:service_selection, ServiceSelection, from: "serviceSelection")

  # @return [Address] The ship from address.
  attribute(:ship_from, Address, from: "shipFrom")

  # @return [AccessPointDetails]
  attribute?(:destination_access_point_details, AccessPointDetails, from: "destinationAccessPointDetails")

  # @return [GoodsOwner] The seller owning the goods before handing them over to the carrier
  attribute?(:goods_owner, GoodsOwner, from: "goodsOwner")

  # @return [Address] The return to address.
  attribute?(:return_to, Address, from: "returnTo")

  # @return [Time] The ship date and time (the requested pickup). This defaults to the current date and time.
  attribute?(:ship_date, Time, from: "shipDate")

  # @return [Address] The ship to address.
  attribute?(:ship_to, Address, from: "shipTo")

  # @return [ShipperInstruction] Optional field for shipper instruction.
  attribute?(:shipper_instruction, ShipperInstruction, from: "shipperInstruction")

  # @return [Array<TaxDetail>]
  attribute?(:tax_details, [TaxDetail], from: "taxDetails")

  # @return [Array<OneClickShipmentValueAddedService>]
  attribute?(:value_added_services_details, [OneClickShipmentValueAddedService], from: "valueAddedServicesDetails")
end
PurchaseShipmentResponse =

The response schema for the purchaseShipment operation.

Structure.new do
  # @return [PurchaseShipmentResult]
  attribute?(:payload, PurchaseShipmentResult)
end
OneClickShipmentResponse =

The response schema for the OneClickShipment operation.

Structure.new do
  # @return [OneClickShipmentResult]
  attribute?(:payload, OneClickShipmentResult)
end
SubmitNdrFeedbackRequest =

The request schema for the NdrFeedback operation

Structure.new do
  # @return [String]
  attribute(:ndr_action, String, from: "ndrAction")

  # @return [String]
  attribute(:tracking_id, String, from: "trackingId")

  # @return [NdrRequestData]
  attribute?(:ndr_request_data, NdrRequestData, from: "ndrRequestData")
end
ValueAddedServiceDetails =

A collection of supported value-added services.

Structure.new do
  # @return [CollectOnDelivery]
  attribute?(:collect_on_delivery, CollectOnDelivery, from: "collectOnDelivery")
end
GetCarrierAccountsRequest =

The request schema for the GetCarrierAccounts operation.

Structure.new do
  # @return [Array<ClientReferenceDetail>]
  attribute?(:client_reference_details, [ClientReferenceDetail], from: "clientReferenceDetails")
end
GetCollectionFormResponse =

The Response for the GetCollectionFormResponse operation.

Structure.new do
  # @return [CollectionsFormDocument]
  attribute?(:collections_form_document, CollectionsFormDocument, from: "collectionsFormDocument")
end
LinkCarrierAccountRequest =

The request schema for verify and add the merchant's account with a certain carrier.

Structure.new do
  # @return [Array<CarrierAccountAttribute>]
  attribute(:carrier_account_attributes, [CarrierAccountAttribute], from: "carrierAccountAttributes")

  # @return [String]
  attribute(:carrier_account_type, String, from: "carrierAccountType")

  # @return [Array<ClientReferenceDetail>]
  attribute?(:client_reference_details, [ClientReferenceDetail], from: "clientReferenceDetails")

  # @return [Array<CarrierAccountAttribute>]
  attribute?(:encrypted_carrier_account_attributes, [CarrierAccountAttribute], from: "encryptedCarrierAccountAttributes")
end
GetCarrierAccountsResponse =

The Response for the GetCarrierAccountsResponse operation.

Structure.new do
  # @return [Array<ActiveAccount>]
  attribute(:active_accounts, [ActiveAccount], from: "activeAccounts")
end
GetShipmentDocumentsResult =

The payload for the getShipmentDocuments operation.

Structure.new do
  # @return [PackageDocumentDetail]
  attribute(:package_document_detail, PackageDocumentDetail, from: "packageDocumentDetail")

  # @return [String]
  attribute(:shipment_id, String, from: "shipmentId")

  # @return [Benefits]
  attribute?(:benefits, Benefits)
end
LinkCarrierAccountResponse =

The Response for the LinkCarrierAccount operation.

Structure.new do
  # @return [String]
  attribute?(:account_id, String, from: "accountId")

  # @return [String]
  attribute?(:registration_status, String, from: "registrationStatus")
end
RequestedLabelCustomization =

Object contains customised data requested by a shipper to be printed on a shipping label.

Structure.new do
  # @return [Array<LabelAttribute>]
  attribute?(:request_attributes, Array, from: "requestAttributes")
end
RequestedValueAddedService =

A value-added service to be applied to a shipping service purchase.

Structure.new do
  # @return [String] The identifier of the selected value-added service. Must be among those returned in the
  # response to the getRates operation.
  attribute(:id, String)
end
GetAdditionalInputsResponse =

The response schema for the getAdditionalInputs operation.

Structure.new do
  # @return [Hash]
  attribute?(:payload, Hash)
end
UnlinkCarrierAccountRequest =

The request schema for remove the Carrier Account associated with the provided merchant.

Structure.new do
  # @return [String]
  attribute?(:account_id, String, from: "accountId")

  # @return [Array<ClientReferenceDetail>]
  attribute?(:client_reference_details, [ClientReferenceDetail], from: "clientReferenceDetails")
end
UnmanifestedShipmentLocation =

UnmanifestedShipmentLocation info

Structure.new do
  # @return [Address]
  attribute?(:address, Address)

  # @return [Time] Its Last Manifest Date.
  attribute?(:last_manifest_date, Time, from: "lastManifestDate")
end
CollectionFormsHistoryRecord =

Active Account Details

Structure.new do
  # @return [String]
  attribute?(:carrier_name, String, from: "carrierName")

  # @return [String]
  attribute?(:collection_form_id, String, from: "collectionFormId")

  # @return [Time] Creation Time for this account.
  attribute?(:creation_date, Time, from: "creationDate")

  # @return [String]
  attribute?(:generation_status, String, from: "generationStatus")

  # @return [Address]
  attribute?(:ship_from_address, Address, from: "shipFromAddress")
end
GetShipmentDocumentsResponse =

The response schema for the the getShipmentDocuments operation.

Structure.new do
  # @return [GetShipmentDocumentsResult]
  attribute?(:payload, GetShipmentDocumentsResult)
end
UnlinkCarrierAccountResponse =

The Response for the UnlinkCarrierAccountResponse operation.

Structure.new do
  # @return [:boolean] Is Carrier unlinked from Merchant
  attribute?(:unlinked, :boolean, from: "isUnlinked")
end
GenerateCollectionFormRequest =

The request schema Call to generate the collection form.

Structure.new do
  # @return [String]
  attribute(:carrier_id, String, from: "carrierId")

  # @return [Array<ClientReferenceDetail>]
  attribute?(:client_reference_details, [ClientReferenceDetail], from: "clientReferenceDetails")

  # @return [Address]
  attribute?(:ship_from_address, Address, from: "shipFromAddress")
end
RequestedDocumentSpecification =

The document specifications requested. For calls to the purchaseShipment operation, the shipment purchase fails if the specified document specifications are not among those returned in the response to the getRates operation.

Structure.new do
  # @return [String]
  attribute(:format, String)

  # @return [:boolean]
  attribute(:need_file_joining, :boolean, from: "needFileJoining")

  # @return [Array<DocumentType>] A list of the document types requested.
  attribute(:requested_document_types, Array, from: "requestedDocumentTypes")

  # @return [DocumentSize]
  attribute(:size, DocumentSize)

  # @return [Integer]
  attribute?(:dpi, Integer)

  # @return [String]
  attribute?(:page_layout, String, from: "pageLayout")

  # @return [RequestedLabelCustomization]
  attribute?(:requested_label_customization, RequestedLabelCustomization, from: "requestedLabelCustomization")
end
SupportedDocumentSpecification =

Document specification that is supported for a service offering.

Structure.new do
  # @return [String]
  attribute(:format, String)

  # @return [Array<PrintOption>]
  attribute(:print_options, [PrintOption], from: "printOptions")

  # @return [DocumentSize]
  attribute(:size, DocumentSize)
end
UnmanifestedCarrierInformation =

UnmanifestedCarrierInformation like carrierId CarrierName and Location

Structure.new do
  # @return [String]
  attribute?(:carrier_id, String, from: "carrierId")

  # @return [String]
  attribute?(:carrier_name, String, from: "carrierName")

  # @return [Array<UnmanifestedShipmentLocation>]
  attribute?(:unmanifested_shipment_location_list, [UnmanifestedShipmentLocation], from: "unmanifestedShipmentLocationList")
end
GenerateCollectionFormResponse =

The Response for the GenerateCollectionFormResponse operation.

Structure.new do
  # @return [CollectionsFormDocument]
  attribute?(:collections_form_document, CollectionsFormDocument, from: "collectionsFormDocument")
end
GetUnmanifestedShipmentsRequest =

The request schema for the GetUnmanifestedShipmentsRequest operation.

Structure.new do
  # @return [Array<ClientReferenceDetail>]
  attribute?(:client_reference_details, [ClientReferenceDetail], from: "clientReferenceDetails")
end
AvailableValueAddedServiceGroup =

The value-added services available for purchase with a shipping service offering.

Structure.new do
  # @return [String] The name of the value-added service group.
  attribute(:group_description, String, from: "groupDescription")

  # @return [String] The type of the value-added service group.
  attribute(:group_id, String, from: "groupId")

  # @return [:boolean] When true, one or more of the value-added services listed must be specified.
  attribute(:required, :boolean, from: "isRequired")

  # @return [Array<ValueAddedService>] A list of optional value-added services available for purchase with a
  # shipping service offering.
  attribute?(:value_added_services, [ValueAddedService], from: "valueAddedServices")
end
DirectFulfillmentItemIdentifiers =

Item identifiers for an item in a direct fulfillment shipment.

Structure.new do
  # @return [String] A unique identifier for an item provided by the client for a direct fulfillment shipment.
  # This is only populated for direct fulfillment multi-piece shipments. It is required if a vendor wants to
  # change the configuration of the packages in which the purchase order is shipped.
  attribute(:line_item_id, String, from: "lineItemID")

  # @return [String] A unique identifier for an item provided by the client for a direct fulfillment shipment.
  # This is only populated if a single line item has multiple pieces. Defaults to 1.
  attribute?(:piece_number, String, from: "pieceNumber")
end
GetCollectionFormHistoryRequest =

The request schema to get query collections form history API .

Structure.new do
  # @return [String]
  attribute?(:carrier_id, String, from: "carrierId")

  # @return [Array<ClientReferenceDetail>]
  attribute?(:client_reference_details, [ClientReferenceDetail], from: "clientReferenceDetails")

  # @return [DateRange]
  attribute?(:date_range, DateRange, from: "dateRange")

  # @return [Integer] max Number of Results for query .
  attribute?(:max_results, Integer, from: "maxResults")

  # @return [Address]
  attribute?(:ship_from_address, Address, from: "shipFromAddress")
end
GetUnmanifestedShipmentsResponse =

The Response for the GetUnmanifestedShipmentsResponse operation.

Structure.new do
  # @return [Array<UnmanifestedCarrierInformation>]
  attribute?(:unmanifested_carrier_information_list, [UnmanifestedCarrierInformation], from: "unmanifestedCarrierInformationList")
end
GetCollectionFormHistoryResponse =

The Response for the GetCollectionFormHistoryResponse operation.

Structure.new do
  # @return [Array<CollectionFormsHistoryRecord>]
  attribute?(:collection_forms_history_record_list, [CollectionFormsHistoryRecord], from: "collectionFormsHistoryRecordList")

  # @return [String] Last Refereshed Date of collection
  attribute?(:last_refreshed_date, String, from: "lastRefreshedDate")
end
OneClickShipmentValueAddedService =

A value-added service to be applied to a shipping service purchase.

Structure.new do
  # @return [String] The identifier of the selected value-added service.
  attribute(:id, String)

  # @return [Money]
  attribute?(:amount, Money)
end
GetCarrierAccountFormInputsResponse =

The Response for the GetCarrierAccountFormInputsResponse operation.

Structure.new do
  # @return [Array<LinkableCarrier>]
  attribute?(:linkable_carriers_list, [LinkableCarrier], from: "linkableCarriersList")
end

Instance Attribute Summary

Attributes inherited from Peddler::API

#access_token, #endpoint, #retries

Instance Method Summary collapse

Methods inherited from Peddler::API

#endpoint_uri, #http, #initialize, #meter, #retriable, #sandbox, #sandbox?, #use, #via

Constructor Details

This class inherits a constructor from Peddler::API

Instance Method Details

#cancel_shipment(shipment_id, x_amzn_shipping_business_id: nil, rate_limit: 80.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Cancels a purchased shipment. Returns an empty object if the shipment is successfully cancelled.

AmazonShipping_UK.

Parameters:

  • shipment_id (String)

    The shipment identifier originally returned by the purchaseShipment operation.

  • x_amzn_shipping_business_id (String) (defaults to: nil)

    Amazon shipping business to assume for this request. The default is

  • rate_limit (Float) (defaults to: 80.0)

    Requests per second

Returns:



139
140
141
142
143
# File 'lib/peddler/apis/shipping_v2.rb', line 139

def cancel_shipment(shipment_id, x_amzn_shipping_business_id: nil, rate_limit: 80.0)
  path = "/shipping/v2/shipments/#{percent_encode(shipment_id)}/cancel"
  parser = -> { CancelShipmentResponse }
  meter(rate_limit).put(path, parser:)
end

#create_claim(body, x_amzn_shipping_business_id: nil, rate_limit: 80.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

This API will be used to create claim for single eligible shipment.

AmazonShipping_UK.

Parameters:

  • body (Hash)

    Request body for the createClaim operation

  • x_amzn_shipping_business_id (String) (defaults to: nil)

    Amazon shipping business to assume for this request. The default is

  • rate_limit (Float) (defaults to: 80.0)

    Requests per second

Returns:



334
335
336
337
338
# File 'lib/peddler/apis/shipping_v2.rb', line 334

def create_claim(body, x_amzn_shipping_business_id: nil, rate_limit: 80.0)
  path = "/shipping/v2/claims"
  parser = -> { CreateClaimResponse }
  meter(rate_limit).post(path, body:, parser:)
end

#direct_purchase_shipment(body, x_amzn_idempotency_key: nil, locale: nil, x_amzn_shipping_business_id: nil, rate_limit: 80.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Purchases the shipping service for a shipment using the best fit service offering. Returns purchase related details and documents.

the same request. secondary language subtag (i.e. en-US, fr-CA). The secondary language subtag is almost always a regional designation. This does not support additional subtags beyond the primary and secondary language subtags. AmazonShipping_UK.

Parameters:

  • body (Hash)

    DirectPurchaseRequest body

  • x_amzn_idempotency_key (String) (defaults to: nil)

    A unique value which the server uses to recognize subsequent retries of

  • locale (String) (defaults to: nil)

    The IETF Language Tag. Note that this only supports the primary language subtag with one

  • x_amzn_shipping_business_id (String) (defaults to: nil)

    Amazon shipping business to assume for this request. The default is

  • rate_limit (Float) (defaults to: 80.0)

    Requests per second

Returns:



43
44
45
46
47
48
# File 'lib/peddler/apis/shipping_v2.rb', line 43

def direct_purchase_shipment(body, x_amzn_idempotency_key: nil, locale: nil, x_amzn_shipping_business_id: nil,
  rate_limit: 80.0)
  path = "/shipping/v2/shipments/directPurchase"
  parser = -> { DirectPurchaseResponse }
  meter(rate_limit).post(path, body:, parser:)
end

#generate_collection_form(body, x_amzn_idempotency_key: nil, x_amzn_shipping_business_id: nil, rate_limit: 80.0) ⇒ Peddler::Response

This API Call to generate the collection form.

the same request. AmazonShipping_UK.

Parameters:

  • body (Hash)

    GenerateCollectionFormRequest body

  • x_amzn_idempotency_key (String) (defaults to: nil)

    A unique value which the server uses to recognize subsequent retries of

  • x_amzn_shipping_business_id (String) (defaults to: nil)

    Amazon shipping business to assume for this request. The default is

  • rate_limit (Float) (defaults to: 80.0)

    Requests per second

Returns:



236
237
238
239
240
241
242
243
# File 'lib/peddler/apis/shipping_v2.rb', line 236

def generate_collection_form(body, x_amzn_idempotency_key: nil, x_amzn_shipping_business_id: nil,
  rate_limit: 80.0)
  cannot_sandbox!

  path = "/shipping/v2/collectionForms"
  parser = -> { GenerateCollectionFormResponse }
  meter(rate_limit).post(path, body:, parser:)
end

#get_access_points(access_point_types, country_code, postal_code, x_amzn_shipping_business_id: nil, rate_limit: 80.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Returns a list of access points in proximity of input postal code.

AmazonShipping_UK.

Parameters:

  • access_point_types (Array<String>)

    Access point types

  • country_code (String)

    Country code for access point

  • postal_code (String)

    postal code for access point

  • x_amzn_shipping_business_id (String) (defaults to: nil)

    Amazon shipping business to assume for this request. The default is

  • rate_limit (Float) (defaults to: 80.0)

    Requests per second

Returns:



301
302
303
304
305
306
307
308
309
310
311
# File 'lib/peddler/apis/shipping_v2.rb', line 301

def get_access_points(access_point_types, country_code, postal_code, x_amzn_shipping_business_id: nil,
  rate_limit: 80.0)
  path = "/shipping/v2/accessPoints"
  params = {
    "accessPointTypes" => stringify_array(access_point_types),
    "countryCode" => country_code,
    "postalCode" => postal_code,
  }.compact
  parser = -> { GetAccessPointsResponse }
  meter(rate_limit).get(path, params:, parser:)
end

#get_additional_inputs(request_token, rate_id, x_amzn_shipping_business_id: nil, rate_limit: 80.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Returns the JSON schema to use for providing additional inputs when needed to purchase a shipping offering. Call the getAdditionalInputs operation when the response to a previous call to the getRates operation indicates that additional inputs are required for the rate (shipping offering) that you want to purchase.

getRates operation. AmazonShipping_UK.

Parameters:

  • request_token (String)

    The request token returned in the response to the getRates operation.

  • rate_id (String)

    The rate identifier for the shipping offering (rate) returned in the response to the

  • x_amzn_shipping_business_id (String) (defaults to: nil)

    Amazon shipping business to assume for this request. The default is

  • rate_limit (Float) (defaults to: 80.0)

    Requests per second

Returns:



157
158
159
160
161
162
163
164
165
# File 'lib/peddler/apis/shipping_v2.rb', line 157

def get_additional_inputs(request_token, rate_id, x_amzn_shipping_business_id: nil, rate_limit: 80.0)
  path = "/shipping/v2/shipments/additionalInputs/schema"
  params = {
    "requestToken" => request_token,
    "rateId" => rate_id,
  }.compact
  parser = -> { GetAdditionalInputsResponse }
  meter(rate_limit).get(path, params:, parser:)
end

#get_carrier_account_form_inputs(x_amzn_shipping_business_id: nil, rate_limit: 80.0) ⇒ Peddler::Response

This API will return a list of input schema required to register a shipper account with the carrier.

AmazonShipping_UK.

Parameters:

  • x_amzn_shipping_business_id (String) (defaults to: nil)

    Amazon shipping business to assume for this request. The default is

  • rate_limit (Float) (defaults to: 80.0)

    Requests per second

Returns:



173
174
175
176
177
178
179
# File 'lib/peddler/apis/shipping_v2.rb', line 173

def (x_amzn_shipping_business_id: nil, rate_limit: 80.0)
  cannot_sandbox!

  path = "/shipping/v2/carrierAccountFormInputs"
  parser = -> { GetCarrierAccountFormInputsResponse }
  meter(rate_limit).get(path, parser:)
end

#get_carrier_accounts(body, x_amzn_shipping_business_id: nil, rate_limit: 80.0) ⇒ Peddler::Response

This API will return Get all carrier accounts for a merchant.

AmazonShipping_UK.

Parameters:

  • body (Hash)

    GetCarrierAccountsRequest body

  • x_amzn_shipping_business_id (String) (defaults to: nil)

    Amazon shipping business to assume for this request. The default is

  • rate_limit (Float) (defaults to: 80.0)

    Requests per second

Returns:



188
189
190
191
192
193
194
# File 'lib/peddler/apis/shipping_v2.rb', line 188

def get_carrier_accounts(body, x_amzn_shipping_business_id: nil, rate_limit: 80.0)
  cannot_sandbox!

  path = "/shipping/v2/carrierAccounts"
  parser = -> { GetCarrierAccountsResponse }
  meter(rate_limit).put(path, body:, parser:)
end

#get_collection_form(collection_form_id, x_amzn_shipping_business_id: nil, rate_limit: 80.0) ⇒ Peddler::Response

This API reprint a collection form.

AmazonShipping_UK.

Parameters:

  • collection_form_id (String)

    collection form Id to reprint a collection.

  • x_amzn_shipping_business_id (String) (defaults to: nil)

    Amazon shipping business to assume for this request. The default is

  • rate_limit (Float) (defaults to: 80.0)

    Requests per second

Returns:



283
284
285
286
287
288
289
# File 'lib/peddler/apis/shipping_v2.rb', line 283

def get_collection_form(collection_form_id, x_amzn_shipping_business_id: nil, rate_limit: 80.0)
  cannot_sandbox!

  path = "/shipping/v2/collectionForms/#{percent_encode(collection_form_id)}"
  parser = -> { GetCollectionFormResponse }
  meter(rate_limit).get(path, parser:)
end

#get_collection_form_history(body, x_amzn_shipping_business_id: nil, rate_limit: 80.0) ⇒ Peddler::Response

This API Call to get the history of the previously generated collection forms.

AmazonShipping_UK.

Parameters:

  • body (Hash)

    GetCollectionFormHistoryRequest body

  • x_amzn_shipping_business_id (String) (defaults to: nil)

    Amazon shipping business to assume for this request. The default is

  • rate_limit (Float) (defaults to: 80.0)

    Requests per second

Returns:



252
253
254
255
256
257
258
# File 'lib/peddler/apis/shipping_v2.rb', line 252

def get_collection_form_history(body, x_amzn_shipping_business_id: nil, rate_limit: 80.0)
  cannot_sandbox!

  path = "/shipping/v2/collectionForms/history"
  parser = -> { GetCollectionFormHistoryResponse }
  meter(rate_limit).put(path, body:, parser:)
end

#get_rates(body, x_amzn_shipping_business_id: nil, rate_limit: 80.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Returns the available shipping service offerings.

AmazonShipping_UK.

Parameters:

  • body (Hash)

    GetRatesRequest body

  • x_amzn_shipping_business_id (String) (defaults to: nil)

    Amazon shipping business to assume for this request. The default is

  • rate_limit (Float) (defaults to: 80.0)

    Requests per second

Returns:



23
24
25
26
27
# File 'lib/peddler/apis/shipping_v2.rb', line 23

def get_rates(body, x_amzn_shipping_business_id: nil, rate_limit: 80.0)
  path = "/shipping/v2/shipments/rates"
  parser = -> { GetRatesResponse }
  meter(rate_limit).post(path, body:, parser:)
end

#get_shipment_documents(shipment_id, package_client_reference_id, format: nil, dpi: nil, x_amzn_shipping_business_id: nil, rate_limit: 80.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Returns the shipping documents associated with a package in a shipment.

request body parameter for the getRates operation. getRates operation. the supported resolutions returned in the response to the getRates operation. AmazonShipping_UK.

Parameters:

  • shipment_id (String)

    The shipment identifier originally returned by the purchaseShipment operation.

  • package_client_reference_id (String)

    The package client reference identifier originally provided in the

  • format (String) (defaults to: nil)

    The file format of the document. Must be one of the supported formats returned by the

  • dpi (Number) (defaults to: nil)

    The resolution of the document (for example, 300 means 300 dots per inch). Must be one of

  • x_amzn_shipping_business_id (String) (defaults to: nil)

    Amazon shipping business to assume for this request. The default is

  • rate_limit (Float) (defaults to: 80.0)

    Requests per second

Returns:



119
120
121
122
123
124
125
126
127
128
129
# File 'lib/peddler/apis/shipping_v2.rb', line 119

def get_shipment_documents(shipment_id, package_client_reference_id, format: nil, dpi: nil,
  x_amzn_shipping_business_id: nil, rate_limit: 80.0)
  path = "/shipping/v2/shipments/#{percent_encode(shipment_id)}/documents"
  params = {
    "packageClientReferenceId" => package_client_reference_id,
    "format" => format,
    "dpi" => dpi,
  }.compact
  parser = -> { GetShipmentDocumentsResponse }
  meter(rate_limit).get(path, params:, parser:)
end

#get_tracking(tracking_id, carrier_id, x_amzn_shipping_business_id: nil, rate_limit: 80.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Returns tracking information for a purchased shipment.

operation. rate. AmazonShipping_UK.

Parameters:

  • tracking_id (String)

    A carrier-generated tracking identifier originally returned by the purchaseShipment

  • carrier_id (String)

    A carrier identifier originally returned by the getRates operation for the selected

  • x_amzn_shipping_business_id (String) (defaults to: nil)

    Amazon shipping business to assume for this request. The default is

  • rate_limit (Float) (defaults to: 80.0)

    Requests per second

Returns:



95
96
97
98
99
100
101
102
103
# File 'lib/peddler/apis/shipping_v2.rb', line 95

def get_tracking(tracking_id, carrier_id, x_amzn_shipping_business_id: nil, rate_limit: 80.0)
  path = "/shipping/v2/tracking"
  params = {
    "trackingId" => tracking_id,
    "carrierId" => carrier_id,
  }.compact
  parser = -> { GetTrackingResponse }
  meter(rate_limit).get(path, params:, parser:)
end

#get_unmanifested_shipments(body, x_amzn_shipping_business_id: nil, rate_limit: 80.0) ⇒ Peddler::Response

This API Get all unmanifested carriers with shipment locations. Any locations which has unmanifested shipments with an eligible carrier for manifesting shall be returned.

AmazonShipping_UK.

Parameters:

  • body (Hash)

    GetUmanifestedShipmentsRequest body

  • x_amzn_shipping_business_id (String) (defaults to: nil)

    Amazon shipping business to assume for this request. The default is

  • rate_limit (Float) (defaults to: 80.0)

    Requests per second

Returns:



268
269
270
271
272
273
274
# File 'lib/peddler/apis/shipping_v2.rb', line 268

def get_unmanifested_shipments(body, x_amzn_shipping_business_id: nil, rate_limit: 80.0)
  cannot_sandbox!

  path = "/shipping/v2/unmanifestedShipments"
  parser = -> { GetUnmanifestedShipmentsResponse }
  meter(rate_limit).put(path, body:, parser:)
end
Note:

This operation can make a dynamic sandbox call.

This API associates/links the specified carrier account with the merchant.

AmazonShipping_UK.

Parameters:

  • carrier_id (String)

    An identifier for the carrier with which the seller's account is being linked.

  • body (Hash)

    LinkCarrierAccountRequest body

  • x_amzn_shipping_business_id (String) (defaults to: nil)

    Amazon shipping business to assume for this request. The default is

  • rate_limit (Float) (defaults to: 5.0)

    Requests per second

Returns:



205
206
207
208
209
# File 'lib/peddler/apis/shipping_v2.rb', line 205

def (carrier_id, body, x_amzn_shipping_business_id: nil, rate_limit: 5.0)
  path = "/shipping/v2/carrierAccounts/#{percent_encode(carrier_id)}"
  parser = -> { LinkCarrierAccountResponse }
  meter(rate_limit).post(path, body:, parser:)
end

#one_click_shipment(body, x_amzn_shipping_business_id: nil, rate_limit: 80.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Purchases a shipping service identifier and returns purchase-related details and documents.

AmazonShipping_UK.

Parameters:

  • body (Hash)

    OneClickShipmentRequest body

  • x_amzn_shipping_business_id (String) (defaults to: nil)

    Amazon shipping business to assume for this request. The default is

  • rate_limit (Float) (defaults to: 80.0)

    Requests per second

Returns:



78
79
80
81
82
# File 'lib/peddler/apis/shipping_v2.rb', line 78

def one_click_shipment(body, x_amzn_shipping_business_id: nil, rate_limit: 80.0)
  path = "/shipping/v2/oneClickShipment"
  parser = -> { OneClickShipmentResponse }
  meter(rate_limit).post(path, body:, parser:)
end

#purchase_shipment(body, x_amzn_idempotency_key: nil, x_amzn_shipping_business_id: nil, rate_limit: 80.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

Purchases a shipping service and returns purchase related details and documents.

Note: You must complete the purchase within 10 minutes of rate creation by the shipping service provider. If you make the request after the 10 minutes have expired, you will receive an error response with the error code equal to "TOKEN_EXPIRED". If you receive this error response, you must get the rates for the shipment again.

the same request. AmazonShipping_UK.

Parameters:

  • body (Hash)

    PurchaseShipmentRequest body

  • x_amzn_idempotency_key (String) (defaults to: nil)

    A unique value which the server uses to recognize subsequent retries of

  • x_amzn_shipping_business_id (String) (defaults to: nil)

    Amazon shipping business to assume for this request. The default is

  • rate_limit (Float) (defaults to: 80.0)

    Requests per second

Returns:



64
65
66
67
68
# File 'lib/peddler/apis/shipping_v2.rb', line 64

def purchase_shipment(body, x_amzn_idempotency_key: nil, x_amzn_shipping_business_id: nil, rate_limit: 80.0)
  path = "/shipping/v2/shipments"
  parser = -> { PurchaseShipmentResponse }
  meter(rate_limit).post(path, body:, parser:)
end

#submit_ndr_feedback(body, x_amzn_shipping_business_id: nil, rate_limit: 80.0) ⇒ Peddler::Response

Note:

This operation can make a dynamic sandbox call.

This API submits the NDR (Non-delivery Report) Feedback for any eligible shipment.

AmazonShipping_UK.

Parameters:

  • body (Hash)

    Request body for ndrFeedback operation

  • x_amzn_shipping_business_id (String) (defaults to: nil)

    Amazon shipping business to assume for this request. The default is

  • rate_limit (Float) (defaults to: 80.0)

    Requests per second

Returns:



321
322
323
324
# File 'lib/peddler/apis/shipping_v2.rb', line 321

def submit_ndr_feedback(body, x_amzn_shipping_business_id: nil, rate_limit: 80.0)
  path = "/shipping/v2/ndrFeedback"
  meter(rate_limit).post(path, body:)
end

This API Unlink the specified carrier account with the merchant.

AmazonShipping_UK.

Parameters:

  • carrier_id (String)

    carrier Id to unlink with merchant.

  • body (Hash)

    UnlinkCarrierAccountRequest body

  • x_amzn_shipping_business_id (String) (defaults to: nil)

    Amazon shipping business to assume for this request. The default is

  • rate_limit (Float) (defaults to: 80.0)

    Requests per second

Returns:



219
220
221
222
223
224
225
# File 'lib/peddler/apis/shipping_v2.rb', line 219

def (carrier_id, body, x_amzn_shipping_business_id: nil, rate_limit: 80.0)
  cannot_sandbox!

  path = "/shipping/v2/carrierAccounts/#{percent_encode(carrier_id)}/unlink"
  parser = -> { UnlinkCarrierAccountResponse }
  meter(rate_limit).put(path, body:, parser:)
end