Class: Cardflex::Gateway
- Inherits:
-
Object
- Object
- Cardflex::Gateway
- Defined in:
- lib/cardflex/gateway.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
Instance Method Summary collapse
- #customer_vault ⇒ Object
-
#initialize(config) ⇒ Gateway
constructor
A new instance of Gateway.
- #plan ⇒ Object
- #subscription ⇒ Object
- #three_step ⇒ Object
- #transaction ⇒ Object
Constructor Details
#initialize(config) ⇒ Gateway
Returns a new instance of Gateway.
5 6 7 8 9 10 11 12 13 |
# File 'lib/cardflex/gateway.rb', line 5 def initialize(config) if config.is_a? Hash @config = Configuration.new(config) elsif config.is_a? Configuration @config = config else raise ArgumentError, "config is an invalid type" end end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
3 4 5 |
# File 'lib/cardflex/gateway.rb', line 3 def config @config end |
Instance Method Details
#customer_vault ⇒ Object
27 28 29 |
# File 'lib/cardflex/gateway.rb', line 27 def customer_vault CustomerVaultGateway.new(self) end |
#plan ⇒ Object
19 20 21 |
# File 'lib/cardflex/gateway.rb', line 19 def plan PlanGateway.new(self) end |
#subscription ⇒ Object
31 32 33 |
# File 'lib/cardflex/gateway.rb', line 31 def subscription SubscriptionGateway.new(self) end |
#three_step ⇒ Object
23 24 25 |
# File 'lib/cardflex/gateway.rb', line 23 def three_step ThreeStepGateway.new(self) end |
#transaction ⇒ Object
15 16 17 |
# File 'lib/cardflex/gateway.rb', line 15 def transaction TransactionGateway.new(self) end |