Class: FidorApi::Client
- Inherits:
-
Object
- Object
- FidorApi::Client
- Includes:
- Authentication, DSL
- Defined in:
- lib/fidor_api/client.rb,
lib/fidor_api/client/dsl.rb,
lib/fidor_api/client/dsl/cards.rb,
lib/fidor_api/client/connection.rb,
lib/fidor_api/client/dsl/accounts.rb,
lib/fidor_api/client/dsl/messages.rb,
lib/fidor_api/client/dsl/preauths.rb,
lib/fidor_api/client/configuration.rb,
lib/fidor_api/client/dsl/core_data.rb,
lib/fidor_api/client/dsl/transfers.rb,
lib/fidor_api/client/authentication.rb,
lib/fidor_api/client/dsl/transactions.rb,
lib/fidor_api/client/dsl/debit_returns.rb,
lib/fidor_api/client/dsl/standing_orders.rb,
lib/fidor_api/client/dsl/transfers/classic.rb,
lib/fidor_api/client/dsl/transfers/generic.rb,
lib/fidor_api/client/dsl/confirmable_actions.rb,
lib/fidor_api/client/dsl/scheduled_transfers.rb
Defined Under Namespace
Modules: Authentication, DSL Classes: Configuration, Connection
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Attributes included from Authentication
Instance Method Summary collapse
- #connection(host: config.environment.api_host) ⇒ Object
-
#initialize {|config| ... } ⇒ Client
constructor
A new instance of Client.
Methods included from DSL
Methods included from Authentication
#authorize_complete, #authorize_start, #client_login, #login
Constructor Details
#initialize {|config| ... } ⇒ Client
Returns a new instance of Client.
13 14 15 16 17 |
# File 'lib/fidor_api/client.rb', line 13 def initialize self.config = Configuration.new yield(config) if block_given? config.validate! end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
11 12 13 |
# File 'lib/fidor_api/client.rb', line 11 def config @config end |
Instance Method Details
#connection(host: config.environment.api_host) ⇒ Object
19 20 21 |
# File 'lib/fidor_api/client.rb', line 19 def connection(host: config.environment.api_host) Connection.new(client: self, host: host) end |