Class: Inttegro::Price::CatalogPriceParams

Inherits:
T::Struct
  • Object
show all
Defined in:
lib/inttegro/price/catalog_price_params.rb

Overview

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

#about ⇒ String? (readonly)

Longer description of this price (max 500 characters)

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

Returns:

  • (String, nil)


58
59
60
61
62
63
64
65
# File 'lib/inttegro/price/catalog_price_params.rb', line 58

class CatalogPriceParams < T::Struct
  const :product_id, T.nilable(String), default: nil
  const :label, T.nilable(String), default: nil
  const :about, T.nilable(String), default: nil
  const :type, T.nilable(Inttegro::Price::Type), default: nil
  const :fixed_amount, T.nilable(Inttegro::Money::AmountParams), default: nil
  const :customer_selected_amount, T.nilable(Inttegro::Price::CustomerSelectedAmountParams), default: nil
end

#customer_selected_amount ⇒ Inttegro::Price::CustomerSelectedAmountParams? (readonly)

Required when type is customer_selected_amount. Available only to Commerce internal services and Upper private beta organizations and applications.

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



58
59
60
61
62
63
64
65
# File 'lib/inttegro/price/catalog_price_params.rb', line 58

class CatalogPriceParams < T::Struct
  const :product_id, T.nilable(String), default: nil
  const :label, T.nilable(String), default: nil
  const :about, T.nilable(String), default: nil
  const :type, T.nilable(Inttegro::Price::Type), default: nil
  const :fixed_amount, T.nilable(Inttegro::Money::AmountParams), default: nil
  const :customer_selected_amount, T.nilable(Inttegro::Price::CustomerSelectedAmountParams), default: nil
end

#fixed_amount ⇒ Inttegro::Money::AmountParams? (readonly)

Required when type is fixed_amount.

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



58
59
60
61
62
63
64
65
# File 'lib/inttegro/price/catalog_price_params.rb', line 58

class CatalogPriceParams < T::Struct
  const :product_id, T.nilable(String), default: nil
  const :label, T.nilable(String), default: nil
  const :about, T.nilable(String), default: nil
  const :type, T.nilable(Inttegro::Price::Type), default: nil
  const :fixed_amount, T.nilable(Inttegro::Money::AmountParams), default: nil
  const :customer_selected_amount, T.nilable(Inttegro::Price::CustomerSelectedAmountParams), default: nil
end

#label ⇒ String? (readonly)

Short label for this price (max 100 characters)

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

Returns:

  • (String, nil)


58
59
60
61
62
63
64
65
# File 'lib/inttegro/price/catalog_price_params.rb', line 58

class CatalogPriceParams < T::Struct
  const :product_id, T.nilable(String), default: nil
  const :label, T.nilable(String), default: nil
  const :about, T.nilable(String), default: nil
  const :type, T.nilable(Inttegro::Price::Type), default: nil
  const :fixed_amount, T.nilable(Inttegro::Money::AmountParams), default: nil
  const :customer_selected_amount, T.nilable(Inttegro::Price::CustomerSelectedAmountParams), default: nil
end

#product_id ⇒ String? (readonly)

Product ID to associate this price with. Optional for fixed prices, required for customer_selected_amount prices, and immutable once set.

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

Returns:

  • (String, nil)


58
59
60
61
62
63
64
65
# File 'lib/inttegro/price/catalog_price_params.rb', line 58

class CatalogPriceParams < T::Struct
  const :product_id, T.nilable(String), default: nil
  const :label, T.nilable(String), default: nil
  const :about, T.nilable(String), default: nil
  const :type, T.nilable(Inttegro::Price::Type), default: nil
  const :fixed_amount, T.nilable(Inttegro::Money::AmountParams), default: nil
  const :customer_selected_amount, T.nilable(Inttegro::Price::CustomerSelectedAmountParams), default: nil
end

#type ⇒ Inttegro::Price::Type? (readonly)

Price definition discriminator.

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

Returns:



58
59
60
61
62
63
64
65
# File 'lib/inttegro/price/catalog_price_params.rb', line 58

class CatalogPriceParams < T::Struct
  const :product_id, T.nilable(String), default: nil
  const :label, T.nilable(String), default: nil
  const :about, T.nilable(String), default: nil
  const :type, T.nilable(Inttegro::Price::Type), default: nil
  const :fixed_amount, T.nilable(Inttegro::Money::AmountParams), default: nil
  const :customer_selected_amount, T.nilable(Inttegro::Price::CustomerSelectedAmountParams), default: nil
end