class GmxCheckout::Base

Attributes

api[R]

Public Class Methods

new(api) click to toggle source
# File lib/gmxcheckout/base.rb, line 5
def initialize(api)
  @api = api
end

Public Instance Methods

prepare!(params) click to toggle source
# File lib/gmxcheckout/base.rb, line 17
def prepare!(params)
  params.tap do |hash|
    hash['empresa.hashEmpresa'] = api.key
    hash['restApi'] = true
    hash.compact!
  end
end
process_body(response) click to toggle source
# File lib/gmxcheckout/base.rb, line 13
def process_body(response)
  Hashie::Mash.new response.body
end
process_transaction(response) click to toggle source
# File lib/gmxcheckout/base.rb, line 9
def process_transaction(response)
  Response.new response.body, Models::Transaction
end