Class: Courier::Models::Users::TokenUpdateParams::Patch

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/courier/models/users/token_update_params.rb,
sig/courier/models/users/token_update_params.rbs

Defined Under Namespace

Modules: Value

Instance Attribute 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(op:, path:, value: nil) ⇒ Object

Some parameter documentations has been truncated, see Courier::Models::Users::TokenUpdateParams::Patch for more details.

Parameters:

  • op (String) —

    The operation to perform.

  • path (String) —

    The JSON path specifying the part of the profile to operate on.

  • value (String, Boolean, Hash{Symbol=>Object}, nil) (defaults to: nil) —

    The value for the operation. A string for most fields; boolean false when disa



32
33
34
35
36
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
# File 'lib/courier/models/users/token_update_params.rb', line 32

class Patch < Courier::Internal::Type::BaseModel
  # @!attribute op
  #   The operation to perform.
  #
  #   @return [String]
  required :op, String

  # @!attribute path
  #   The JSON path specifying the part of the profile to operate on.
  #
  #   @return [String]
  required :path, String

  # @!attribute value
  #   The value for the operation. A string for most fields; boolean `false` when
  #   disabling token expiration via `expiry_date`, which cannot be expressed as a
  #   string.
  #
  #   @return [String, Boolean, Hash{Symbol=>Object}, nil]
  optional :value, union: -> { Courier::Users::TokenUpdateParams::Patch::Value }, nil?: true

  # @!method initialize(op:, path:, value: nil)
  #   Some parameter documentations has been truncated, see
  #   {Courier::Models::Users::TokenUpdateParams::Patch} for more details.
  #
  #   @param op [String] The operation to perform.
  #
  #   @param path [String] The JSON path specifying the part of the profile to operate on.
  #
  #   @param value [String, Boolean, Hash{Symbol=>Object}, nil] The value for the operation. A string for most fields; boolean `false` when disa

  # The value for the operation. A string for most fields; boolean `false` when
  # disabling token expiration via `expiry_date`, which cannot be expressed as a
  # string.
  #
  # @see Courier::Models::Users::TokenUpdateParams::Patch#value
  module Value
    extend Courier::Internal::Type::Union

    variant String

    variant Courier::Internal::Type::Boolean

    variant -> { Courier::Models::Users::TokenUpdateParams::Patch::Value::UnionMember2Map }

    # @!method self.variants
    #   @return [Array(String, Boolean, Hash{Symbol=>Object})]

    # @type [Courier::Internal::Type::Converter]
    UnionMember2Map = Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown]
  end
end

Instance Attribute Details

#op ⇒ String

The operation to perform.

Parameters:

  • value (String)

Returns:

  • (String)


37
# File 'lib/courier/models/users/token_update_params.rb', line 37

required :op, String

#path ⇒ String

The JSON path specifying the part of the profile to operate on.

Parameters:

  • value (String)

Returns:

  • (String)


43
# File 'lib/courier/models/users/token_update_params.rb', line 43

required :path, String

#value ⇒ String, ...

The value for the operation. A string for most fields; boolean false when disabling token expiration via expiry_date, which cannot be expressed as a string.

Parameters:

  • value (Courier::Models::Users::TokenUpdateParams::Patch::value, nil)

Returns:

  • (String, Boolean, Hash{Symbol=>Object}, nil)


51
# File 'lib/courier/models/users/token_update_params.rb', line 51

optional :value, union: -> { Courier::Users::TokenUpdateParams::Patch::Value }, nil?: true

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


56
# File 'sig/courier/models/users/token_update_params.rbs', line 56

def to_hash: -> {