Class: Peddler::APIs::FinancesV0
- Inherits:
-
Peddler::API
- Object
- Peddler::API
- Peddler::APIs::FinancesV0
- Defined in:
- lib/peddler/apis/finances_v0.rb
Overview
Selling Partner API for Finances
The Selling Partner API for Finances provides financial information that is relevant to a seller's business. You can obtain financial events for a given order, financial event group, or date range without having to wait until a statement period closes. You can also obtain financial event groups for a given date range.
Instance Attribute Summary
Attributes inherited from Peddler::API
#access_token, #endpoint, #parser
Instance Method Summary collapse
-
#list_financial_event_groups(max_results_per_page: 10, financial_event_group_started_before: nil, financial_event_group_started_after: nil, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response
Returns financial event groups for a given date range.
-
#list_financial_events(max_results_per_page: 100, posted_after: nil, posted_before: nil, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response
Returns financial events for the specified data range.
-
#list_financial_events_by_group_id(event_group_id, max_results_per_page: 100, posted_after: nil, posted_before: nil, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response
Returns all financial events for the specified financial event group.
-
#list_financial_events_by_order_id(order_id, max_results_per_page: 100, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response
Returns all financial events for the specified order.
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
#list_financial_event_groups(max_results_per_page: 10, financial_event_group_started_before: nil, financial_event_group_started_after: nil, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns financial event groups for a given date range. Orders from the last 48 hours might not be included in financial events.
40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/peddler/apis/finances_v0.rb', line 40 def list_financial_event_groups(max_results_per_page: 10, financial_event_group_started_before: nil, financial_event_group_started_after: nil, next_token: nil, rate_limit: 0.5) path = "/finances/v0/financialEventGroups" params = { "MaxResultsPerPage" => max_results_per_page, "FinancialEventGroupStartedBefore" => financial_event_group_started_before, "FinancialEventGroupStartedAfter" => financial_event_group_started_after, "NextToken" => next_token, }.compact meter(rate_limit).get(path, params:) end |
#list_financial_events(max_results_per_page: 100, posted_after: nil, posted_before: nil, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns financial events for the specified data range. Orders from the last 48 hours might not be included in
financial events. Note: in ListFinancialEvents
, deferred events don't show up in responses until in they
are released.
134 135 136 137 138 139 140 141 142 143 144 145 |
# File 'lib/peddler/apis/finances_v0.rb', line 134 def list_financial_events(max_results_per_page: 100, posted_after: nil, posted_before: nil, next_token: nil, rate_limit: 0.5) path = "/finances/v0/financialEvents" params = { "MaxResultsPerPage" => max_results_per_page, "PostedAfter" => posted_after, "PostedBefore" => posted_before, "NextToken" => next_token, }.compact meter(rate_limit).get(path, params:) end |
#list_financial_events_by_group_id(event_group_id, max_results_per_page: 100, posted_after: nil, posted_before: nil, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns all financial events for the specified financial event group. Orders from the last 48 hours might not be included in financial events. Note: This operation only retrieves a group's data for the past two years. A request for data spanning more than two years produces an empty response.
76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/peddler/apis/finances_v0.rb', line 76 def list_financial_events_by_group_id(event_group_id, max_results_per_page: 100, posted_after: nil, posted_before: nil, next_token: nil, rate_limit: 0.5) path = "/finances/v0/financialEventGroups/#{event_group_id}/financialEvents" params = { "MaxResultsPerPage" => max_results_per_page, "PostedAfter" => posted_after, "PostedBefore" => posted_before, "NextToken" => next_token, }.compact meter(rate_limit).get(path, params:) end |
#list_financial_events_by_order_id(order_id, max_results_per_page: 100, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns all financial events for the specified order. Orders from the last 48 hours might not be included in financial events.
102 103 104 105 106 107 108 109 110 |
# File 'lib/peddler/apis/finances_v0.rb', line 102 def list_financial_events_by_order_id(order_id, max_results_per_page: 100, next_token: nil, rate_limit: 0.5) path = "/finances/v0/orders/#{order_id}/financialEvents" params = { "MaxResultsPerPage" => max_results_per_page, "NextToken" => next_token, }.compact meter(rate_limit).get(path, params:) end |