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

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) ⇒ Patch

Returns a new instance of Patch.

Parameters:

  • op (String)

    The operation to perform.

  • path (String)

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

  • value (String, nil) (defaults to: nil)

    The value for the operation.

  • op: (String)
  • path: (String)
  • value: (String, nil) (defaults to: nil)


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
# 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.
  #
  #   @return [String, nil]
  optional :value, String, nil?: true

  # @!method initialize(op:, path:, value: nil)
  #   @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, nil] The value for the operation.
end

Instance Attribute Details

#opString

The operation to perform.

Parameters:

  • value (String)

Returns:

  • (String)


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

required :op, String

#pathString

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

#valueString?

The value for the operation.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

optional :value, String, nil?: true

Instance Method Details

#to_hash{ op: String, path: String, value: String? }

Returns:

  • ({ op: String, path: String, value: String? })


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

def to_hash: -> { op: String, path: String, value: String? }