Class: GlobalCollect::Responses::GetOrderStatus::V2ResponseMethods::OrderStatus
- Inherits:
-
Struct
- Object
- Struct
- GlobalCollect::Responses::GetOrderStatus::V2ResponseMethods::OrderStatus
- Defined in:
- lib/global_collect/responses/get_order_status/v2_response_methods.rb
Instance Method Summary collapse
-
#errors ⇒ Object
NOTE: these error fields correspond to the potential errors on the order or payment, not on this response.
- #payment_product ⇒ Object
- #payment_status ⇒ Object
Instance Method Details
#errors ⇒ Object
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.
60 61 62 63 64 |
# File 'lib/global_collect/responses/get_order_status/v2_response_methods.rb', line 60 def errors return [] unless status_hash['ERRORS'] errs = status_hash['ERRORS']['ERROR'].is_a?(Array) ? status_hash['ERRORS']['ERROR'] : [status_hash['ERRORS']['ERROR']] errs.map{|err| OrderStatusError.new(err['CODE'].to_i, err['MESSAGE']) } end |
#payment_product ⇒ Object
53 54 55 |
# File 'lib/global_collect/responses/get_order_status/v2_response_methods.rb', line 53 def payment_product GlobalCollect::Const::PaymentProduct.from_code(payment_product_id) end |
#payment_status ⇒ Object
49 50 51 |
# File 'lib/global_collect/responses/get_order_status/v2_response_methods.rb', line 49 def payment_status GlobalCollect::Const::PaymentStatus.from_code(status_id) end |