Class: Falsify::Refund

Inherits:
Object
  • Object
show all
Defined in:
lib/falsify/models/order/refund/refund.rb

Overview

Required Fields:

  • refund_line_items

Instance Attribute Summary collapse

Instance Attribute Details

#created_atString (readonly)

The date and time (ISO 8601 format) when the refund was created.

Returns:

  • (String)


7
8
9
# File 'lib/falsify/models/order/refund/refund.rb', line 7

def created_at
  @created_at
end

#idString (readonly)

The unique identifier for the refund.

Returns:

  • (String)


10
11
12
# File 'lib/falsify/models/order/refund/refund.rb', line 10

def id
  @id
end

#noteString

An optional note attached to a refund.

Returns:

  • (String)


13
14
15
# File 'lib/falsify/models/order/refund/refund.rb', line 13

def note
  @note
end

#order_adjustmentsObject (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_atString

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.

Returns:

  • (String)


34
35
36
# File 'lib/falsify/models/order/refund/refund.rb', line 34

def processed_at
  @processed_at
end

#refund_line_itemsString

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 value return or cancel.
  • 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.

Returns:

  • (String)


59
60
61
# File 'lib/falsify/models/order/refund/refund.rb', line 59

def refund_line_items
  @refund_line_items
end

#restockBoolean

Whether to add the line items back to the store's inventory. Provide a restock_type to influence how this refund affects inventory instead

Returns:

  • (Boolean)


63
64
65
# File 'lib/falsify/models/order/refund/refund.rb', line 63

def restock
  @restock
end

#transactionsArray<Transaction>

A list of transactions involved in the refund. For more information, see the Transaction resource.

Returns:

  • (Array<Transaction>)


67
68
69
# File 'lib/falsify/models/order/refund/refund.rb', line 67

def transactions
  @transactions
end

#user_idString

The unique identifier of the user who performed the refund.

Returns:

  • (String)


70
71
72
# File 'lib/falsify/models/order/refund/refund.rb', line 70

def user_id
  @user_id
end