class Redex::Response::QueryResponse
Attributes
amount[R]
canceled_at[R]
card_expiration_month[R]
card_holder_name[R]
card_number[R]
code[R]
installments[R]
invoice_note[R]
message[R]
order_id[R]
origin[R]
status[R]
transaction_created_at[R]
transaction_id[R]
transaction_type[R]
Public Class Methods
new(httpi_response)
click to toggle source
Calls superclass method
Redex::Response::BaseResponse::new
# File lib/redex/response/query_response.rb, line 8 def initialize(httpi_response) super(httpi_response["REGISTRO"]) end
Public Instance Methods
clear(httpi_result)
click to toggle source
# File lib/redex/response/query_response.rb, line 77 def clear(httpi_result) httpi_result = httpi_result.first httpi_result.delete("AVS") httpi_result = Hash[httpi_result.map { |k, v| [k.to_sym, v] }] httpi_result.select! {|k,v| v != [{}] && v!= [{"i:nil"=>"true"}]} httpi_result.each { |k, v| httpi_result[k] = v.first } end
sequential_id()
click to toggle source
# File lib/redex/response/query_response.rb, line 32 def sequential_id @sequential_id ||= @raw[:NUMSQN].to_i end
transaction_canceled_at()
click to toggle source
# File lib/redex/response/query_response.rb, line 72 def transaction_canceled_at @transaction_canceled_at ||= datetime_sanitize(@raw[:DATA], "00:00:00") end