Class: Revolut::Client
- Inherits:
-
Object
- Object
- Revolut::Client
- Includes:
- Revolut::Clients::Accounts, Revolut::Clients::Counterparties, Revolut::Clients::Exchanges, Revolut::Clients::PaymentDrafts, Revolut::Clients::Payments, Revolut::Clients::Webhooks
- Defined in:
- lib/revolut/client.rb
Overview
Wrapper class for all actions.
Instance Method Summary collapse
- #config ⇒ Configuration (also: #configuration)
-
#configure {|config| ... } ⇒ Object
Configure client with a block of settings.
- #connection ⇒ Connection
-
#initialize(options = {}) ⇒ Client
constructor
Initialize client.
Methods included from Revolut::Clients::Webhooks
Methods included from Revolut::Clients::Payments
#cancel_transaction, #pay, #transaction, #transactions, #transfer
Methods included from Revolut::Clients::PaymentDrafts
#create_payment_draft, #delete_payment_draft, #payment_draft, #payment_drafts
Methods included from Revolut::Clients::Exchanges
Methods included from Revolut::Clients::Counterparties
#add_counterparty, #counterparties, #counterparty, #delete_counterparty
Methods included from Revolut::Clients::Accounts
#account, #account_details, #accounts
Constructor Details
#initialize(options = {}) ⇒ Client
Initialize client.
28 29 30 31 |
# File 'lib/revolut/client.rb', line 28 def initialize( = {}) config.api_key = [:api_key] if [:api_key] config.environment = [:environment] if [:environment] end |
Instance Method Details
#config ⇒ Configuration Also known as: configuration
34 35 36 |
# File 'lib/revolut/client.rb', line 34 def config @config ||= Configuration.new end |
#configure {|config| ... } ⇒ Object
Configure client with a block of settings.
40 41 42 43 |
# File 'lib/revolut/client.rb', line 40 def configure yield(config) if block_given? true end |
#connection ⇒ Connection
46 47 48 |
# File 'lib/revolut/client.rb', line 46 def connection @connection ||= Connection.new(self) end |