Class: Peddler::APIs::MerchantFulfillmentV0

Inherits:
Peddler::API show all
Defined in:
lib/peddler/apis/merchant_fulfillment_v0.rb,
lib/peddler/apis/merchant_fulfillment_v0/item.rb,
lib/peddler/apis/merchant_fulfillment_v0/error.rb,
lib/peddler/apis/merchant_fulfillment_v0/label.rb,
lib/peddler/apis/merchant_fulfillment_v0/length.rb,
lib/peddler/apis/merchant_fulfillment_v0/weight.rb,
lib/peddler/apis/merchant_fulfillment_v0/address.rb,
lib/peddler/apis/merchant_fulfillment_v0/benefits.rb,
lib/peddler/apis/merchant_fulfillment_v0/shipment.rb,
lib/peddler/apis/merchant_fulfillment_v0/item_list.rb,
lib/peddler/apis/merchant_fulfillment_v0/rate_item.rb,
lib/peddler/apis/merchant_fulfillment_v0/constraint.rb,
lib/peddler/apis/merchant_fulfillment_v0/error_list.rb,
lib/peddler/apis/merchant_fulfillment_v0/constraints.rb,
lib/peddler/apis/merchant_fulfillment_v0/file_contents.rb,
lib/peddler/apis/merchant_fulfillment_v0/liquid_volume.rb,
lib/peddler/apis/merchant_fulfillment_v0/excluded_benefit.rb,
lib/peddler/apis/merchant_fulfillment_v0/label_dimensions.rb,
lib/peddler/apis/merchant_fulfillment_v0/shipping_service.rb,
lib/peddler/apis/merchant_fulfillment_v0/additional_inputs.rb,
lib/peddler/apis/merchant_fulfillment_v0/excluded_benefits.rb,
lib/peddler/apis/merchant_fulfillment_v0/included_benefits.rb,
lib/peddler/apis/merchant_fulfillment_v0/item_level_fields.rb,
lib/peddler/apis/merchant_fulfillment_v0/label_format_list.rb,
lib/peddler/apis/merchant_fulfillment_v0/package_dimensions.rb,
lib/peddler/apis/merchant_fulfillment_v0/label_customization.rb,
lib/peddler/apis/merchant_fulfillment_v0/label_format_option.rb,
lib/peddler/apis/merchant_fulfillment_v0/adjustment_item_list.rb,
lib/peddler/apis/merchant_fulfillment_v0/get_shipment_response.rb,
lib/peddler/apis/merchant_fulfillment_v0/restricted_set_values.rb,
lib/peddler/apis/merchant_fulfillment_v0/shipping_service_list.rb,
lib/peddler/apis/merchant_fulfillment_v0/additional_inputs_list.rb,
lib/peddler/apis/merchant_fulfillment_v0/item_level_fields_list.rb,
lib/peddler/apis/merchant_fulfillment_v0/transparency_code_list.rb,
lib/peddler/apis/merchant_fulfillment_v0/additional_seller_input.rb,
lib/peddler/apis/merchant_fulfillment_v0/create_shipment_request.rb,
lib/peddler/apis/merchant_fulfillment_v0/dangerous_goods_details.rb,
lib/peddler/apis/merchant_fulfillment_v0/seller_input_definition.rb,
lib/peddler/apis/merchant_fulfillment_v0/additional_seller_inputs.rb,
lib/peddler/apis/merchant_fulfillment_v0/cancel_shipment_response.rb,
lib/peddler/apis/merchant_fulfillment_v0/create_shipment_response.rb,
lib/peddler/apis/merchant_fulfillment_v0/shipment_request_details.rb,
lib/peddler/apis/merchant_fulfillment_v0/shipping_offering_filter.rb,
lib/peddler/apis/merchant_fulfillment_v0/shipping_service_options.rb,
lib/peddler/apis/merchant_fulfillment_v0/rejected_shipping_service.rb,
lib/peddler/apis/merchant_fulfillment_v0/label_format_option_request.rb,
lib/peddler/apis/merchant_fulfillment_v0/additional_seller_inputs_list.rb,
lib/peddler/apis/merchant_fulfillment_v0/excluded_benefit_reason_codes.rb,
lib/peddler/apis/merchant_fulfillment_v0/rejected_shipping_service_list.rb,
lib/peddler/apis/merchant_fulfillment_v0/temporarily_unavailable_carrier.rb,
lib/peddler/apis/merchant_fulfillment_v0/available_format_options_for_label.rb,
lib/peddler/apis/merchant_fulfillment_v0/available_shipping_service_options.rb,
lib/peddler/apis/merchant_fulfillment_v0/get_additional_seller_inputs_result.rb,
lib/peddler/apis/merchant_fulfillment_v0/available_delivery_experience_option.rb,
lib/peddler/apis/merchant_fulfillment_v0/get_additional_seller_inputs_request.rb,
lib/peddler/apis/merchant_fulfillment_v0/temporarily_unavailable_carrier_list.rb,
lib/peddler/apis/merchant_fulfillment_v0/available_carrier_will_pick_up_option.rb,
lib/peddler/apis/merchant_fulfillment_v0/get_additional_seller_inputs_response.rb,
lib/peddler/apis/merchant_fulfillment_v0/get_eligible_shipment_services_result.rb,
lib/peddler/apis/merchant_fulfillment_v0/get_eligible_shipment_services_request.rb,
lib/peddler/apis/merchant_fulfillment_v0/available_format_options_for_label_list.rb,
lib/peddler/apis/merchant_fulfillment_v0/get_eligible_shipment_services_response.rb,
lib/peddler/apis/merchant_fulfillment_v0/terms_and_conditions_not_accepted_carrier.rb,
lib/peddler/apis/merchant_fulfillment_v0/available_delivery_experience_options_list.rb,
lib/peddler/apis/merchant_fulfillment_v0/available_carrier_will_pick_up_options_list.rb,
lib/peddler/apis/merchant_fulfillment_v0/terms_and_conditions_not_accepted_carrier_list.rb

