Sha256: b26615b72198f0f2771bf3365869168bf0113a708e7e89b03bea635370bb8d9f

Contents?: true

Size: 625 Bytes

Versions: 3

Compression:

Stored size: 625 Bytes

Contents

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cardflex-ruby-0.1.2 lib/cardflex/gateway.rb
cardflex-ruby-0.1.1 lib/cardflex/gateway.rb
cardflex-ruby-0.0.1 lib/cardflex/gateway.rb