Class: Bcash::Client

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

Constant Summary

Constants included from Api::FindTransaction

Api::FindTransaction::URL

Constants included from Api::VerifyReturn

Api::VerifyReturn::VERIFY_URL

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Api::FindTransaction

#find_by_order_id, #find_by_transaction_id

Methods included from Api::VerifyReturn

#verify_return

Methods included from Api::Accounts

#create_account, #search_account_by_cpf

Constructor Details

#initialize(opts = {}) ⇒ Client

Returns a new instance of Client.



18
19
20
21
22
23
# File 'lib/bcash/client.rb', line 18

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.



16
17
18
# File 'lib/bcash/client.rb', line 16

def email
  @email
end

#keyObject (readonly)

Returns the value of attribute key.



16
17
18
# File 'lib/bcash/client.rb', line 16

def key
  @key
end

#tokenObject (readonly)

Returns the value of attribute token.



16
17
18
# File 'lib/bcash/client.rb', line 16

def token
  @token
end