Class: Inttegro::Product::AddPriceRequest

Inherits:
T::Struct
  • Object
show all
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

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.

Returns:

  • (String, nil)


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.

Returns:

  • (String, nil)


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.

Returns:

  • (String)


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.

Returns:



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