Class: AmazonPay::AmazonInStoreClient
- Inherits:
-
AmazonPayClient
- Object
- AmazonPayClient
- AmazonPay::AmazonInStoreClient
- Defined in:
- lib/amazon_pay/amazon_in_store_client.rb
Overview
Class for Amazon Web Store
Instance Method Summary collapse
-
#charge(payload: nil, headers: nil) ⇒ Object
API to create Charge to the buyer - Creates a charge to the buyer with the requested amount.
-
#initialize(config_args) ⇒ AmazonInStoreClient
constructor
A new instance of AmazonInStoreClient.
-
#merchant_scan(payload: nil, headers: nil) ⇒ Object
API to initiate a purchase with a merchant - Initiates a purchase with a merchant.
-
#refund(payload: nil, headers: nil) ⇒ Object
API to create a Refund to the buyer - Refunds an amount that was previously charged to the buyer.
Methods inherited from AmazonPayClient
#api_call, #delivery_trackers, #generate_button_signature, #get_authorization_token, #get_signed_headers
Constructor Details
#initialize(config_args) ⇒ AmazonInStoreClient
Returns a new instance of AmazonInStoreClient.
4 5 6 |
# File 'lib/amazon_pay/amazon_in_store_client.rb', line 4 def initialize(config_args) super(config_args) end |
Instance Method Details
#charge(payload: nil, headers: nil) ⇒ Object
API to create Charge to the buyer
- Creates a charge to the buyer with the requested amount.
29 30 31 32 33 34 35 36 |
# File 'lib/amazon_pay/amazon_in_store_client.rb', line 29 def charge(payload: nil, headers: nil) api_call(options: { method: 'POST', url_fragment: 'in-store/charge', payload: payload, headers: headers }) end |
#merchant_scan(payload: nil, headers: nil) ⇒ Object
API to initiate a purchase with a merchant
- Initiates a purchase with a merchant.
14 15 16 17 18 19 20 21 |
# File 'lib/amazon_pay/amazon_in_store_client.rb', line 14 def merchant_scan(payload: nil, headers: nil) api_call(options: { method: 'POST', url_fragment: 'in-store/merchantScan', payload: payload, headers: headers }) end |
#refund(payload: nil, headers: nil) ⇒ Object
API to create a Refund to the buyer
- Refunds an amount that was previously charged to the buyer.
44 45 46 47 48 49 50 51 |
# File 'lib/amazon_pay/amazon_in_store_client.rb', line 44 def refund(payload: nil, headers: nil) api_call(options: { method: 'POST', url_fragment: 'in-store/refund', payload: payload, headers: headers }) end |