Class: Bcash::Client

Inherits:
Object
  • Object
show all
Includes:
Api::Accounts, Helpers::Request, HTTParty
Defined in:
lib/bcash/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#emailObject (readonly)

Returns the value of attribute email.



14
15
16
# File 'lib/bcash/client.rb', line 14

def email
  @email
end

#keyObject (readonly)

Returns the value of attribute key.



14
15
16
# File 'lib/bcash/client.rb', line 14

def key
  @key
end

#tokenObject (readonly)

Returns the value of attribute token.



14
15
16
# File 'lib/bcash/client.rb', line 14

def token
  @token
end