Class: Bcash::Client
- Inherits:
-
Object
- Object
- Bcash::Client
- Includes:
- Api::Accounts, Helpers::Request, HTTParty
- Defined in:
- lib/bcash/client.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#token ⇒ Object
readonly
Returns the value of attribute token.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Client
constructor
A new instance of Client.
Methods included from Api::Accounts
#create_account, #search_account_by_cpf
Constructor Details
#initialize(opts = {}) ⇒ Client
Returns a new instance of Client.
16 17 18 19 20 21 |
# File 'lib/bcash/client.rb', line 16 def initialize(opts={}) opts = { token: Bcash.token, key: Bcash.key, email: Bcash.email }.merge(opts) @token = opts[:token] @key = opts[:key] @email = opts[:email] end |
Instance Attribute Details
#email ⇒ Object (readonly)
Returns the value of attribute email.
14 15 16 |
# File 'lib/bcash/client.rb', line 14 def email @email end |
#key ⇒ Object (readonly)
Returns the value of attribute key.
14 15 16 |
# File 'lib/bcash/client.rb', line 14 def key @key end |
#token ⇒ Object (readonly)
Returns the value of attribute token.
14 15 16 |
# File 'lib/bcash/client.rb', line 14 def token @token end |