Overview

Selling Partner API for Merchant Fulfillment

With the Selling Partner API for Merchant Fulfillment, you can build applications that sellers can use to purchase shipping for non-Prime and Prime orders using Amazon's Buy Shipping Services.

Defined Under Namespace

Classes: AdditionalInputsList, AdditionalSellerInputsList, AdjustmentItemList, AvailableCarrierWillPickUpOptionsList, AvailableDeliveryExperienceOptionsList, AvailableFormatOptionsForLabel, AvailableFormatOptionsForLabelList, Constraints, ErrorList, ExcludedBenefitReasonCodes, ExcludedBenefits, IncludedBenefits, ItemLevelFieldsList, ItemList, LabelFormatList, RejectedShippingServiceList, RestrictedSetValues, ShippingServiceList, TemporarilyUnavailableCarrierList, TermsAndConditionsNotAcceptedCarrierList, TransparencyCodeList

Constant Summary collapse

Item =

An Amazon order item identifier and a quantity.

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

  # @return [Integer]
  attribute(:quantity, Integer, from: "Quantity")

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

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

  # @return [String]
  attribute?(:item_description, String, from: "ItemDescription")

  # @return [Array<AdditionalSellerInputs>] A list of additional seller inputs required to ship this item using
  # the chosen shipping service.
  attribute?(:item_level_seller_inputs_list, [AdditionalSellerInputs], from: "ItemLevelSellerInputsList")

  # @return [Weight]
  attribute?(:item_weight, Weight, from: "ItemWeight")

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

  # @return [Array<TransparencyCode>]
  attribute?(:transparency_code_list, Array, from: "TransparencyCodeList")
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 in a human-readable form.
  attribute(:message, String)

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

Data for creating a shipping label and dimensions for printing the label.

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

  # @return [FileContents]
  attribute(:file_contents, FileContents, from: "FileContents")

  # @return [String]
  attribute?(:custom_text_for_label, String, from: "CustomTextForLabel")

  # @return [String]
  attribute?(:label_format, String, from: "LabelFormat")

  # @return [String]
  attribute?(:standard_id_for_label, String, from: "StandardIdForLabel")
end
Length =

The length.

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

  # @return [Float] The value in units.
  attribute?(:value, Float)
end
Weight =

The weight.

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

  # @return [Float]
  attribute(:value, Float, from: "Value")
