module Cardflex class Gateway attr_reader :config 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 def transaction TransactionGateway.new(self) end def plan PlanGateway.new(self) end def three_step ThreeStepGateway.new(self) end def customer_vault CustomerVaultGateway.new(self) end def subscription SubscriptionGateway.new(self) end end end