merchant-fulfillment-api-model

AmzSpApi::MerchantFulfillmentApiModel - the Ruby gem for the Selling Partner API for Merchant Fulfillment

The Selling Partner API for Merchant Fulfillment helps you build applications that let sellers purchase shipping for non-Prime and Prime orders using Amazon’s Buy Shipping Services.

This SDK is automatically generated by the Swagger Codegen project:

Installation

Build a gem

To build the Ruby code into a gem:

gem build merchant-fulfillment-api-model.gemspec

Then either install the gem locally:

gem install ./merchant-fulfillment-api-model-0.1.0.gem

(for development, run gem install --dev ./merchant-fulfillment-api-model-0.1.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'merchant-fulfillment-api-model', '~> 0.1.0'

Install from Git

If the Ruby gem is hosted at a git repository: github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'merchant-fulfillment-api-model', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'merchant-fulfillment-api-model'

api_instance = AmzSpApi::MerchantFulfillmentApiModel::MerchantFulfillmentApi.new
shipment_id = 'shipment_id_example' # String | The Amazon-defined shipment identifier for the shipment to cancel.


begin
  result = api_instance.cancel_shipment(shipment_id)
  p result
rescue AmzSpApi::MerchantFulfillmentApiModel::ApiError => e
  puts "Exception when calling MerchantFulfillmentApi->cancel_shipment: #{e}"
end

api_instance = AmzSpApi::MerchantFulfillmentApiModel::MerchantFulfillmentApi.new
shipment_id = 'shipment_id_example' # String | The Amazon-defined shipment identifier for the shipment to cancel.


begin
  result = api_instance.cancel_shipment_old(shipment_id)
  p result
rescue AmzSpApi::MerchantFulfillmentApiModel::ApiError => e
  puts "Exception when calling MerchantFulfillmentApi->cancel_shipment_old: #{e}"
end

api_instance = AmzSpApi::MerchantFulfillmentApiModel::MerchantFulfillmentApi.new
body = AmzSpApi::MerchantFulfillmentApiModel::CreateShipmentRequest.new # CreateShipmentRequest |


begin
  result = api_instance.create_shipment(body)
  p result
rescue AmzSpApi::MerchantFulfillmentApiModel::ApiError => e
  puts "Exception when calling MerchantFulfillmentApi->create_shipment: #{e}"
end

api_instance = AmzSpApi::MerchantFulfillmentApiModel::MerchantFulfillmentApi.new
body = AmzSpApi::MerchantFulfillmentApiModel::GetAdditionalSellerInputsRequest.new # GetAdditionalSellerInputsRequest |


begin
  result = api_instance.get_additional_seller_inputs(body)
  p result
rescue AmzSpApi::MerchantFulfillmentApiModel::ApiError => e
  puts "Exception when calling MerchantFulfillmentApi->get_additional_seller_inputs: #{e}"
end

api_instance = AmzSpApi::MerchantFulfillmentApiModel::MerchantFulfillmentApi.new
body = AmzSpApi::MerchantFulfillmentApiModel::GetAdditionalSellerInputsRequest.new # GetAdditionalSellerInputsRequest |


begin
  result = api_instance.get_additional_seller_inputs_old(body)
  p result
rescue AmzSpApi::MerchantFulfillmentApiModel::ApiError => e
  puts "Exception when calling MerchantFulfillmentApi->get_additional_seller_inputs_old: #{e}"
end

api_instance = AmzSpApi::MerchantFulfillmentApiModel::MerchantFulfillmentApi.new
body = AmzSpApi::MerchantFulfillmentApiModel::GetEligibleShipmentServicesRequest.new # GetEligibleShipmentServicesRequest |


begin
  result = api_instance.get_eligible_shipment_services(body)
  p result
rescue AmzSpApi::MerchantFulfillmentApiModel::ApiError => e
  puts "Exception when calling MerchantFulfillmentApi->get_eligible_shipment_services: #{e}"
end

api_instance = AmzSpApi::MerchantFulfillmentApiModel::MerchantFulfillmentApi.new
body = AmzSpApi::MerchantFulfillmentApiModel::GetEligibleShipmentServicesRequest.new # GetEligibleShipmentServicesRequest |


begin
  result = api_instance.get_eligible_shipment_services_old(body)
  p result
rescue AmzSpApi::MerchantFulfillmentApiModel::ApiError => e
  puts "Exception when calling MerchantFulfillmentApi->get_eligible_shipment_services_old: #{e}"
end

api_instance = AmzSpApi::MerchantFulfillmentApiModel::MerchantFulfillmentApi.new
shipment_id = 'shipment_id_example' # String | The Amazon-defined shipment identifier for the shipment.


begin
  result = api_instance.get_shipment(shipment_id)
  p result
rescue AmzSpApi::MerchantFulfillmentApiModel::ApiError => e
  puts "Exception when calling MerchantFulfillmentApi->get_shipment: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://sellingpartnerapi-na.amazon.com/

Class | Method | HTTP request | Description ———— | ————- | ————- | ————- AmzSpApi::MerchantFulfillmentApiModel::MerchantFulfillmentApi | {cancel_shipment} | DELETE /mfn/v0/shipments/{shipmentId} | AmzSpApi::MerchantFulfillmentApiModel::MerchantFulfillmentApi | {cancel_shipment_old} | PUT /mfn/v0/shipments/{shipmentId}/cancel | AmzSpApi::MerchantFulfillmentApiModel::MerchantFulfillmentApi | {create_shipment} | POST /mfn/v0/shipments | AmzSpApi::MerchantFulfillmentApiModel::MerchantFulfillmentApi | {get_additional_seller_inputs} | POST /mfn/v0/additionalSellerInputs | AmzSpApi::MerchantFulfillmentApiModel::MerchantFulfillmentApi | {get_additional_seller_inputs_old} | POST /mfn/v0/sellerInputs | AmzSpApi::MerchantFulfillmentApiModel::MerchantFulfillmentApi | {get_eligible_shipment_services} | POST /mfn/v0/eligibleShippingServices | AmzSpApi::MerchantFulfillmentApiModel::MerchantFulfillmentApi | {get_eligible_shipment_services_old} | POST /mfn/v0/eligibleServices | AmzSpApi::MerchantFulfillmentApiModel::MerchantFulfillmentApi | {get_shipment} | GET /mfn/v0/shipments/{shipmentId} |

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.