end
Address =

The postal address information.

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

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

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

  # @return [String]
  attribute(:email, String, from: "Email")

  # @return [String]
  attribute(:name, String, from: "Name")

  # @return [String]
  attribute(:phone, String, from: "Phone")

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

  # @return [String]
  attribute?(:address_line2, String, from: "AddressLine2")

  # @return [String]
  attribute?(:address_line3, String, from: "AddressLine3")

  # @return [String]
  attribute?(:district_or_county, String, from: "DistrictOrCounty")

  # @return [String]
  attribute?(:state_or_province_code, String, from: "StateOrProvinceCode")
end
Benefits =

Benefits that are included and excluded for each shipping offer. Benefits represents services provided by Amazon (for example, CLAIMS_PROTECTED) when sellers purchase shipping through Amazon. Benefit details are 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
Shipment =

The details of a shipment. Includes the shipment status.

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

  # @return [String] The date and time the shipment is created.
  attribute(:created_date, String, from: "CreatedDate")

  # @return [Money] If you specify `DeclaredValue` in a previous call to the `createShipment` operation, then
  # `Insurance` indicates the shipment insurance amount that the carrier uses. If `DeclaredValue` isn't with a
  # previous call to the `createShipment` operation, then the shipment is insured for the carrier's minimum
  # insurance amount, or the combined sale prices that the items are listed for in the shipment.
  attribute(:insurance, Money, from: "Insurance")

  # @return [Array<Item>]
  attribute(:item_list, [Item], from: "ItemList")

  # @return [Label] Data for creating a shipping label and dimensions for printing the label. If the shipment is
  # canceled, an empty label is returned.
  attribute(:label, Label, from: "Label")

  # @return [PackageDimensions]
  attribute(:package_dimensions, PackageDimensions, from: "PackageDimensions")

  # @return [Address] The address of the sender.
  attribute(:ship_from_address, Address, from: "ShipFromAddress")

  # @return [Address] The destination address for the shipment.
  attribute(:ship_to_address, Address, from: "ShipToAddress")

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

  # @return [ShippingService]
  attribute(:shipping_service, ShippingService, from: "ShippingService")

  # @return [String] The shipment status.
  attribute(:status, String, from: "Status")

  # @return [Weight] The package weight.
  attribute(:weight, Weight, from: "Weight")

  # @return [String] The date and time of the last update.
  attribute?(:last_updated_date, String, from: "LastUpdatedDate")

  # @return [String]
  attribute?(:seller_order_id, String, from: "SellerOrderId")

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

Rate item for shipping costs and adjustments.

Structure.new do
  # @return [String] Unique identifier for the RateItem.
  attribute(:rate_item_id, String, from: "RateItemID")

  # @return [Money] The monetary value for the RateItem.
  attribute?(:rate_item_charge, Money, from: "RateItemCharge")

  # @return [String] Localized name for the RateItem.
  attribute?(:rate_item_name_localization, String, from: "RateItemNameLocalization")

  # @return [String] Type of the RateItem.
  attribute?(:rate_item_type, String, from: "RateItemType")
end
Constraint =

A validation constraint.

Structure.new do
  # @return [String] A validation string.
  attribute(:validation_string, String, from: "ValidationString")

  # @return [String] A regular expression.
  attribute?(:validation_reg_ex, String, from: "ValidationRegEx")
end
FileContents =

The document data and checksum.

Structure.new do
  # @return [String] An MD5 hash to validate the PDF document data, in the form of a Base64 string.
  attribute(:checksum, String, from: "Checksum")

  # @return [String] Data for printing labels encoded into a Base64, GZip-compressed string.
  attribute(:contents, String, from: "Contents")

  # @return [String]
  attribute(:file_type, String, from: "FileType")
end
LiquidVolume =

Liquid volume.

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

  # @return [Float] The measurement value.
  attribute(:value, Float, from: "Value")
end
ExcludedBenefit =

An object representing an excluded benefit that is excluded for a shipping offer or rate.

Structure.new do
  # @return [String] A benefit that is being excluded from a shipment.
  attribute?(:benefit, String, from: "Benefit")

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

Dimensions for printing a shipping label.

