Class: MonoMerchant::Wallet::List

Inherits:
ApiRequest show all
Defined in:
lib/mono-merchant/wallet/list.rb

Constant Summary

Constants inherited from ApiRequest

ApiRequest::API_URL, ApiRequest::DEFAULT_CURRENCY

Instance Attribute Summary collapse

Attributes inherited from ApiRequest

#errors, #type

Instance Method Summary collapse

Constructor Details

#initialize(wallet_id = nil) ⇒ List

Returns a new instance of List.

Parameters:

  • wallet_id (String) (defaults to: nil)
    • wallet id



8
9
10
11
# File 'lib/mono-merchant/wallet/list.rb', line 8

def initialize(wallet_id = nil)
  @wallet_id = wallet_id
  super(type: :get)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class MonoMerchant::ApiRequest

Instance Attribute Details

#wallet_idObject (readonly)

Returns the value of attribute wallet_id.



5
6
7
# File 'lib/mono-merchant/wallet/list.rb', line 5

def wallet_id
  @wallet_id
end

Instance Method Details

#urlObject



13
14
15
# File 'lib/mono-merchant/wallet/list.rb', line 13

def url
  "#{API_URL}/merchant/wallet/#{url_query}"
end