Class: DPay::Client
- Inherits:
-
Object
- Object
- DPay::Client
- Defined in:
- lib/dpay/client.rb,
sig/dpay/client.rbs
Constant Summary collapse
Instance Attribute Summary collapse
-
#banks ⇒ BankService
readonly
Returns the value of attribute banks.
-
#blik ⇒ BlikService
readonly
Returns the value of attribute blik.
-
#cards ⇒ CardService
readonly
Returns the value of attribute cards.
-
#config ⇒ Config
readonly
Returns the value of attribute config.
-
#payments ⇒ PaymentService
readonly
Returns the value of attribute payments.
-
#payouts ⇒ PayoutService
readonly
Returns the value of attribute payouts.
-
#refunds ⇒ RefundService
readonly
Returns the value of attribute refunds.
Instance Method Summary collapse
-
#initialize(service:, secret_hash:, timeout: Config::DEFAULT_TIMEOUT, http_client: nil, base_urls: nil) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(service:, secret_hash:, timeout: Config::DEFAULT_TIMEOUT, http_client: nil, base_urls: nil) ⇒ Client
Returns a new instance of Client.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/dpay/client.rb', line 9 def initialize(service:, secret_hash:, timeout: Config::DEFAULT_TIMEOUT, http_client: nil, base_urls: nil) @config = Config.new( service: service, secret_hash: secret_hash, timeout: timeout, http_client: http_client, base_urls: base_urls ) api = Internal::ApiRequestor.new(@config, @config.http_client || HTTP::NetHTTPClient.new(@config.timeout)) @payments = PaymentService.new(api) @refunds = RefundService.new(api) @banks = BankService.new(api) @blik = BlikService.new(api) @cards = CardService.new(api) @payouts = PayoutService.new(api) freeze end |
Instance Attribute Details
#banks ⇒ BankService (readonly)
Returns the value of attribute banks.
7 8 9 |
# File 'lib/dpay/client.rb', line 7 def banks @banks end |
#blik ⇒ BlikService (readonly)
Returns the value of attribute blik.
7 8 9 |
# File 'lib/dpay/client.rb', line 7 def blik @blik end |
#cards ⇒ CardService (readonly)
Returns the value of attribute cards.
7 8 9 |
# File 'lib/dpay/client.rb', line 7 def cards @cards end |
#config ⇒ Config (readonly)
Returns the value of attribute config.
7 8 9 |
# File 'lib/dpay/client.rb', line 7 def config @config end |
#payments ⇒ PaymentService (readonly)
Returns the value of attribute payments.
7 8 9 |
# File 'lib/dpay/client.rb', line 7 def payments @payments end |
#payouts ⇒ PayoutService (readonly)
Returns the value of attribute payouts.
7 8 9 |
# File 'lib/dpay/client.rb', line 7 def payouts @payouts end |
#refunds ⇒ RefundService (readonly)
Returns the value of attribute refunds.
7 8 9 |
# File 'lib/dpay/client.rb', line 7 def refunds @refunds end |