Class: Peddler::APIs::SupplySources20200701
- Inherits:
-
Peddler::API
- Object
- Peddler::API
- Peddler::APIs::SupplySources20200701
- Defined in:
- lib/peddler/apis/supply_sources_2020_07_01.rb
Overview
Selling Partner API for Supply Sources
Manage configurations and capabilities of seller supply sources.
Instance Attribute Summary
Attributes inherited from Peddler::API
#access_token, #endpoint, #parser
Instance Method Summary collapse
-
#archive_supply_source(supply_source_id, rate_limit: nil) ⇒ Peddler::Response
Archive a supply source, making it inactive.
-
#create_supply_source(payload, rate_limit: nil) ⇒ Peddler::Response
Create a new supply source.
-
#get_supply_source(supply_source_id, rate_limit: nil) ⇒ Peddler::Response
Retrieve a supply source.
-
#get_supply_sources(next_page_token: nil, page_size: 10, rate_limit: nil) ⇒ Peddler::Response
The path to retrieve paginated supply sources.
-
#update_supply_source(supply_source_id, payload: nil, rate_limit: nil) ⇒ Peddler::Response
Update the configuration and capabilities of a supply source.
-
#update_supply_source_status(supply_source_id, payload: nil, rate_limit: nil) ⇒ Peddler::Response
Update the status of a supply source.
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
#archive_supply_source(supply_source_id, rate_limit: nil) ⇒ Peddler::Response
This operation can make a static sandbox call.
Archive a supply source, making it inactive. Cannot be undone.
79 80 81 82 83 |
# File 'lib/peddler/apis/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_supply_source(payload, rate_limit: nil) ⇒ Peddler::Response
This operation can make a static sandbox call.
Create a new supply source.
40 41 42 43 44 45 |
# File 'lib/peddler/apis/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 |
#get_supply_source(supply_source_id, rate_limit: nil) ⇒ Peddler::Response
This operation can make a static sandbox call.
Retrieve a supply source.
53 54 55 56 57 |
# File 'lib/peddler/apis/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 |
#get_supply_sources(next_page_token: nil, page_size: 10, rate_limit: nil) ⇒ Peddler::Response
This operation can make a static sandbox call.
The path to retrieve paginated supply sources.
24 25 26 27 28 29 30 31 32 |
# File 'lib/peddler/apis/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_supply_source(supply_source_id, payload: nil, rate_limit: nil) ⇒ Peddler::Response
This operation can make a static sandbox call.
Update the configuration and capabilities of a supply source.
66 67 68 69 70 71 |
# File 'lib/peddler/apis/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_supply_source_status(supply_source_id, payload: nil, rate_limit: nil) ⇒ Peddler::Response
This operation can make a static sandbox call.
Update the status of a supply source.
92 93 94 95 96 97 |
# File 'lib/peddler/apis/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 |