Class: Peddler::APIs::SellerWallet20240301
- Inherits:
-
Peddler::API
- Object
- Peddler::API
- Peddler::APIs::SellerWallet20240301
- Defined in:
- lib/peddler/apis/seller_wallet_2024_03_01.rb
Overview
The Selling Partner API for Amazon Seller Wallet Open Banking API Spec.
For more information, refer to the Seller Wallet Open Banking API Use Case Guide.
The Selling Partner API for Seller Wallet (Seller Wallet API) provides financial information that is relevant to a seller's Seller Wallet account. You can obtain financial events, balances, and transfer schedules for Seller Wallet accounts. You can also schedule and initiate transactions.
Instance Attribute Summary
Attributes inherited from Peddler::API
#access_token, #endpoint, #parser, #retries
Instance Method Summary collapse
-
#create_transaction(body, dest_account_digital_signature, amount_digital_signature, marketplace_id) ⇒ Peddler::Response
Create a transaction request from a Seller Wallet account to another customer-provided account.
-
#create_transfer_schedule(body, dest_account_digital_signature, amount_digital_signature, marketplace_id) ⇒ Peddler::Response
Create a transfer schedule request from a Seller Wallet account to another customer-provided account.
-
#delete_schedule_transaction(transfer_schedule_id, marketplace_id) ⇒ Peddler::Response
Delete a transaction request that is scheduled from Amazon Seller Wallet account to another customer-provided account.
-
#get_account(account_id, marketplace_id) ⇒ Peddler::Response
Retrieve a Seller Wallet bank account by Amazon account identifier.
-
#get_transaction(transaction_id, marketplace_id) ⇒ Peddler::Response
Returns a transaction.
-
#get_transfer_preview(source_country_code, source_currency_code, destination_country_code, destination_currency_code, base_amount, marketplace_id) ⇒ Peddler::Response
Returns list of potential fees on a transaction based on the source and destination country currency code.
-
#get_transfer_schedule(transfer_schedule_id, marketplace_id) ⇒ Peddler::Response
Find a particular Amazon Seller Wallet account transfer schedule.
-
#list_account_balances(account_id, marketplace_id) ⇒ Peddler::Response
Retrieve the balance in a given Seller Wallet bank account.
-
#list_account_transactions(account_id, marketplace_id, next_page_token: nil) ⇒ Peddler::Response
Retrieve a list of transactions for a given Seller Wallet bank account.
-
#list_accounts(marketplace_id) ⇒ Peddler::Response
Get Seller Wallet accounts for a seller.
-
#list_transfer_schedules(account_id, marketplace_id, next_page_token: nil) ⇒ Peddler::Response
Retrieve transfer schedules of a Seller Wallet bank account.
-
#update_transfer_schedule(body, dest_account_digital_signature, amount_digital_signature, marketplace_id) ⇒ Peddler::Response
Returns a transfer belonging to the updated scheduled transfer request.
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
#create_transaction(body, dest_account_digital_signature, amount_digital_signature, marketplace_id) ⇒ Peddler::Response
This operation can make a static sandbox call.
Create a transaction request from a Seller Wallet account to another customer-provided account.
132 133 134 135 136 137 138 139 |
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 132 def create_transaction(body, dest_account_digital_signature, amount_digital_signature, marketplace_id) path = "/finances/transfers/wallet/2024-03-01/transactions" params = { "marketplaceId" => marketplace_id, }.compact post(path, body:, params:) end |
#create_transfer_schedule(body, dest_account_digital_signature, amount_digital_signature, marketplace_id) ⇒ Peddler::Response
This operation can make a static sandbox call.
Create a transfer schedule request from a Seller Wallet account to another customer-provided account.
188 189 190 191 192 193 194 195 |
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 188 def create_transfer_schedule(body, dest_account_digital_signature, amount_digital_signature, marketplace_id) path = "/finances/transfers/wallet/2024-03-01/transferSchedules" params = { "marketplaceId" => marketplace_id, }.compact post(path, body:, params:) end |
#delete_schedule_transaction(transfer_schedule_id, marketplace_id) ⇒ Peddler::Response
This operation can make a static sandbox call.
Delete a transaction request that is scheduled from Amazon Seller Wallet account to another customer-provided account.
242 243 244 245 246 247 248 249 |
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 242 def delete_schedule_transaction(transfer_schedule_id, marketplace_id) path = "/finances/transfers/wallet/2024-03-01/transferSchedules/#{percent_encode(transfer_schedule_id)}" params = { "marketplaceId" => marketplace_id, }.compact delete(path, params:) end |
#get_account(account_id, marketplace_id) ⇒ Peddler::Response
This operation can make a static sandbox call.
Retrieve a Seller Wallet bank account by Amazon account identifier.
44 45 46 47 48 49 50 51 |
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 44 def get_account(account_id, marketplace_id) path = "/finances/transfers/wallet/2024-03-01/accounts/#{percent_encode(account_id)}" params = { "marketplaceId" => marketplace_id, }.compact get(path, params:) end |
#get_transaction(transaction_id, marketplace_id) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns a transaction
149 150 151 152 153 154 155 156 |
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 149 def get_transaction(transaction_id, marketplace_id) path = "/finances/transfers/wallet/2024-03-01/transactions/#{percent_encode(transaction_id)}" params = { "marketplaceId" => marketplace_id, }.compact get(path, params:) end |
#get_transfer_preview(source_country_code, source_currency_code, destination_country_code, destination_currency_code, base_amount, marketplace_id) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns list of potential fees on a transaction based on the source and destination country currency code
87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 87 def get_transfer_preview(source_country_code, source_currency_code, destination_country_code, destination_currency_code, base_amount, marketplace_id) path = "/finances/transfers/wallet/2024-03-01/transferPreview" params = { "sourceCountryCode" => source_country_code, "sourceCurrencyCode" => source_currency_code, "destinationCountryCode" => destination_country_code, "destinationCurrencyCode" => destination_currency_code, "baseAmount" => base_amount, "marketplaceId" => marketplace_id, }.compact get(path, params:) end |
#get_transfer_schedule(transfer_schedule_id, marketplace_id) ⇒ Peddler::Response
This operation can make a static sandbox call.
Find a particular Amazon Seller Wallet account transfer schedule.
224 225 226 227 228 229 230 231 |
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 224 def get_transfer_schedule(transfer_schedule_id, marketplace_id) path = "/finances/transfers/wallet/2024-03-01/transferSchedules/#{percent_encode(transfer_schedule_id)}" params = { "marketplaceId" => marketplace_id, }.compact get(path, params:) end |
#list_account_balances(account_id, marketplace_id) ⇒ Peddler::Response
This operation can make a static sandbox call.
Retrieve the balance in a given Seller Wallet bank account.
61 62 63 64 65 66 67 68 |
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 61 def list_account_balances(account_id, marketplace_id) path = "/finances/transfers/wallet/2024-03-01/accounts/#{percent_encode(account_id)}/balance" params = { "marketplaceId" => marketplace_id, }.compact get(path, params:) end |
#list_account_transactions(account_id, marketplace_id, next_page_token: nil) ⇒ Peddler::Response
This operation can make a static sandbox call.
Retrieve a list of transactions for a given Seller Wallet bank account.
111 112 113 114 115 116 117 118 119 120 |
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 111 def list_account_transactions(account_id, marketplace_id, next_page_token: nil) path = "/finances/transfers/wallet/2024-03-01/transactions" params = { "accountId" => account_id, "nextPageToken" => next_page_token, "marketplaceId" => marketplace_id, }.compact get(path, params:) end |
#list_accounts(marketplace_id) ⇒ Peddler::Response
This operation can make a static sandbox call.
Get Seller Wallet accounts for a seller.
27 28 29 30 31 32 33 34 |
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 27 def list_accounts(marketplace_id) path = "/finances/transfers/wallet/2024-03-01/accounts" params = { "marketplaceId" => marketplace_id, }.compact get(path, params:) end |
#list_transfer_schedules(account_id, marketplace_id, next_page_token: nil) ⇒ Peddler::Response
This operation can make a static sandbox call.
Retrieve transfer schedules of a Seller Wallet bank account.
167 168 169 170 171 172 173 174 175 176 |
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 167 def list_transfer_schedules(account_id, marketplace_id, next_page_token: nil) path = "/finances/transfers/wallet/2024-03-01/transferSchedules" params = { "accountId" => account_id, "marketplaceId" => marketplace_id, "nextPageToken" => next_page_token, }.compact get(path, params:) end |
#update_transfer_schedule(body, dest_account_digital_signature, amount_digital_signature, marketplace_id) ⇒ Peddler::Response
This operation can make a static sandbox call.
Returns a transfer belonging to the updated scheduled transfer request
207 208 209 210 211 212 213 214 |
# File 'lib/peddler/apis/seller_wallet_2024_03_01.rb', line 207 def update_transfer_schedule(body, dest_account_digital_signature, amount_digital_signature, marketplace_id) path = "/finances/transfers/wallet/2024-03-01/transferSchedules" params = { "marketplaceId" => marketplace_id, }.compact put(path, body:, params:) end |