Class: Inttegro::Refund::CreateLineItem

Inherits:
T::Struct
  • Object
show all
Defined in:
lib/inttegro/refund/create_line_item.rb

Overview

Typed representation of the create line item object in the Inttegro API.

This generated model is immutable. Construct it with .new, or decode a string-keyed API payload with .from_hash. #serialize produces a string-keyed hash using the original wire field names and serialized enum values.

Instance Attribute Summary collapse

Instance Attribute Details

#order_line_item_id ⇒ String (readonly)

Strong identifier for the paid order line item being refunded.

Required in the API payload. Wire name: order_line_item_id.

Returns:

  • (String)


44
45
46
47
48
49
# File 'lib/inttegro/refund/create_line_item.rb', line 44

class CreateLineItem < T::Struct
  const :order_line_item_id, String
  const :reason, T.nilable(Inttegro::Refund::Reason), default: nil
  const :reason_details, T.nilable(String), default: nil
  const :refund_amount, Inttegro::Money::AmountParams
end

#reason ⇒ Inttegro::Refund::Reason? (readonly)

Value of the reason field in the Inttegro API payload.

Optional in the API payload; omitted values default to nil. Wire name: reason.

Returns:



44
45
46
47
48
49
# File 'lib/inttegro/refund/create_line_item.rb', line 44

class CreateLineItem < T::Struct
  const :order_line_item_id, String
  const :reason, T.nilable(Inttegro::Refund::Reason), default: nil
  const :reason_details, T.nilable(String), default: nil
  const :refund_amount, Inttegro::Money::AmountParams
end

#reason_details ⇒ String? (readonly)

Line-specific explanation. Requires a line-level reason; required when that reason is custom.

Optional in the API payload; omitted values default to nil. Wire name: reason_details.

Returns:

  • (String, nil)


44
45
46
47
48
49
# File 'lib/inttegro/refund/create_line_item.rb', line 44

class CreateLineItem < T::Struct
  const :order_line_item_id, String
  const :reason, T.nilable(Inttegro::Refund::Reason), default: nil
  const :reason_details, T.nilable(String), default: nil
  const :refund_amount, Inttegro::Money::AmountParams
end

#refund_amount ⇒ Inttegro::Money::AmountParams (readonly)

Value of the refund_amount field in the Inttegro API payload.

Required in the API payload. Wire name: refund_amount.



44
45
46
47
48
49
# File 'lib/inttegro/refund/create_line_item.rb', line 44

class CreateLineItem < T::Struct
  const :order_line_item_id, String
  const :reason, T.nilable(Inttegro::Refund::Reason), default: nil
  const :reason_details, T.nilable(String), default: nil
  const :refund_amount, Inttegro::Money::AmountParams
end