Class: Falsify::Refund
- Inherits:
-
Object
- Object
- Falsify::Refund
- Defined in:
- lib/falsify/models/order/refund/refund.rb
Overview
Required Fields:
- refund_line_items
Instance Attribute Summary collapse
-
#created_at ⇒ String
readonly
The date and time (ISO 8601 format) when the refund was created.
-
#id ⇒ String
readonly
The unique identifier for the refund.
-
#note ⇒ String
An optional note attached to a refund.
-
#order_adjustments ⇒ Object
readonly
Returns the value of attribute order_adjustments.
-
#processed_at ⇒ String
The date and time (ISO 8601 format) when the refund was imported.
-
#refund_line_items ⇒ String
A list of refunded line items.
-
#restock ⇒ Boolean
Whether to add the line items back to the store's inventory.
-
#transactions ⇒ Array<Transaction>
A list of transactions involved in the refund.
-
#user_id ⇒ String
The unique identifier of the user who performed the refund.
Instance Attribute Details
#created_at ⇒ String (readonly)
The date and time (ISO 8601 format) when the refund was created.
7 8 9 |
# File 'lib/falsify/models/order/refund/refund.rb', line 7 def created_at @created_at end |
#id ⇒ String (readonly)
The unique identifier for the refund.
10 11 12 |
# File 'lib/falsify/models/order/refund/refund.rb', line 10 def id @id end |
#note ⇒ String
An optional note attached to a refund.
13 14 15 |
# File 'lib/falsify/models/order/refund/refund.rb', line 13 def note @note end |
#order_adjustments ⇒ Object (readonly)
Returns the value of attribute order_adjustments.
29 30 31 |
# File 'lib/falsify/models/order/refund/refund.rb', line 29 def order_adjustments @order_adjustments end |
#processed_at ⇒ String
The date and time (ISO 8601 format) when the refund was imported. This value can be set to a date in the past when importing from other systems. If no value is provided, then it will be auto-generated as the current time in Shopify.
34 35 36 |
# File 'lib/falsify/models/order/refund/refund.rb', line 34 def processed_at @processed_at end |
#refund_line_items ⇒ String
A list of refunded line items. Each entry has the following properties:
- id : The unique identifier of the line item in the refund.
- line_item : A line item being returned.
- line_item_id : The ID of the related line item in the order.
- quantity : The quantity of the associated line item that was returned.
- restock_type : How this refund line item affects inventory levels.
Valid values:
- no_restock : Refunding these items won't affect inventory. The number of fulfillable units for this line item will remain unchanged. For example, a refund payment can be issued but no items will be returned or made available for sale again.
- cancel : The items have not yet been fulfilled. The canceled quantity will be added back to the available count. The number of fulfillable units for this line item will decrease.
- return : The items were already delivered, and will be returned to the merchant. The returned quantity will be added back to the available count. The number of fulfillable units for this line item will remain unchanged.
- legacy_restock : The deprecated
restock
property was used for this refund. These items were made available for sale again. This value is not accepted when creating new refunds.
- location_id : The unique identifier of the location where the items will be restocked. Required when
restock_type
has the valuereturn
orcancel
. - subtotal : The subtotal of the refund line item.
- total_tax : The total tax on the refund line item.
- subtotal_set : The subtotal of the refund line item in shop and presentment currencies.
- total_tax_set : The total tax of the line item in shop and presentment currencies.
- no_restock : Refunding these items won't affect inventory. The number of fulfillable units for this line item will remain unchanged. For example, a refund payment can be issued but no items will be returned or made available for sale again.
- cancel : The items have not yet been fulfilled. The canceled quantity will be added back to the available count. The number of fulfillable units for this line item will decrease.
- return : The items were already delivered, and will be returned to the merchant. The returned quantity will be added back to the available count. The number of fulfillable units for this line item will remain unchanged.
- legacy_restock : The deprecated
restock
property was used for this refund. These items were made available for sale again. This value is not accepted when creating new refunds.
59 60 61 |
# File 'lib/falsify/models/order/refund/refund.rb', line 59 def refund_line_items @refund_line_items end |
#restock ⇒ Boolean
Whether to add the line items back to the store's inventory.
Provide a restock_type
to influence how this refund affects inventory instead
63 64 65 |
# File 'lib/falsify/models/order/refund/refund.rb', line 63 def restock @restock end |
#transactions ⇒ Array<Transaction>
A list of transactions involved in the refund. For more information, see the Transaction resource.
67 68 69 |
# File 'lib/falsify/models/order/refund/refund.rb', line 67 def transactions @transactions end |
#user_id ⇒ String
The unique identifier of the user who performed the refund.
70 71 72 |
# File 'lib/falsify/models/order/refund/refund.rb', line 70 def user_id @user_id end |