Class: GlobalCollect::Responses::GetOrderStatus::V1ResponseMethods::OrderStatus

Inherits:
Struct
  • Object
show all
Defined in:
lib/global_collect/responses/get_order_status/v1_response_methods.rb

Instance Method Summary collapse

Instance Method Details

#errorsObject

NOTE: these error fields correspond to the potential errors on the order or payment, not on this response. Those can be found in the #error object of the response.



42
43
44
45
# File 'lib/global_collect/responses/get_order_status/v1_response_methods.rb', line 42

def errors
  return [] unless row_hash['ERRORNUMBER'] || row_hash['ERRORMESSAGE']
  [OrderStatusError.new(row_hash['ERRORNUMBER'].to_i, row_hash['ERRORMESSAGE'])]
end

#payment_statusObject



35
36
37
# File 'lib/global_collect/responses/get_order_status/v1_response_methods.rb', line 35

def payment_status
  GlobalCollect::Const::PaymentStatus.from_code(status_id)
end