Module: PaymentServiceProviderClient
- Included in:
- AmazonPayClient
- Defined in:
- lib/amazon-pay-api-sdk-ruby/payment_service_provider_client.rb
Instance Method Summary collapse
-
#contest_dispute(dispute_id, payload, headers: {}) ⇒ HTTPResponse
API to contest dispute.
-
#create_dispute(payload, headers: {}) ⇒ HTTPResponse
API to create dispute.
-
#create_store(merchant_account_id, payload, headers: {}) ⇒ HTTPResponse
API to create store.
-
#get_dispute(dispute_id, headers: {}) ⇒ HTTPResponse
API to get dispute.
-
#update_dispute(dispute_id, payload, headers: {}) ⇒ HTTPResponse
API to update dispute.
-
#update_store(merchant_account_id, store_id, payload, headers: {}) ⇒ HTTPResponse
API to update store.
-
#upload_file(payload, headers: {}) ⇒ HTTPResponse
API to upload file.
Instance Method Details
#contest_dispute(dispute_id, payload, headers: {}) ⇒ HTTPResponse
API to contest dispute. The contestDispute operation is used by the partner, on behalf of the merchant, to formally contest a dispute managed by Amazon, requiring the submission of necessary evidence files within the specified Dispute Window (11 days for Chargeback, 7 days for A-Z Claims).
40 41 42 |
# File 'lib/amazon-pay-api-sdk-ruby/payment_service_provider_client.rb', line 40 def contest_dispute(dispute_id, payload, headers: {}); api_call("#{Constants::DISPUTE_URLS}/#{dispute_id}/contest", Constants::POST, payload: payload, headers: headers) end |
#create_dispute(payload, headers: {}) ⇒ HTTPResponse
API to create dispute. The createDispute operation is used to notify Amazon of a newly created chargeback dispute by a buyer on a transaction processed only by the PSP (Payment Service Provider), ensuring the dispute is properly accounted for in the Amazon Pay systems. NOTE: This API is intended to be called only by PSPs (Payment Service Providers).
9 10 11 |
# File 'lib/amazon-pay-api-sdk-ruby/payment_service_provider_client.rb', line 9 def create_dispute(payload, headers: {}); api_call(Constants::DISPUTE_URLS, Constants::POST, payload: payload, headers: headers) end |
#create_store(merchant_account_id, payload, headers: {}) ⇒ HTTPResponse
API to create store. The createStore operation is used to create a new store for a merchant account. This allows merchants to configure store-specific settings like allowed domains, redirect URLs, store name, privacy policy URL, merchant logo URL, and store status.
62 63 64 |
# File 'lib/amazon-pay-api-sdk-ruby/payment_service_provider_client.rb', line 62 def create_store(merchant_account_id, payload, headers: {}) api_call("#{Constants::MERCHANT_ACCOUNTS_BASE_URL}/#{merchant_account_id}/#{Constants::STORES_URL}", Constants::POST, payload: payload, headers: headers) end |
#get_dispute(dispute_id, headers: {}) ⇒ HTTPResponse
API to get dispute. The getDispute operation is used to retrieve details of a chargeback dispute associated with a specific order
17 18 19 |
# File 'lib/amazon-pay-api-sdk-ruby/payment_service_provider_client.rb', line 17 def get_dispute(dispute_id, headers: {}); api_call("#{Constants::DISPUTE_URLS}/#{dispute_id}", Constants::GET, headers: headers) end |
#update_dispute(dispute_id, payload, headers: {}) ⇒ HTTPResponse
API to update dispute. The updateDispute operation is used to notify Amazon of the closure status of a chargeback dispute initiated by a buyer for orders, ensuring proper accounting within the Amazon systems.
28 29 30 |
# File 'lib/amazon-pay-api-sdk-ruby/payment_service_provider_client.rb', line 28 def update_dispute(dispute_id, payload, headers: {}); api_call("#{Constants::DISPUTE_URLS}/#{dispute_id}", Constants::PATCH, payload: payload, headers: headers) end |
#update_store(merchant_account_id, store_id, payload, headers: {}) ⇒ HTTPResponse
API to update store. The updateStore operation is used to update an existing store’s configuration. This allows merchants to modify store-specific settings like allowed domains, redirect URLs, store name, privacy policy URL, merchant logo URL, and store status.
75 76 77 |
# File 'lib/amazon-pay-api-sdk-ruby/payment_service_provider_client.rb', line 75 def update_store(merchant_account_id, store_id, payload, headers: {}) api_call("#{Constants::MERCHANT_ACCOUNTS_BASE_URL}/#{merchant_account_id}/#{Constants::STORES_URL}/#{store_id}", Constants::PATCH, payload: payload, headers: headers) end |
#upload_file(payload, headers: {}) ⇒ HTTPResponse
API to upload file. The uploadFile operation is utilised to upload file-based evidence when a merchant contests a dispute, providing the necessary reference ID to the evidence file as part of the Update Dispute API process.
50 51 52 |
# File 'lib/amazon-pay-api-sdk-ruby/payment_service_provider_client.rb', line 50 def upload_file(payload, headers: {}); api_call(Constants::FILES_URLS, Constants::POST, payload: payload, headers: headers) end |