feeds-api-model¶ ↑
AmzSpApi::FeedsApiModel
- the Ruby gem for the Selling Partner API for Feeds
The Selling Partner API for Feeds lets you upload data to Amazon on behalf of a selling partner.
This SDK is automatically generated by the Swagger Codegen project:
-
API version: 2020-09-04
-
Package version: 0.1.0
-
Build package: io.swagger.codegen.v3.generators.ruby.RubyClientCodegen For more information, please visit sellercentral.amazon.com/gp/mws/contactus.html
Installation¶ ↑
Build a gem¶ ↑
To build the Ruby code into a gem:
gem build feeds-api-model.gemspec
Then either install the gem locally:
gem install ./feeds-api-model-0.1.0.gem
(for development, run gem install --dev ./feeds-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 'feeds-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 'feeds-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 'feeds-api-model' api_instance = AmzSpApi::FeedsApiModel::FeedsApi.new feed_id = 'feed_id_example' # String | The identifier for the feed. This identifier is unique only in combination with a seller ID. begin result = api_instance.cancel_feed(feed_id) p result rescue AmzSpApi::FeedsApiModel::ApiError => e puts "Exception when calling FeedsApi->cancel_feed: #{e}" end api_instance = AmzSpApi::FeedsApiModel::FeedsApi.new body = AmzSpApi::FeedsApiModel::CreateFeedSpecification.new # CreateFeedSpecification | begin result = api_instance.create_feed(body) p result rescue AmzSpApi::FeedsApiModel::ApiError => e puts "Exception when calling FeedsApi->create_feed: #{e}" end api_instance = AmzSpApi::FeedsApiModel::FeedsApi.new body = AmzSpApi::FeedsApiModel::CreateFeedDocumentSpecification.new # CreateFeedDocumentSpecification | begin result = api_instance.create_feed_document(body) p result rescue AmzSpApi::FeedsApiModel::ApiError => e puts "Exception when calling FeedsApi->create_feed_document: #{e}" end api_instance = AmzSpApi::FeedsApiModel::FeedsApi.new feed_id = 'feed_id_example' # String | The identifier for the feed. This identifier is unique only in combination with a seller ID. begin result = api_instance.get_feed(feed_id) p result rescue AmzSpApi::FeedsApiModel::ApiError => e puts "Exception when calling FeedsApi->get_feed: #{e}" end api_instance = AmzSpApi::FeedsApiModel::FeedsApi.new feed_document_id = 'feed_document_id_example' # String | The identifier of the feed document. begin result = api_instance.get_feed_document(feed_document_id) p result rescue AmzSpApi::FeedsApiModel::ApiError => e puts "Exception when calling FeedsApi->get_feed_document: #{e}" end api_instance = AmzSpApi::FeedsApiModel::FeedsApi.new opts = { feed_types: ['feed_types_example'], # Array<String> | A list of feed types used to filter feeds. When feedTypes is provided, the other filter parameters (processingStatuses, marketplaceIds, createdSince, createdUntil) and pageSize may also be provided. Either feedTypes or nextToken is required. marketplace_ids: ['marketplace_ids_example'], # Array<String> | A list of marketplace identifiers used to filter feeds. The feeds returned will match at least one of the marketplaces that you specify. page_size: 10, # Integer | The maximum number of feeds to return in a single call. processing_statuses: ['processing_statuses_example'], # Array<String> | A list of processing statuses used to filter feeds. created_since: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | The earliest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is 90 days ago. Feeds are retained for a maximum of 90 days. created_until: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | The latest feed creation date and time for feeds included in the response, in ISO 8601 format. The default is now. next_token: 'next_token_example' # String | A string token returned in the response to your previous request. nextToken is returned when the number of results exceeds the specified pageSize value. To get the next page of results, call the getFeeds operation and include this token as the only parameter. Specifying nextToken with any other parameters will cause the request to fail. } begin result = api_instance.get_feeds(opts) p result rescue AmzSpApi::FeedsApiModel::ApiError => e puts "Exception when calling FeedsApi->get_feeds: #{e}" end
Documentation for API Endpoints¶ ↑
All URIs are relative to https://sellingpartnerapi-na.amazon.com/
Class | Method | HTTP request | Description ———— | ————- | ————- | ————- AmzSpApi::FeedsApiModel::FeedsApi | {cancel_feed} | DELETE /feeds/2020-09-04/feeds/{feedId} | AmzSpApi::FeedsApiModel::FeedsApi | {create_feed} | POST /feeds/2020-09-04/feeds | AmzSpApi::FeedsApiModel::FeedsApi | {create_feed_document} | POST /feeds/2020-09-04/documents | AmzSpApi::FeedsApiModel::FeedsApi | {get_feed} | GET /feeds/2020-09-04/feeds/{feedId} | AmzSpApi::FeedsApiModel::FeedsApi | {get_feed_document} | GET /feeds/2020-09-04/documents/{feedDocumentId} | AmzSpApi::FeedsApiModel::FeedsApi | {get_feeds} | GET /feeds/2020-09-04/feeds |
Documentation for Models¶ ↑
Documentation for Authorization¶ ↑
All endpoints do not require authorization.