Class: Peddler::APIs::Finances20240601
- Inherits:
-
Peddler::API
- Object
- Peddler::API
- Peddler::APIs::Finances20240601
- Defined in:
- lib/peddler/apis/finances_2024_06_01.rb
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.
Instance Attribute Summary
Attributes inherited from Peddler::API
#access_token, #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 ‘marketplaceId` and `accountType`, if eligible.
Methods inherited from Peddler::API
#endpoint_uri, #http, #initialize, #meter, #retriable, #sandbox, #sandbox?, #typed, #typed?, #use, #via
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.
46 47 48 49 50 51 52 53 54 |
# File 'lib/peddler/apis/finances_2024_06_01.rb', line 46 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 = Peddler::Types::Finances20240601::GetPaymentMethodsResponse if typed? meter(rate_limit).get(path, params:, 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.
30 31 32 33 34 |
# File 'lib/peddler/apis/finances_2024_06_01.rb', line 30 def initiate_payout(body, rate_limit: 0.017) path = "/finances/transfers/2024-06-01/payouts" parser = Peddler::Types::Finances20240601::InitiatePayoutResponse if typed? meter(rate_limit).post(path, body:, parser:) end |