Class: Orb::Models::AlertUpdateParams::PriceFilter

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/orb/models/alert_update_params.rb,
sig/orb/models/alert_update_params.rbs

Defined Under Namespace

Modules: Field, Operator

Instance Attribute Summary collapse

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

Parameters:



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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/orb/models/alert_update_params.rb', line 54

class PriceFilter < Orb::Internal::Type::BaseModel
  # @!attribute field
  #   The property of the price to filter on.
  #
  #   @return [Symbol, Orb::Models::AlertUpdateParams::PriceFilter::Field]
  required :field, enum: -> { Orb::AlertUpdateParams::PriceFilter::Field }

  # @!attribute operator
  #   Should prices that match the filter be included or excluded.
  #
  #   @return [Symbol, Orb::Models::AlertUpdateParams::PriceFilter::Operator]
  required :operator, enum: -> { Orb::AlertUpdateParams::PriceFilter::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::AlertUpdateParams::PriceFilter::Field] The property of the price to filter on.
  #
  #   @param operator [Symbol, Orb::Models::AlertUpdateParams::PriceFilter::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::AlertUpdateParams::PriceFilter#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::AlertUpdateParams::PriceFilter#operator
  module Operator
    extend Orb::Internal::Type::Enum

    INCLUDES = :includes
    EXCLUDES = :excludes

    # @!method self.values
    #   @return [Array<Symbol>]
  end
end

Instance Attribute Details

#fieldSymbol, Orb::Models::AlertUpdateParams::PriceFilter::Field

The property of the price to filter on.

Parameters:

  • value (Orb::Models::AlertUpdateParams::PriceFilter::field)

Returns:



59
# File 'lib/orb/models/alert_update_params.rb', line 59

required :field, enum: -> { Orb::AlertUpdateParams::PriceFilter::Field }

#operatorSymbol, Orb::Models::AlertUpdateParams::PriceFilter::Operator

Should prices that match the filter be included or excluded.

Parameters:

  • value (Orb::Models::AlertUpdateParams::PriceFilter::operator)

Returns:



65
# File 'lib/orb/models/alert_update_params.rb', line 65

required :operator, enum: -> { Orb::AlertUpdateParams::PriceFilter::Operator }

#valuesArray<String>

The IDs or values that match this filter.

Parameters:

  • value (::Array[String])

Returns:

  • (Array<String>)


71
# File 'lib/orb/models/alert_update_params.rb', line 71

required :values, Orb::Internal::Type::ArrayOf[String]

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/orb/models/alert_update_params.rb', line 92

Instance Method Details

#to_hash{

Returns:

  • ({)


60
# File 'sig/orb/models/alert_update_params.rbs', line 60

def to_hash: -> {