Structure.new do
  # @return [Float] The length dimension.
  attribute(:length, Float, from: "Length")

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

  # @return [Float] The width dimension.
  attribute(:width, Float, from: "Width")
end
ShippingService =

A shipping service offer made by a carrier.

Structure.new do
  # @return [String] The name of the carrier.
  attribute(:carrier_name, String, from: "CarrierName")

  # @return [Money] The amount that the carrier will charge for the shipment.
  attribute(:rate, Money, from: "Rate")

  # @return [Money] The amount that the carrier will charge for the shipment with adjustments.
  attribute(:rate_with_adjustments, Money, from: "RateWithAdjustments")

  # @return [:boolean] When true, additional seller inputs are required.
  attribute(:requires_additional_seller_inputs, :boolean, from: "RequiresAdditionalSellerInputs")

  # @return [String] The date that the carrier will ship the package.
  attribute(:ship_date, String, from: "ShipDate")

  # @return [String]
  attribute(:shipping_service_id, String, from: "ShippingServiceId")

  # @return [String] A plain text representation of a carrier's shipping service. For example, "UPS Ground" or
  # "FedEx Standard Overnight".
  attribute(:shipping_service_name, String, from: "ShippingServiceName")

  # @return [String] An Amazon-defined shipping service offer identifier.
  attribute(:shipping_service_offer_id, String, from: "ShippingServiceOfferId")

  # @return [ShippingServiceOptions] Extra services offered by the carrier.
  attribute(:shipping_service_options, ShippingServiceOptions, from: "ShippingServiceOptions")

  # @return [Array<RateItem>] A list of adjustments applied to a shipping service.
  attribute?(:adjustment_item_list, [RateItem], from: "AdjustmentItemList")

  # @return [Array<LabelFormatOption>]
  attribute?(:available_format_options_for_label, [LabelFormatOption], from: "AvailableFormatOptionsForLabel")

  # @return [Array<LabelFormat>]
  attribute?(:available_label_formats, Array, from: "AvailableLabelFormats")

  # @return [AvailableShippingServiceOptions]
  attribute?(:available_shipping_service_options, AvailableShippingServiceOptions, from: "AvailableShippingServiceOptions")

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

  # @return [String] The earliest date by which the shipment will be delivered.
  attribute?(:earliest_estimated_delivery_date, String, from: "EarliestEstimatedDeliveryDate")

  # @return [String] The latest date by which the shipment will be delivered.
  attribute?(:latest_estimated_delivery_date, String, from: "LatestEstimatedDeliveryDate")
end
AdditionalInputs =

Maps the additional seller input to the definition. The key to the map is the field name.

Structure.new do
  # @return [String] The field name.
  attribute?(:additional_input_field_name, String, from: "AdditionalInputFieldName")

  # @return [SellerInputDefinition]
  attribute?(:seller_input_definition, SellerInputDefinition, from: "SellerInputDefinition")
end
ItemLevelFields =

A list of item level fields.

Structure.new do
  # @return [Array<AdditionalInputs>]
  attribute(:additional_inputs, [AdditionalInputs], from: "AdditionalInputs")

  # @return [String] The Amazon Standard Identification Number (ASIN) of the item.
  attribute(:asin, String, from: "Asin")
end
PackageDimensions =

The dimensions of a package contained in a shipment.

Structure.new do
  # @return [Float] The height dimension. If you don't specify `PredefinedPackageDimensions`, you must specify the
  # height.
  attribute?(:height, Float, from: "Height")

  # @return [Float] The length dimension. If you don't specify `PredefinedPackageDimensions`, you must specify the
  # length.
  attribute?(:length, Float, from: "Length")

  # @return [String]
  attribute?(:predefined_package_dimensions, String, from: "PredefinedPackageDimensions")

  # @return [String] The unit of measurement. If you don't specify `PredefinedPackageDimensions`, you must specify
  # the unit.
  attribute?(:unit, String, from: "Unit")

  # @return [Float] The width dimension. If you don't specify `PredefinedPackageDimensions`, you must specify the
  # width.
  attribute?(:width, Float, from: "Width")
end
LabelCustomization =

Custom text for shipping labels.

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

  # @return [String]
  attribute?(:standard_id_for_label, String, from: "StandardIdForLabel")
