Class: Remitano::Client::MerchantCharges
- Inherits:
-
Object
- Object
- Remitano::Client::MerchantCharges
- Defined in:
- lib/remitano/client/merchant_charges.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #create(coin_currency:, coin_amount:, cancelled_or_completed_callback_url:, description: nil) ⇒ Object
- #get(id) ⇒ Object
-
#initialize(config:) ⇒ MerchantCharges
constructor
A new instance of MerchantCharges.
Constructor Details
#initialize(config:) ⇒ MerchantCharges
Returns a new instance of MerchantCharges.
7 8 9 |
# File 'lib/remitano/client/merchant_charges.rb', line 7 def initialize(config:) @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
5 6 7 |
# File 'lib/remitano/client/merchant_charges.rb', line 5 def config @config end |
Instance Method Details
#create(coin_currency:, coin_amount:, cancelled_or_completed_callback_url:, description: nil) ⇒ Object
15 16 17 18 19 20 21 22 23 |
# File 'lib/remitano/client/merchant_charges.rb', line 15 def create(coin_currency:, coin_amount:, cancelled_or_completed_callback_url:, description: nil) config.net.post( "/merchant/merchant_charges", coin_currency: coin_currency, coin_amount: coin_amount, cancelled_or_completed_callback_url: cancelled_or_completed_callback_url, description: description ).execute end |
#get(id) ⇒ Object
11 12 13 |
# File 'lib/remitano/client/merchant_charges.rb', line 11 def get(id) config.net.get("/merchant/merchant_charges/#{id}").execute end |