Class: Bs2Api::Payment::Manual

Inherits:
Base
  • Object
show all
Defined in:
lib/bs2_api/payment/manual.rb

Instance Attribute Summary

Attributes inherited from Base

#payment

Instance Method Summary collapse

Methods inherited from Base

#call

Constructor Details

#initialize(bank, client_id: Bs2Api.configuration.client_id, client_secret: Bs2Api.configuration.client_secret, proxy: nil) ⇒ Manual

Returns a new instance of Manual.



6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/bs2_api/payment/manual.rb', line 6

def initialize(
  bank,
  client_id: Bs2Api.configuration.client_id,
  client_secret: Bs2Api.configuration.client_secret,
  proxy: nil
)

  raise Bs2Api::Errors::InvalidBank, 'Invalid Bank' unless bank.is_a?(Bs2Api::Entities::Bank)
  @bank = bank
  @client_id = client_id
  @client_secret = client_secret
  @proxy = proxy
end