end
LabelFormatOption =

The label format details and whether to include a packing slip.

Structure.new do
  # @return [:boolean] When true, include a packing slip with the label.
  attribute?(:include_packing_slip_with_label, :boolean, from: "IncludePackingSlipWithLabel")

  # @return [String]
  attribute?(:label_format, String, from: "LabelFormat")
end
GetShipmentResponse =

Response schema.

Structure.new do
  # @return [Array<Error>] One or more unexpected errors occurred during this operation.
  attribute?(:errors, [Error])

  # @return [Shipment] The payload for the `getShipment` operation.
  attribute?(:payload, Shipment)
end
AdditionalSellerInput =

Additional information required to purchase shipping.

Structure.new do
  # @return [String] The data type of the additional information.
  attribute?(:data_type, String, from: "DataType")

  # @return [Address]
  attribute?(:value_as_address, Address, from: "ValueAsAddress")

  # @return [:boolean] The value when the data type is boolean.
  attribute?(:value_as_boolean, :boolean, from: "ValueAsBoolean")

  # @return [Money]
  attribute?(:value_as_currency, Money, from: "ValueAsCurrency")

  # @return [Length]
  attribute?(:value_as_dimension, Length, from: "ValueAsDimension")

  # @return [Integer] The value when the data type is integer.
  attribute?(:value_as_integer, Integer, from: "ValueAsInteger")

  # @return [String] The value when the data type is string.
  attribute?(:value_as_string, String, from: "ValueAsString")

  # @return [String] The value when the data type is a date-time formatted string.
  attribute?(:value_as_timestamp, String, from: "ValueAsTimestamp")

  # @return [Weight]
  attribute?(:value_as_weight, Weight, from: "ValueAsWeight")
end
CreateShipmentRequest =

Request schema.

Structure.new do
  # @return [ShipmentRequestDetails] Shipment information required to create a shipment.
  attribute(:shipment_request_details, ShipmentRequestDetails, from: "ShipmentRequestDetails")

  # @return [String]
  attribute(:shipping_service_id, String, from: "ShippingServiceId")

  # @return [String] Hazardous materials options for a package. Consult the terms and conditions for each carrier
  # for more information about hazardous materials.
  attribute?(:hazmat_type, String, from: "HazmatType")

  # @return [LabelFormatOptionRequest]
  attribute?(:label_format_option, LabelFormatOptionRequest, from: "LabelFormatOption")

  # @return [Array<AdditionalSellerInputs>] A list of additional seller inputs required to ship this shipment.
  attribute?(:shipment_level_seller_inputs_list, [AdditionalSellerInputs], from: "ShipmentLevelSellerInputsList")

  # @return [String] Identifies a shipping service order made by a carrier.
  attribute?(:shipping_service_offer_id, String, from: "ShippingServiceOfferId")
end
DangerousGoodsDetails =

Details related to any dangerous goods or items that are 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 shipped item.
  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
SellerInputDefinition =

Specifies characteristics that apply to a seller input.

Structure.new do
  # @return [Array<Constraint>]
  attribute(:constraints, [Constraint], from: "Constraints")

  # @return [String] The data type of the additional input field.
  attribute(:data_type, String, from: "DataType")

  # @return [String] The display text for the additional input field.
  attribute(:input_display_text, String, from: "InputDisplayText")

  # @return [:boolean] When true, the additional input field is required.
  attribute(:required, :boolean, from: "IsRequired")

  # @return [AdditionalSellerInput]
  attribute(:stored_value, AdditionalSellerInput, from: "StoredValue")

  # @return [String] Whether the seller input applies to the item or the shipment.
  attribute?(:input_target, String, from: "InputTarget")

  # @return [Array<String>]
  attribute?(:restricted_set_values, [String], from: "RestrictedSetValues")
end
AdditionalSellerInputs =

An additional set of seller inputs required to purchase shipping.

Structure.new do
  # @return [String] The name of the additional input field.
  attribute(:additional_input_field_name, String, from: "AdditionalInputFieldName")

  # @return [AdditionalSellerInput]
  attribute(:additional_seller_input, AdditionalSellerInput, from: "AdditionalSellerInput")
end
CancelShipmentResponse =

