Class: Inttegro::Product::LineItem

Inherits:
T::Struct
  • Object
show all
Defined in:
lib/inttegro/product/line_item.rb

Overview

Typed representation of the 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

#product ⇒ Inttegro::Product::Details (readonly)

Provide either inline product data or a product_id reference to an existing catalog product. Catalog-backed product line items can use an explicit price or an existing price_id, or a validated customer_selected_price. Inttegro never falls back to a product's default unit price during order creation.

Required in the API payload. Wire name: product.



34
35
36
37
# File 'lib/inttegro/product/line_item.rb', line 34

class LineItem < T::Struct
  const :type, Inttegro::Product::LineItemType
  const :product, Inttegro::Product::Details
end

#type ⇒ Inttegro::Product::LineItemType (readonly)

Line item type discriminator

Required in the API payload. Wire name: type.



34
35
36
37
# File 'lib/inttegro/product/line_item.rb', line 34

class LineItem < T::Struct
  const :type, Inttegro::Product::LineItemType
  const :product, Inttegro::Product::Details
end