Class: Peddler::APIs::Transfers20240601
- Inherits:
-
Peddler::API
- Object
- Peddler::API
- Peddler::APIs::Transfers20240601
- Defined in:
- lib/peddler/apis/transfers_2024_06_01.rb,
lib/peddler/apis/transfers_2024_06_01/error.rb,
lib/peddler/apis/transfers_2024_06_01/payout.rb,
lib/peddler/apis/transfers_2024_06_01/period.rb,
lib/peddler/apis/transfers_2024_06_01/error_list.rb,
lib/peddler/apis/transfers_2024_06_01/expiry_date.rb,
lib/peddler/apis/transfers_2024_06_01/expected_payout.rb,
lib/peddler/apis/transfers_2024_06_01/partner_metadata.rb,
lib/peddler/apis/transfers_2024_06_01/related_identifier.rb,
lib/peddler/apis/transfers_2024_06_01/payment_method_list.rb,
lib/peddler/apis/transfers_2024_06_01/payout_status_entry.rb,
lib/peddler/apis/transfers_2024_06_01/related_identifiers.rb,
lib/peddler/apis/transfers_2024_06_01/list_payouts_response.rb,
lib/peddler/apis/transfers_2024_06_01/payment_method_details.rb,
lib/peddler/apis/transfers_2024_06_01/initiate_payout_request.rb,
lib/peddler/apis/transfers_2024_06_01/initiate_payout_response.rb,
lib/peddler/apis/transfers_2024_06_01/payment_method_type_list.rb,
lib/peddler/apis/transfers_2024_06_01/get_payment_methods_response.rb,
lib/peddler/apis/transfers_2024_06_01/list_expected_payouts_response.rb,
sig/peddler/apis/transfers_2024_06_01.rbs
Overview
The Selling Partner API for Transfers.
The Selling Partner API for Transfers enables selling partners to retrieve payment methods and initiate payouts for their seller accounts. This API supports the following marketplaces: DE, FR, IT, ES, SE, NL, PL, and BE.
Defined Under Namespace
Classes: Error, ErrorList, ExpectedPayout, ExpiryDate, GetPaymentMethodsResponse, InitiatePayoutRequest, InitiatePayoutResponse, ListExpectedPayoutsResponse, ListPayoutsResponse, PartnerMetadata, PaymentMethodDetails, PaymentMethodList, PaymentMethodTypeList, Payout, PayoutStatusEntry, Period, RelatedIdentifier, RelatedIdentifiers
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
-
#get_payment_methods(marketplace_id, payment_method_types: nil, rate_limit: 0.5) ⇒ Peddler::Response
Returns the list of payment methods for the seller, which can be filtered by method type.
-
#initiate_payout(body, rate_limit: 0.017) ⇒ Peddler::Response
Initiates an on-demand payout to the seller's default deposit method in Seller Central for the given
marketplaceIdandaccountType, if eligible. -
#list_expected_payouts(marketplace_ids: nil, account_type: nil, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response
Returns the upcoming expected payouts from Amazon associated with a partner's account for the specified parameters.
-
#list_payouts(marketplace_ids: nil, created_after: nil, created_before: nil, payout_id: nil, account_type: nil, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response
Retrieve a list of payouts for the selling partner's account.
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
#get_payment_methods(marketplace_id, payment_method_types: nil, rate_limit: 0.5) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns the list of payment methods for the seller, which can be filtered by method type.
78 79 80 81 82 83 84 85 86 |
# File 'lib/peddler/apis/transfers_2024_06_01.rb', line 78 def get_payment_methods(marketplace_id, payment_method_types: nil, rate_limit: 0.5) path = "/finances/transfers/2024-06-01/paymentMethods" params = { "marketplaceId" => marketplace_id, "paymentMethodTypes" => stringify_array(payment_method_types), }.compact parser = -> { GetPaymentMethodsResponse } get(path, params:, rate_limit:, parser:) end |
#initiate_payout(body, rate_limit: 0.017) ⇒ Peddler::Response
This operation can make a static sandbox call.
Initiates an on-demand payout to the seller's default deposit method in Seller Central for the given
marketplaceId and accountType, if eligible. You can only initiate one on-demand payout for each marketplace
and account type within a 24-hour period.
22 23 24 25 26 |
# File 'lib/peddler/apis/transfers_2024_06_01.rb', line 22 def initiate_payout(body, rate_limit: 0.017) path = "/finances/transfers/2024-06-01/payouts" parser = -> { InitiatePayoutResponse } post(path, body:, rate_limit:, parser:) end |
#list_expected_payouts(marketplace_ids: nil, account_type: nil, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns the upcoming expected payouts from Amazon associated with a partner's account for the specified parameters.
103 104 105 106 107 108 109 110 111 112 |
# File 'lib/peddler/apis/transfers_2024_06_01.rb', line 103 def list_expected_payouts(marketplace_ids: nil, account_type: nil, next_token: nil, rate_limit: 0.5) path = "/finances/transfers/2024-06-01/payouts/expected" params = { "marketplaceIds" => stringify_array(marketplace_ids), "accountType" => account_type, "nextToken" => next_token, }.compact parser = -> { ListExpectedPayoutsResponse } get(path, params:, rate_limit:, parser:) end |
#list_payouts(marketplace_ids: nil, created_after: nil, created_before: nil, payout_id: nil, account_type: nil, next_token: nil, rate_limit: 0.5) ⇒ Peddler::Response
This operation can make a static sandbox call.
Retrieve a list of payouts for the selling partner's account. You can filter results by marketplaceIds,
accountType, date range (createdAfter and createdBefore), or a specific payoutId. By default, the
response includes payouts for all available marketplaces and account types. Results are grouped by the seller's
account groups. Within each account group results are sorted by their creation date, with the most recent
appearing first.
53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/peddler/apis/transfers_2024_06_01.rb', line 53 def list_payouts(marketplace_ids: nil, created_after: nil, created_before: nil, payout_id: nil, account_type: nil, next_token: nil, rate_limit: 0.5) path = "/finances/transfers/2024-06-01/payouts" params = { "marketplaceIds" => stringify_array(marketplace_ids), "createdAfter" => created_after, "createdBefore" => created_before, "payoutId" => payout_id, "accountType" => account_type, "nextToken" => next_token, }.compact parser = -> { ListPayoutsResponse } get(path, params:, rate_limit:, parser:) end |