Response schema.

Structure.new do
  # @return [Array<Error>] One or more unexpected errors occurred during the `cancelShipment` operation.
  attribute?(:errors, [Error])

  # @return [Shipment] The payload for the `cancelShipment` operation.
  attribute?(:payload, Shipment)
end
CreateShipmentResponse =

Response schema.

Structure.new do
  # @return [Array<Error>] One or more unexpected errors occurred during the `createShipment` operation.
  attribute?(:errors, [Error])

  # @return [Shipment] Shipment information.
  attribute?(:payload, Shipment)
end
ShipmentRequestDetails =

Shipment information required for requesting shipping service offers or for creating a shipment.

Structure.new do
  # @return [String] An Amazon-defined order identifier in 3-7-7 format.
  attribute(:amazon_order_id, String, from: "AmazonOrderId")

  # @return [Array<Item>]
  attribute(:item_list, [Item], from: "ItemList")

  # @return [PackageDimensions] The package dimensions.
  attribute(:package_dimensions, PackageDimensions, from: "PackageDimensions")

  # @return [Address] The address of the sender.
  attribute(:ship_from_address, Address, from: "ShipFromAddress")

  # @return [ShippingServiceOptions] Extra services offered by the carrier.
  attribute(:shipping_service_options, ShippingServiceOptions, from: "ShippingServiceOptions")

  # @return [Weight] The package weight.
  attribute(:weight, Weight, from: "Weight")

  # @return [LabelCustomization] Label customization options.
  attribute?(:label_customization, LabelCustomization, from: "LabelCustomization")

  # @return [String] The date by which the package must arrive to keep the promise to the customer, in [ISO
  # 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format. If `MustArriveByDate` is
  # specified, only shipping service offers that can be delivered by that date are returned.
  attribute?(:must_arrive_by_date, String, from: "MustArriveByDate")

  # @return [String] A seller-defined order identifier.
  attribute?(:seller_order_id, String, from: "SellerOrderId")

  # @return [String] When used in a request, this is the date and time that the seller wants to ship the package.
  # When used in a response, this is the date and time that the package can be shipped by the indicated method.
  attribute?(:ship_date, String, from: "ShipDate")
end
ShippingOfferingFilter =

Filter for use when requesting eligible shipping services.

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

  # @return [String]
  attribute?(:delivery_experience, String, from: "DeliveryExperience")

  # @return [:boolean] When true, include complex shipping options.
  attribute?(:include_complex_shipping_options, :boolean, from: "IncludeComplexShippingOptions")

  # @return [:boolean] When true, include a packing slip with the label.
  attribute?(:include_packing_slip_with_label, :boolean, from: "IncludePackingSlipWithLabel")
end
ShippingServiceOptions =

Extra services provided by a carrier.

Structure.new do
  # @return [:boolean] When true, the carrier will pick up the package. Note: Scheduled carrier pickup is
  # available only using Dynamex (US), DPD (UK), and Royal Mail (UK).
  attribute(:carrier_will_pick_up, :boolean, from: "CarrierWillPickUp")

  # @return [String] The delivery confirmation level.
  attribute(:delivery_experience, String, from: "DeliveryExperience")

  # @return [String]
  attribute?(:carrier_will_pick_up_option, String, from: "CarrierWillPickUpOption")

  # @return [Money] The declared value of the shipment. The carrier uses this value to determine the amount to use
  # to insure the shipment. If `DeclaredValue` is greater than the carrier's minimum insurance amount, the seller
  # is charged for the additional insurance, as determined by the carrier. For information about optional
  # insurance coverage, refer to Seller Central Help: [UK](https://sellercentral.amazon.co.uk/gp/help/200204080),
  # [US](https://sellercentral.amazon.com/gp/help/200204080).
  attribute?(:declared_value, Money, from: "DeclaredValue")

  # @return [String] The seller's preferred label format.
  attribute?(:label_format, String, from: "LabelFormat")
end
RejectedShippingService =

Information about a rejected shipping service

