class Peddler::API::SupplySources20200701
Selling Partner API
for Supply Sources
Manage configurations and capabilities of seller supply sources.
Public Instance Methods
Archive a supply source, making it inactive. Cannot be undone.
@note This operation can make a static sandbox call. @param supply_source_id [String] The unique identifier of a supply source. @param rate_limit [Float] Requests per second @return [Hash] The API
response
# File lib/peddler/api/supply_sources_2020_07_01.rb, line 79 def archive_supply_source(supply_source_id, rate_limit: nil) path = "/supplySources/2020-07-01/supplySources/#{supply_source_id}" delete(path) end
Create a new supply source.
@note This operation can make a static sandbox call. @param payload [Hash] A request to create a supply source. @param rate_limit [Float] Requests per second @return [Hash] The API
response
# File lib/peddler/api/supply_sources_2020_07_01.rb, line 40 def create_supply_source(payload, rate_limit: nil) path = "/supplySources/2020-07-01/supplySources" body = payload post(path, body:) end
Retrieve a supply source.
@note This operation can make a static sandbox call. @param supply_source_id [String] The unique identifier of a supply source. @param rate_limit [Float] Requests per second @return [Hash] The API
response
# File lib/peddler/api/supply_sources_2020_07_01.rb, line 53 def get_supply_source(supply_source_id, rate_limit: nil) path = "/supplySources/2020-07-01/supplySources/#{supply_source_id}" get(path) end
The path to retrieve paginated supply sources.
@note This operation can make a static sandbox call. @param next_page_token [String] The pagination token to retrieve a specific page of results. @param page_size [Number] The number of supply sources to return per paginated request. @param rate_limit [Float] Requests per second @return [Hash] The API
response
# File lib/peddler/api/supply_sources_2020_07_01.rb, line 24 def get_supply_sources(next_page_token: nil, page_size: 10, rate_limit: nil) path = "/supplySources/2020-07-01/supplySources" params = { "nextPageToken" => next_page_token, "pageSize" => page_size, }.compact get(path, params:) end
Update the configuration and capabilities of a supply source.
@note This operation can make a static sandbox call. @param supply_source_id [String] The unique identitier of a supply source. @param payload [Hash] @param rate_limit [Float] Requests per second @return [Hash] The API
response
# File lib/peddler/api/supply_sources_2020_07_01.rb, line 66 def update_supply_source(supply_source_id, payload: nil, rate_limit: nil) path = "/supplySources/2020-07-01/supplySources/#{supply_source_id}" body = payload put(path, body:) end
Update the status of a supply source.
@note This operation can make a static sandbox call. @param supply_source_id [String] The unique identifier of a supply source. @param payload [Hash] @param rate_limit [Float] Requests per second @return [Hash] The API
response
# File lib/peddler/api/supply_sources_2020_07_01.rb, line 92 def update_supply_source_status(supply_source_id, payload: nil, rate_limit: nil) path = "/supplySources/2020-07-01/supplySources/#{supply_source_id}/status" body = payload put(path, body:) end