Class: Inttegro::PurchaseIntent::Quantity

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

Overview

Quantity bounds enforced by the hosted checkout. max is omitted when the offer has no upper bound.

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 hosted checkout allows. It is always greater than or equal to min when present.

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

Returns:

  • (Integer, nil)


31
32
33
34
# File 'lib/inttegro/purchase_intent/quantity.rb', line 31

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

#min ⇒ Integer (readonly)

Minimum quantity the hosted checkout allows

Required in the API payload. Wire name: min.

Returns:

  • (Integer)


31
32
33
34
# File 'lib/inttegro/purchase_intent/quantity.rb', line 31

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