Class: Orb::Models::Maximum::Filter
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Orb::Models::Maximum::Filter
- Defined in:
- lib/orb/models/maximum.rb,
sig/orb/models/maximum.rbs
Defined Under Namespace
Instance Attribute Summary collapse
-
#field ⇒ Symbol, Orb::Models::Maximum::Filter::Field
The property of the price to filter on.
-
#operator ⇒ Symbol, Orb::Models::Maximum::Filter::Operator
Should prices that match the filter be included or excluded.
-
#values ⇒ Array<String>
The IDs or values that match this filter.
Class Method Summary collapse
Instance Method Summary collapse
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(field:, operator:, values:) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/orb/models/maximum.rb', line 37 class Filter < Orb::Internal::Type::BaseModel # @!attribute field # The property of the price to filter on. # # @return [Symbol, Orb::Models::Maximum::Filter::Field] required :field, enum: -> { Orb::Maximum::Filter::Field } # @!attribute operator # Should prices that match the filter be included or excluded. # # @return [Symbol, Orb::Models::Maximum::Filter::Operator] required :operator, enum: -> { Orb::Maximum::Filter::Operator } # @!attribute values # The IDs or values that match this filter. # # @return [Array<String>] required :values, Orb::Internal::Type::ArrayOf[String] # @!method initialize(field:, operator:, values:) # @param field [Symbol, Orb::Models::Maximum::Filter::Field] The property of the price to filter on. # # @param operator [Symbol, Orb::Models::Maximum::Filter::Operator] Should prices that match the filter be included or excluded. # # @param values [Array<String>] The IDs or values that match this filter. # The property of the price to filter on. # # @see Orb::Models::Maximum::Filter#field module Field extend Orb::Internal::Type::Enum PRICE_ID = :price_id ITEM_ID = :item_id PRICE_TYPE = :price_type CURRENCY = :currency PRICING_UNIT_ID = :pricing_unit_id # @!method self.values # @return [Array<Symbol>] end # Should prices that match the filter be included or excluded. # # @see Orb::Models::Maximum::Filter#operator module Operator extend Orb::Internal::Type::Enum INCLUDES = :includes EXCLUDES = :excludes # @!method self.values # @return [Array<Symbol>] end end |
Instance Attribute Details
#field ⇒ Symbol, Orb::Models::Maximum::Filter::Field
The property of the price to filter on.
42 |
# File 'lib/orb/models/maximum.rb', line 42 required :field, enum: -> { Orb::Maximum::Filter::Field } |
#operator ⇒ Symbol, Orb::Models::Maximum::Filter::Operator
Should prices that match the filter be included or excluded.
48 |
# File 'lib/orb/models/maximum.rb', line 48 required :operator, enum: -> { Orb::Maximum::Filter::Operator } |
#values ⇒ Array<String>
The IDs or values that match this filter.
54 |
# File 'lib/orb/models/maximum.rb', line 54 required :values, Orb::Internal::Type::ArrayOf[String] |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/orb/models/maximum.rb', line 75
|
Instance Method Details
#to_hash ⇒ {
49 |
# File 'sig/orb/models/maximum.rbs', line 49
def to_hash: -> {
|