Class: Peddler::APIs::Finances20240619
- Inherits:
-
Peddler::API
- Object
- Peddler::API
- Peddler::APIs::Finances20240619
- Defined in:
- lib/peddler/apis/finances_2024_06_19.rb,
lib/peddler/apis/finances_2024_06_19/item.rb,
lib/peddler/apis/finances_2024_06_19/error.rb,
lib/peddler/apis/finances_2024_06_19/items.rb,
lib/peddler/apis/finances_2024_06_19/balance.rb,
lib/peddler/apis/finances_2024_06_19/context.rb,
lib/peddler/apis/finances_2024_06_19/summary.rb,
lib/peddler/apis/finances_2024_06_19/balances.rb,
lib/peddler/apis/finances_2024_06_19/contexts.rb,
lib/peddler/apis/finances_2024_06_19/breakdown.rb,
lib/peddler/apis/finances_2024_06_19/breakdowns.rb,
lib/peddler/apis/finances_2024_06_19/error_list.rb,
lib/peddler/apis/finances_2024_06_19/transaction.rb,
lib/peddler/apis/finances_2024_06_19/transactions.rb,
lib/peddler/apis/finances_2024_06_19/product_context.rb,
lib/peddler/apis/finances_2024_06_19/business_context.rb,
lib/peddler/apis/finances_2024_06_19/deferred_context.rb,
lib/peddler/apis/finances_2024_06_19/partner_metadata.rb,
lib/peddler/apis/finances_2024_06_19/payments_context.rb,
lib/peddler/apis/finances_2024_06_19/summary_response.rb,
lib/peddler/apis/finances_2024_06_19/amazon_pay_context.rb,
lib/peddler/apis/finances_2024_06_19/related_identifier.rb,
lib/peddler/apis/finances_2024_06_19/time_range_context.rb,
lib/peddler/apis/finances_2024_06_19/marketplace_details.rb,
lib/peddler/apis/finances_2024_06_19/related_identifiers.rb,
lib/peddler/apis/finances_2024_06_19/transactions_payload.rb,
lib/peddler/apis/finances_2024_06_19/list_balances_response.rb,
lib/peddler/apis/finances_2024_06_19/item_related_identifier.rb,
lib/peddler/apis/finances_2024_06_19/item_related_identifiers.rb,
lib/peddler/apis/finances_2024_06_19/selling_partner_metadata.rb,
lib/peddler/apis/finances_2024_06_19/list_transactions_response.rb,
sig/peddler/apis/finances_2024_06_19.rbs
Overview
The Selling Partner API for Finances
The Selling Partner API for Finances provides financial information relevant to a seller's business. You can obtain financial events for a given order or date range without having to wait until a statement period closes.
Defined Under Namespace
Classes: AmazonPayContext, Balance, Balances, Breakdown, Breakdowns, BusinessContext, Context, Contexts, DeferredContext, Error, ErrorList, Item, ItemRelatedIdentifier, ItemRelatedIdentifiers, Items, ListBalancesResponse, ListTransactionsResponse, MarketplaceDetails, PartnerMetadata, PaymentsContext, ProductContext, RelatedIdentifier, RelatedIdentifiers, SellingPartnerMetadata, Summary, SummaryResponse, TimeRangeContext, Transaction, Transactions, TransactionsPayload
Constant Summary
Constants inherited from Peddler::API
Peddler::API::TRANSIENT_STATUSES
Instance Attribute Summary
Attributes inherited from Peddler::API
#access_token, #base_url, #endpoint, #retries
Instance Method Summary collapse
-
#list_balances(marketplace_ids: nil, balance_type: nil, account_type: nil, as_of_date: nil, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response
Retrieve a balance.
-
#list_summary(marketplace_ids: nil, account_type: nil, related_identifier_name: nil, related_identifier_value: nil, period_start: nil, period_end: nil, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response
Retrieve the financial summary for the specified time period or settlement period.
-
#list_transactions(posted_after: nil, posted_before: nil, marketplace_id: nil, transaction_status: nil, related_identifier_name: nil, related_identifier_value: nil, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response
Returns transactions for the given parameters.
Methods inherited from Peddler::API
#cannot_sandbox!, #delete, #endpoint_uri, #get, #host_header, #http, #initialize, #must_sandbox!, #parse_base_url, #patch, #percent_encode, #post, #put, #request, #sandbox, #sandbox?, #stringify_array, #timestamp, #user_agent
Constructor Details
This class inherits a constructor from Peddler::API
Instance Method Details
#list_balances(marketplace_ids: nil, balance_type: nil, account_type: nil, as_of_date: nil, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response
This operation can make a static sandbox call.
Retrieve a balance. This balance can be a past balances at a specified date, or a current balance. Sub-balances are listed by account type and marketplace.
81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/peddler/apis/finances_2024_06_19.rb', line 81 def list_balances(marketplace_ids: nil, balance_type: nil, account_type: nil, as_of_date: nil, next_token: nil, rate_limit: 0.5) path = "/finances/2024-06-19/balances" params = { "marketplaceIds" => stringify_array(marketplace_ids), "balanceType" => balance_type, "accountType" => account_type, "asOfDate" => as_of_date, "nextToken" => next_token, }.compact parser = -> { ListBalancesResponse } get(path, params:, rate_limit:, parser:) end |
#list_summary(marketplace_ids: nil, account_type: nil, related_identifier_name: nil, related_identifier_value: nil, period_start: nil, period_end: nil, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response
This operation can make a static sandbox call.
Retrieve the financial summary for the specified time period or settlement period.
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/peddler/apis/finances_2024_06_19.rb', line 117 def list_summary(marketplace_ids: nil, account_type: nil, related_identifier_name: nil, related_identifier_value: nil, period_start: nil, period_end: nil, next_token: nil, rate_limit: 0.5) path = "/finances/2024-06-19/summary" params = { "marketplaceIds" => stringify_array(marketplace_ids), "accountType" => account_type, "relatedIdentifierName" => , "relatedIdentifierValue" => , "periodStart" => period_start, "periodEnd" => period_end, "nextToken" => next_token, }.compact parser = -> { SummaryResponse } get(path, params:, rate_limit:, parser:) end |
#list_transactions(posted_after: nil, posted_before: nil, marketplace_id: nil, transaction_status: nil, related_identifier_name: nil, related_identifier_value: nil, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns transactions for the given parameters. Financial events might not include orders from the last 48 hours.
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/peddler/apis/finances_2024_06_19.rb', line 45 def list_transactions(posted_after: nil, posted_before: nil, marketplace_id: nil, transaction_status: nil, related_identifier_name: nil, related_identifier_value: nil, next_token: nil, rate_limit: 0.5) path = "/finances/2024-06-19/transactions" params = { "postedAfter" => posted_after, "postedBefore" => posted_before, "marketplaceId" => marketplace_id, "transactionStatus" => transaction_status, "relatedIdentifierName" => , "relatedIdentifierValue" => , "nextToken" => next_token, }.compact parser = -> { ListTransactionsResponse } get(path, params:, rate_limit:, parser:) end |