Class: IletimerkeziSdk::Services::AccountService
- Inherits:
-
Object
- Object
- IletimerkeziSdk::Services::AccountService
- Defined in:
- lib/iletimerkezi_sdk/services/account_service.rb
Instance Method Summary collapse
- #balance ⇒ Object
-
#initialize(http_client, api_key, api_hash) ⇒ AccountService
constructor
A new instance of AccountService.
Constructor Details
#initialize(http_client, api_key, api_hash) ⇒ AccountService
Returns a new instance of AccountService.
4 5 6 7 8 |
# File 'lib/iletimerkezi_sdk/services/account_service.rb', line 4 def initialize(http_client, api_key, api_hash) @http_client = http_client @api_key = api_key @api_hash = api_hash end |
Instance Method Details
#balance ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/iletimerkezi_sdk/services/account_service.rb', line 10 def balance payload = { request: { authentication: { key: @api_key, hash: @api_hash } } } response = @http_client.post('get-balance/json', json: payload) Responses::AccountResponse.new(response[:body], response[:status]) end |