class Peddler::APIs::SupplySources20200701
Selling Partner API
for Supply Sources
Manage configurations and capabilities of seller supply sources.
Public Instance Methods
Source
# File lib/peddler/apis/supply_sources_2020_07_01.rb, line 74 def archive_supply_source(supply_source_id) path = "/supplySources/2020-07-01/supplySources/#{percent_encode(supply_source_id)}" delete(path) end
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. @return [Peddler::Response] The API
response
Source
# File lib/peddler/apis/supply_sources_2020_07_01.rb, line 38 def create_supply_source(payload) path = "/supplySources/2020-07-01/supplySources" body = payload post(path, body:) 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. @return [Peddler::Response] The API
response
Source
# File lib/peddler/apis/supply_sources_2020_07_01.rb, line 50 def get_supply_source(supply_source_id) path = "/supplySources/2020-07-01/supplySources/#{percent_encode(supply_source_id)}" get(path) 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. @return [Peddler::Response] The API
response
Source
# File lib/peddler/apis/supply_sources_2020_07_01.rb, line 23 def get_supply_sources(next_page_token: nil, page_size: 10) path = "/supplySources/2020-07-01/supplySources" params = { "nextPageToken" => next_page_token, "pageSize" => page_size, }.compact get(path, params:) 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. @return [Peddler::Response] The API
response
Source
# File lib/peddler/apis/supply_sources_2020_07_01.rb, line 62 def update_supply_source(supply_source_id, payload: nil) path = "/supplySources/2020-07-01/supplySources/#{percent_encode(supply_source_id)}" body = payload put(path, body:) 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] @return [Peddler::Response] The API
response
Source
# File lib/peddler/apis/supply_sources_2020_07_01.rb, line 86 def update_supply_source_status(supply_source_id, payload: nil) path = "/supplySources/2020-07-01/supplySources/#{percent_encode(supply_source_id)}/status" 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] @return [Peddler::Response] The API
response