Class: Inttegro::Price::SuggestedAmount

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

Overview

Typed representation of the suggested amount 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

#id ⇒ String (readonly)

Stable merchant-defined identifier for this suggestion

Required in the API payload. Wire name: id.

Returns:

  • (String)


35
36
37
38
39
# File 'lib/inttegro/price/suggested_amount.rb', line 35

class SuggestedAmount < T::Struct
  const :id, String
  const :value, Integer
  const :recommended, T.nilable(T::Boolean), default: nil
end

Whether this is the recommended suggestion

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

Returns:

  • (Boolean, nil)


35
36
37
38
39
# File 'lib/inttegro/price/suggested_amount.rb', line 35

class SuggestedAmount < T::Struct
  const :id, String
  const :value, Integer
  const :recommended, T.nilable(T::Boolean), default: nil
end

#value ⇒ Integer (readonly)

Suggested amount in the currency's smallest unit

Required in the API payload. Wire name: value.

Returns:

  • (Integer)


35
36
37
38
39
# File 'lib/inttegro/price/suggested_amount.rb', line 35

class SuggestedAmount < T::Struct
  const :id, String
  const :value, Integer
  const :recommended, T.nilable(T::Boolean), default: nil
end