Class: Workarea::GlobalE::Merchant::RefundProduct
- Inherits:
-
Object
- Object
- Workarea::GlobalE::Merchant::RefundProduct
- Defined in:
- app/services/workarea/global_e/merchant/refund_product.rb
Instance Attribute Summary collapse
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
Instance Method Summary collapse
-
#cart_item_id ⇒ String
Identifier of the line item on the Merchant’s site.
-
#initialize(hash) ⇒ RefundProduct
constructor
A new instance of RefundProduct.
-
#original_refund_amount ⇒ Float
Refund amount in original Merchant’s currency including the local Merchant’s VAT for this product line item, before applying any price modifications (i.e. part of or the full value paid by Global-e to the Merchant, as was specified in Merchant.Product.Price for the respective order).
-
#refund_amount ⇒ Float
Refund amount for this product line item in end customer’s currency used for this order’s payment.
-
#refund_comments ⇒ String
Comments for this product’s refund.
-
#refund_quantity ⇒ Integer
Product quantity (i.e. a part of the originally ordered quantity) that the refund refers to.
-
#refund_reason ⇒ Hash
Reason for this product’s refund.
Constructor Details
#initialize(hash) ⇒ RefundProduct
Returns a new instance of RefundProduct.
7 8 9 |
# File 'app/services/workarea/global_e/merchant/refund_product.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/refund_product.rb', line 5 def hash @hash end |
Instance Method Details
#cart_item_id ⇒ String
Identifier of the line item on the Merchant’s site. This property is mandatory and should be equal to the respective Product’s CartItemId originally specified in SendCart method for the order being refunded.
17 18 19 |
# File 'app/services/workarea/global_e/merchant/refund_product.rb', line 17 def cart_item_id hash["CartItemId"] end |
#original_refund_amount ⇒ Float
Refund amount in original Merchant’s currency including the local Merchant’s VAT for this product line item, before applying any price modifications (i.e. part of or the full value paid by Global-e to the Merchant, as was specified in Merchant.Product.Price for the respective order).
38 39 40 |
# File 'app/services/workarea/global_e/merchant/refund_product.rb', line 38 def original_refund_amount hash["OriginalRefundAmount"] end |
#refund_amount ⇒ Float
Refund amount for this product line item in end customer’s currency used for this order’s payment.
47 48 49 |
# File 'app/services/workarea/global_e/merchant/refund_product.rb', line 47 def refund_amount hash["RefundAmount"] end |
#refund_comments ⇒ String
Comments for this product’s refund
63 64 65 |
# File 'app/services/workarea/global_e/merchant/refund_product.rb', line 63 def refund_comments hash["RefundComments"] end |
#refund_quantity ⇒ Integer
Product quantity (i.e. a part of the originally ordered quantity) that the refund refers to.
26 27 28 |
# File 'app/services/workarea/global_e/merchant/refund_product.rb', line 26 def refund_quantity hash["RefundQuantity"] end |
#refund_reason ⇒ Hash
Reason for this product’s refund
55 56 57 |
# File 'app/services/workarea/global_e/merchant/refund_product.rb', line 55 def refund_reason hash["RefundReason"] end |