Class: Inttegro::Product::AddPriceRequest
- Inherits:
-
T::Struct
- Object
- T::Struct
- Inttegro::Product::AddPriceRequest
- Defined in:
- lib/inttegro/product/add_price_request.rb
Overview
Typed representation of the add price request 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
-
#about ⇒ String?
readonly
Optional internal description for the new price.
-
#customer_selected_amount ⇒ Inttegro::Price::CustomerSelectedAmountParams?
readonly
Required when type is customer_selected_amount.
-
#fixed_amount ⇒ Inttegro::Money::AmountParams?
readonly
Required when type is fixed_amount.
-
#label ⇒ String?
readonly
Optional short label for the new price.
-
#product_id ⇒ String
readonly
Product ID to attach the new price to.
-
#type ⇒ Inttegro::Price::Type?
readonly
Price definition discriminator.
Instance Attribute Details
#about ⇒ String? (readonly)
Optional internal description for the new price
Optional in the API payload; omitted values default to nil. Wire name: about.
57 58 59 60 61 62 63 64 |
# File 'lib/inttegro/product/add_price_request.rb', line 57 class AddPriceRequest < T::Struct const :product_id, String 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.
57 58 59 60 61 62 63 64 |
# File 'lib/inttegro/product/add_price_request.rb', line 57 class AddPriceRequest < T::Struct const :product_id, String 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.
57 58 59 60 61 62 63 64 |
# File 'lib/inttegro/product/add_price_request.rb', line 57 class AddPriceRequest < T::Struct const :product_id, String 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)
Optional short label for the new price
Optional in the API payload; omitted values default to nil. Wire name: label.
57 58 59 60 61 62 63 64 |
# File 'lib/inttegro/product/add_price_request.rb', line 57 class AddPriceRequest < T::Struct const :product_id, String 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 attach the new price to
Required in the API payload. Wire name: product_id.
57 58 59 60 61 62 63 64 |
# File 'lib/inttegro/product/add_price_request.rb', line 57 class AddPriceRequest < T::Struct const :product_id, String 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.
57 58 59 60 61 62 63 64 |
# File 'lib/inttegro/product/add_price_request.rb', line 57 class AddPriceRequest < T::Struct const :product_id, String 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 |