Class: MetronomeSDK::Models::V1::Contracts::QuantityRounding
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- MetronomeSDK::Models::V1::Contracts::QuantityRounding
- Defined in:
- lib/metronome_sdk/models/v1/contracts/quantity_rounding.rb
Defined Under Namespace
Modules: RoundingMethod
Instance Attribute Summary collapse
- #decimal_places ⇒ Float
- #rounding_method ⇒ Symbol, MetronomeSDK::Models::V1::Contracts::QuantityRounding::RoundingMethod
Instance Method Summary collapse
-
#initialize(decimal_places: , rounding_method: ) ⇒ Object
constructor
Optional.
Methods inherited from Internal::Type::BaseModel
==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml
Methods included from Internal::Type::Converter
#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info
Methods included from Internal::Util::SorbetRuntimeSupport
#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type
Constructor Details
#initialize(decimal_places: , rounding_method: ) ⇒ Object
Optional. Only valid for USAGE products. If provided, the quantity will be rounded using the provided rounding method and decimal places. For example, if the method is “round up” and the decimal places is 0, then the quantity will be rounded up to the nearest integer.
|
|
# File 'lib/metronome_sdk/models/v1/contracts/quantity_rounding.rb', line 18
|
Instance Attribute Details
#decimal_places ⇒ Float
11 |
# File 'lib/metronome_sdk/models/v1/contracts/quantity_rounding.rb', line 11 required :decimal_places, Float |
#rounding_method ⇒ Symbol, MetronomeSDK::Models::V1::Contracts::QuantityRounding::RoundingMethod
16 |
# File 'lib/metronome_sdk/models/v1/contracts/quantity_rounding.rb', line 16 required :rounding_method, enum: -> { MetronomeSDK::V1::Contracts::QuantityRounding::RoundingMethod } |