Class: Inttegro::PurchaseIntent::CreateRequestQuantity

Inherits:
T::Struct
  • Object
show all
Defined in:
lib/inttegro/purchase_intent/create_request_quantity.rb

Overview

Quantity bounds the Buy link should enforce. Omit max when the Buy link has no upper quantity bound. When present, max must be greater than or equal to min.

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

#max ⇒ Integer? (readonly)

Optional maximum quantity the customer can buy. It must be greater than or equal to min.

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

Returns:

  • (Integer, nil)


30
31
32
33
# File 'lib/inttegro/purchase_intent/create_request_quantity.rb', line 30

class CreateRequestQuantity < T::Struct
  const :min, Integer
  const :max, T.nilable(Integer), default: nil
end

#min ⇒ Integer (readonly)

Minimum quantity the customer can buy

Required in the API payload. Wire name: min.

Returns:

  • (Integer)


30
31
32
33
# File 'lib/inttegro/purchase_intent/create_request_quantity.rb', line 30

class CreateRequestQuantity < T::Struct
  const :min, Integer
  const :max, T.nilable(Integer), default: nil
end