Structure.new do
  # @return [String] The rejected shipping carrier name. For example, USPS.
  attribute(:carrier_name, String, from: "CarrierName")

  # @return [String] A reason code meant to be consumed programatically. For example,
  # `CARRIER_CANNOT_SHIP_TO_POBOX`.
  attribute(:rejection_reason_code, String, from: "RejectionReasonCode")

  # @return [String] The rejected shipping service identifier. For example, `FEDEX_PTP_STANDARD_OVERNIGHT`.
  attribute(:shipping_service_id, String, from: "ShippingServiceId")

  # @return [String] The rejected shipping service localized name. For example, FedEx Standard Overnight.
  attribute(:shipping_service_name, String, from: "ShippingServiceName")

  # @return [String] A localized human readable description of the rejected reason.
  attribute?(:rejection_reason_message, String, from: "RejectionReasonMessage")
end
LabelFormatOptionRequest =

Whether to include a packing slip.

Structure.new do
  # @return [:boolean] When true, include a packing slip with the label.
  attribute?(:include_packing_slip_with_label, :boolean, from: "IncludePackingSlipWithLabel")
end
TemporarilyUnavailableCarrier =

A carrier who is temporarily unavailable, most likely due to a service outage experienced by the carrier.

Structure.new do
  # @return [String] The name of the carrier.
  attribute(:carrier_name, String, from: "CarrierName")
end
AvailableShippingServiceOptions =

The available shipping service options.

Structure.new do
  # @return [Array<AvailableCarrierWillPickUpOption>]
  attribute(:available_carrier_will_pick_up_options, [AvailableCarrierWillPickUpOption], from: "AvailableCarrierWillPickUpOptions")

  # @return [Array<AvailableDeliveryExperienceOption>]
  attribute(:available_delivery_experience_options, [AvailableDeliveryExperienceOption], from: "AvailableDeliveryExperienceOptions")
end
GetAdditionalSellerInputsResult =

The payload for the getAdditionalSellerInputs operation.

Structure.new do
  # @return [Array<ItemLevelFields>]
  attribute?(:item_level_fields_list, [ItemLevelFields], from: "ItemLevelFieldsList")

  # @return [Array<AdditionalInputs>]
  attribute?(:shipment_level_fields, [AdditionalInputs], from: "ShipmentLevelFields")
end
AvailableDeliveryExperienceOption =

The available delivery confirmation options, and the fee charged, if any.

Structure.new do
  # @return [Money]
  attribute(:charge, Money, from: "Charge")

  # @return [String]
  attribute(:delivery_experience_option, String, from: "DeliveryExperienceOption")
end
GetAdditionalSellerInputsRequest =

Request schema.

Structure.new do
  # @return [String] An Amazon defined order identifier
  attribute(:order_id, String, from: "OrderId")

  # @return [Address] The address from which to ship.
  attribute(:ship_from_address, Address, from: "ShipFromAddress")

  # @return [String]
  attribute(:shipping_service_id, String, from: "ShippingServiceId")
end
AvailableCarrierWillPickUpOption =

Indicates whether the carrier will pick up the package, and what fee is charged, if any.

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

  # @return [Money] The fee charged.
  attribute(:charge, Money, from: "Charge")
end
GetAdditionalSellerInputsResponse =

Response schema.

Structure.new do
  # @return [Array<Error>]
  attribute?(:errors, [Error])

  # @return [GetAdditionalSellerInputsResult]
  attribute?(:payload, GetAdditionalSellerInputsResult)
end
GetEligibleShipmentServicesResult =

The payload for the getEligibleShipmentServices operation.

Structure.new do
  # @return [Array<ShippingService>] A list of shipping services offers.
  attribute(:shipping_service_list, [ShippingService], from: "ShippingServiceList")

  # @return [Array<RejectedShippingService>]
  attribute?(:rejected_shipping_service_list, [RejectedShippingService], from: "RejectedShippingServiceList")

  # @return [Array<TemporarilyUnavailableCarrier>]
  attribute?(:temporarily_unavailable_carrier_list, [TemporarilyUnavailableCarrier], from: "TemporarilyUnavailableCarrierList")

  # @return [Array<TermsAndConditionsNotAcceptedCarrier>]
  attribute?(:terms_and_conditions_not_accepted_carrier_list, [TermsAndConditionsNotAcceptedCarrier], from: "TermsAndConditionsNotAcceptedCarrierList")
