Class: Workarea::GlobalE::Merchant::OrderRefund
- Inherits:
-
Object
- Object
- Workarea::GlobalE::Merchant::OrderRefund
- Defined in:
- app/services/workarea/global_e/merchant/order_refund.rb
Instance Attribute Summary collapse
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
Instance Method Summary collapse
-
#components ⇒ Array<Workarea::GlobalE::Merchant::RefundComponent>
List of RefundComponent objects for this order refund.
-
#initialize(hash) ⇒ OrderRefund
constructor
A new instance of OrderRefund.
-
#merchant_guid ⇒ String
Unique identifier of the Merchant on Global-e.
-
#merchant_order_id ⇒ String
Order unique identifier on the Merchant’s site returned from a previous call to SendOrderToMerchant method for this order.
-
#order_id ⇒ String
Global-e order unique identifier.
-
#original_total_refund_amount ⇒ Float
Refund amount in original Merchant’s currency including the local Merchant’s VAT (currency is specified in CurrencyCode property of the respective Merchant.Order).
-
#products ⇒ Array<Workarea::GlobalE::Merchant::RefundProduct>
List of RefundProduct objects for this order refund.
-
#refund_comments ⇒ String
Comments for the order refund.
-
#refund_reason ⇒ Workarea::GlobalE::Merchant::OrderRefundReason
Reason for the order refund.
- #to_h ⇒ Object
-
#total_refund_amount ⇒ Float
Total refund amount in end customer’s currency used for this order’s payment (currency is specified in InternationalDetails.CurrencyCode property for the respective Merchant.Order).
-
#web_store_code ⇒ String
Code used on the merchant’s side to identify the web store, as specified in WebStoreCode argument for SendCart method for the cart converted to this order on Global-e.
Constructor Details
#initialize(hash) ⇒ OrderRefund
Returns a new instance of OrderRefund.
7 8 9 |
# File 'app/services/workarea/global_e/merchant/order_refund.rb', line 7 def initialize(hash) @hash = hash end |
Instance Attribute Details
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
5 6 7 |
# File 'app/services/workarea/global_e/merchant/order_refund.rb', line 5 def hash @hash end |
Instance Method Details
#components ⇒ Array<Workarea::GlobalE::Merchant::RefundComponent>
List of RefundComponent objects for this order refund.
98 99 |
# File 'app/services/workarea/global_e/merchant/order_refund.rb', line 98 def components end |
#merchant_guid ⇒ String
Unique identifier of the Merchant on Global-e.
19 20 21 |
# File 'app/services/workarea/global_e/merchant/order_refund.rb', line 19 def merchant_guid hash["MerchantGUID"] end |
#merchant_order_id ⇒ String
Order unique identifier on the Merchant’s site returned from a previous call to SendOrderToMerchant method for this order.
36 37 38 |
# File 'app/services/workarea/global_e/merchant/order_refund.rb', line 36 def merchant_order_id hash["MerchantOrderId"] end |
#order_id ⇒ String
Global-e order unique identifier.
27 28 29 |
# File 'app/services/workarea/global_e/merchant/order_refund.rb', line 27 def order_id hash["OrderId"] end |
#original_total_refund_amount ⇒ Float
Refund amount in original Merchant’s currency including the local Merchant’s VAT (currency is specified in CurrencyCode property of the respective Merchant.Order).
46 47 48 |
# File 'app/services/workarea/global_e/merchant/order_refund.rb', line 46 def original_total_refund_amount hash["OriginalTotalRefundAmount"] end |
#products ⇒ Array<Workarea::GlobalE::Merchant::RefundProduct>
List of RefundProduct objects for this order refund.
80 81 82 |
# File 'app/services/workarea/global_e/merchant/order_refund.rb', line 80 def products @products ||= hash["Products"].map { |refund_product| RefundProduct.new refund_product } end |
#refund_comments ⇒ String
Comments for the order refund
72 73 74 |
# File 'app/services/workarea/global_e/merchant/order_refund.rb', line 72 def refund_comments hash["RefundComponent"] end |
#refund_reason ⇒ Workarea::GlobalE::Merchant::OrderRefundReason
Reason for the order refund
64 65 66 |
# File 'app/services/workarea/global_e/merchant/order_refund.rb', line 64 def refund_reason @refund_reason ||= OrderRefundReason.new hash["RefundReason"] end |
#to_h ⇒ Object
11 12 13 |
# File 'app/services/workarea/global_e/merchant/order_refund.rb', line 11 def to_h hash end |
#total_refund_amount ⇒ Float
Total refund amount in end customer’s currency used for this order’s payment (currency is specified in InternationalDetails.CurrencyCode property for the respective Merchant.Order).
56 57 58 |
# File 'app/services/workarea/global_e/merchant/order_refund.rb', line 56 def total_refund_amount hash["TotalRefundAmount"] end |
#web_store_code ⇒ String
Code used on the merchant’s side to identify the web store, as specified in WebStoreCode argument for SendCart method for the cart converted to this order on Global-e.
90 91 92 |
# File 'app/services/workarea/global_e/merchant/order_refund.rb', line 90 def web_store_code hash["WebStoreCode"] end |