Class: Workarea::GlobalE::Merchant::RefundProduct

Inherits:
Object
  • Object
show all
Defined in:
app/services/workarea/global_e/merchant/refund_product.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#hashObject (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_idString

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.

Returns:

  • (String)


17
18
19
# File 'app/services/workarea/global_e/merchant/refund_product.rb', line 17

def cart_item_id
  hash["CartItemId"]
end

#original_refund_amountFloat

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).

Returns:

  • (Float)


38
39
40
# File 'app/services/workarea/global_e/merchant/refund_product.rb', line 38

def original_refund_amount
  hash["OriginalRefundAmount"]
end

#refund_amountFloat

Refund amount for this product line item in end customer’s currency used for this order’s payment.

Returns:

  • (Float)


47
48
49
# File 'app/services/workarea/global_e/merchant/refund_product.rb', line 47

def refund_amount
  hash["RefundAmount"]
end

#refund_commentsString

Comments for this product’s refund

Returns:

  • (String)


63
64
65
# File 'app/services/workarea/global_e/merchant/refund_product.rb', line 63

def refund_comments
  hash["RefundComments"]
end

#refund_quantityInteger

Product quantity (i.e. a part of the originally ordered quantity) that the refund refers to.

Returns:

  • (Integer)


26
27
28
# File 'app/services/workarea/global_e/merchant/refund_product.rb', line 26

def refund_quantity
  hash["RefundQuantity"]
end

#refund_reasonHash

Reason for this product’s refund

Returns:

  • (Hash)


55
56
57
# File 'app/services/workarea/global_e/merchant/refund_product.rb', line 55

def refund_reason
  hash["RefundReason"]
end