Class: Telleroo::Client

Inherits:
Object
  • Object
show all
Includes:
API, Connection, Request
Defined in:
lib/telleroo/client.rb

Overview

Client for the Telleroo API

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from API::Transactions

#get_transaction, #transactions

Methods included from API::BankTransfers

#create_adhoc_transfer, #create_transfer

Methods included from API::Recipients

#create_recipient, #delete_recipient, #get_recipient, #recipients

Methods included from API::Accounts

#accounts

Methods included from Request

#delete, #get, #post

Constructor Details

#initialize(options = {}) {|_self| ... } ⇒ Telleroo::Client

Initializes a new Client object

Parameters:

  • options (Hash) (defaults to: {})

Yields:

  • (_self)

Yield Parameters:



20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/telleroo/client.rb', line 20

def initialize(options = {})
  # Merge the config values from the module and those passed
  # to the client.
  merged_options = Telleroo.config.options.merge(options)

  # Copy the merged values to this client and ignore those
  # not part of our configuration
  Configuration::VALID_CONFIG_KEYS.each do |key|
    send("#{key}=", merged_options[key])
  end
  yield(self) if block_given?
end

Instance Attribute Details

#last_responseObject

Returns the value of attribute last_response.



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

def last_response
  @last_response
end