Class: AureEx::Client
- Inherits:
-
Object
- Object
- AureEx::Client
- Defined in:
- lib/aure_ex/client.rb
Overview
Facade principal da API AureEX (crypto only).
Instance Attribute Summary collapse
-
#company ⇒ Object
readonly
Returns the value of attribute company.
-
#conversions ⇒ Object
readonly
Returns the value of attribute conversions.
-
#deposits ⇒ Object
readonly
Returns the value of attribute deposits.
-
#webhooks ⇒ Object
readonly
Returns the value of attribute webhooks.
-
#withdrawals ⇒ Object
readonly
Returns the value of attribute withdrawals.
Instance Method Summary collapse
-
#initialize(api_key:, api_secret:, base_url: 'https://api.aure-ex.com/v1', max_retries: 2) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(api_key:, api_secret:, base_url: 'https://api.aure-ex.com/v1', max_retries: 2) ⇒ Client
Returns a new instance of Client.
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
# File 'lib/aure_ex/client.rb', line 150 def initialize(api_key:, api_secret:, base_url: 'https://api.aure-ex.com/v1', max_retries: 2) api_key = api_key.to_s.strip api_secret = api_secret.to_s.strip raise Error.new('api_key and api_secret are required.') if api_key.empty? || api_secret.empty? http = HttpTransport.new( api_key: api_key, api_secret: api_secret, base_url: base_url, max_retries: max_retries ) @deposits = CrudResource.new(http, '/deposits') @withdrawals = CrudResource.new(http, '/withdrawals') @webhooks = CrudResource.new(http, '/webhooks') @company = Company.new(http) @conversions = Conversions.new(http) end |
Instance Attribute Details
#company ⇒ Object (readonly)
Returns the value of attribute company.
148 149 150 |
# File 'lib/aure_ex/client.rb', line 148 def company @company end |
#conversions ⇒ Object (readonly)
Returns the value of attribute conversions.
148 149 150 |
# File 'lib/aure_ex/client.rb', line 148 def conversions @conversions end |
#deposits ⇒ Object (readonly)
Returns the value of attribute deposits.
148 149 150 |
# File 'lib/aure_ex/client.rb', line 148 def deposits @deposits end |
#webhooks ⇒ Object (readonly)
Returns the value of attribute webhooks.
148 149 150 |
# File 'lib/aure_ex/client.rb', line 148 def webhooks @webhooks end |
#withdrawals ⇒ Object (readonly)
Returns the value of attribute withdrawals.
148 149 150 |
# File 'lib/aure_ex/client.rb', line 148 def withdrawals @withdrawals end |