Sha256: 8c895d8c74a731c0e36169c3bbc8a822e1a323fc581d377645d8755820b32e21

Contents?: true

Size: 461 Bytes

Versions: 2

Compression:

Stored size: 461 Bytes

Contents

module GmxCheckout
  class Base
    attr_reader :api

    def initialize(api)
      @api = api
    end

    def process_transaction(response)
      Response.new response.body, Models::Transaction
    end

    def process_body(response)
      Hashie::Mash.new response.body
    end

    def prepare!(params)
      params.tap do |hash|
        hash['empresa.hashEmpresa'] = api.key
        hash['restApi'] = true
        hash.compact!
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gmxcheckout-0.2.0 lib/gmxcheckout/base.rb
gmxcheckout-0.1.0 lib/gmxcheckout/base.rb