Sha256: 56cd68f169e69a1b5833dec4a3862472d6cd8ac7b7f8eefb8b040dd04dc23e4b

Contents?: true

Size: 1.25 KB

Versions: 2

Compression:

Stored size: 1.25 KB

Contents

module VaultedBilling
  module Gateway
    module Response
      attr_accessor :response_message
      attr_writer :success
      def success?; @success; end
    end

    def add_customer(customer)
      raise NotImplementedError
    end

    def update_customer(customer)
      raise NotImplementedError
    end

    def remove_customer(customer)
      raise NotImplementedError
    end

    def add_customer_credit_card(customer, credit_card)
      raise NotImplementedError
    end

    def update_customer_credit_card(customer, credit_card)
      raise NotImplementedError
    end

    def remove_customer_credit_card(customer, credit_card)
      raise NotImplementedError
    end

    def authorize(customer, credit_card, amount)
      raise NotImplementedError
    end

    def capture(transaction_id, amount)
      raise NotImplementedError
    end

    def refund(transaction_id, amount)
      raise NotImplementedError
    end

    def void(transaction_id)
      raise NotImplementedError
    end


    protected


    def respond_with(object, options = {})
      object.tap do |o|
        o.extend(VaultedBilling::Gateway::Response)
        o.success = options.has_key?(:success) ? options[:success] : true
        yield(o) if block_given?
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
vaulted_billing-0.0.1 lib/vaulted_billing/gateway.rb
vaulted_billing-0.0.0 lib/vaulted_billing/gateway.rb