end
GetEligibleShipmentServicesRequest =

Request schema.

Structure.new do
  # @return [ShipmentRequestDetails] Shipment information required for requesting shipping service offers.
  attribute(:shipment_request_details, ShipmentRequestDetails, from: "ShipmentRequestDetails")

  # @return [ShippingOfferingFilter]
  attribute?(:shipping_offering_filter, ShippingOfferingFilter, from: "ShippingOfferingFilter")
end
GetEligibleShipmentServicesResponse =

Response schema.

Structure.new do
  # @return [Array<Error>] One or more unexpected errors occurred during this operation.
  attribute?(:errors, [Error])

  # @return [GetEligibleShipmentServicesResult]
  attribute?(:payload, GetEligibleShipmentServicesResult)
end
TermsAndConditionsNotAcceptedCarrier =

A carrier whose terms and conditions have not been accepted by the seller.

Structure.new do
  # @return [String] The name of the carrier.
  attribute(:carrier_name, String, from: "CarrierName")
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, rate_limit: 1.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Cancel the shipment indicated by the specified shipment identifier.

Parameters:

  • shipment_id (String)

    The Amazon-defined shipment identifier for the shipment to cancel.

  • rate_limit (Float) (defaults to: 1.0)

    Requests per second

Returns:



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

def cancel_shipment(shipment_id, rate_limit: 1.0)
  path = "/mfn/v0/shipments/#{percent_encode(shipment_id)}"
  parser = -> { CancelShipmentResponse }
  meter(rate_limit).delete(path, parser:)
end

#create_shipment(body, rate_limit: 2.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Create a shipment with the information provided.

Parameters:

  • body (Hash)

    The request schema for the CreateShipment operation.

  • rate_limit (Float) (defaults to: 2.0)

    Requests per second

Returns:



56
57
58
59
60
# File 'lib/peddler/apis/merchant_fulfillment_v0.rb', line 56

def create_shipment(body, rate_limit: 2.0)
  path = "/mfn/v0/shipments"
  parser = -> { CreateShipmentResponse }
  meter(rate_limit).post(path, body:, parser:)
end

#get_additional_seller_inputs(body, rate_limit: 1.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Gets a list of additional seller inputs required for a ship method. This is generally used for international shipping.

Parameters:

  • body (Hash)

    The request schema for the GetAdditionalSellerInputs operation.

  • rate_limit (Float) (defaults to: 1.0)

    Requests per second

Returns:



69
70
71
72
73
# File 'lib/peddler/apis/merchant_fulfillment_v0.rb', line 69

def get_additional_seller_inputs(body, rate_limit: 1.0)
  path = "/mfn/v0/additionalSellerInputs"
  parser = -> { GetAdditionalSellerInputsResponse }
  meter(rate_limit).post(path, body:, parser:)
end

#get_eligible_shipment_services(body, rate_limit: 6.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Returns a list of shipping service offers that satisfy the specified shipment request details.

Parameters:

  • body (Hash)

    The request schema for the GetEligibleShipmentServices operation.

  • rate_limit (Float) (defaults to: 6.0)

    Requests per second

Returns:



20
21
22
23
24
# File 'lib/peddler/apis/merchant_fulfillment_v0.rb', line 20

def get_eligible_shipment_services(body, rate_limit: 6.0)
  path = "/mfn/v0/eligibleShippingServices"
  parser = -> { GetEligibleShipmentServicesResponse }
  meter(rate_limit).post(path, body:, parser:)
end

#get_shipment(shipment_id, rate_limit: 1.0) ⇒ Peddler::Response

Note:

This operation can make a static sandbox call.

Returns the shipment information for an existing shipment.

Parameters:

  • shipment_id (String)

    The Amazon-defined shipment identifier for the shipment.

  • rate_limit (Float) (defaults to: 1.0)

    Requests per second

Returns:



32
33
34
35
36
# File 'lib/peddler/apis/merchant_fulfillment_v0.rb', line 32

def get_shipment(shipment_id, rate_limit: 1.0)
  path = "/mfn/v0/shipments/#{percent_encode(shipment_id)}"
  parser = -> { GetShipmentResponse }
  meter(rate_limit).get(path, parser:)
end