Class: Courier::Models::Users::PreferenceBulkUpdateResponse::Error

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/courier/models/users/preference_bulk_update_response.rb,
sig/courier/models/users/preference_bulk_update_response.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(reason:, topic_id:) ⇒ Error

A single topic that could not be applied in a bulk preference request.

Parameters:

  • reason (String)

    A human-readable explanation of why the topic could not be applied.

  • topic_id (String)
  • reason: (String)
  • topic_id: (String)


26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/courier/models/users/preference_bulk_update_response.rb', line 26

class Error < Courier::Internal::Type::BaseModel
  # @!attribute reason
  #   A human-readable explanation of why the topic could not be applied.
  #
  #   @return [String]
  required :reason, String

  # @!attribute topic_id
  #
  #   @return [String]
  required :topic_id, String

  # @!method initialize(reason:, topic_id:)
  #   A single topic that could not be applied in a bulk preference request.
  #
  #   @param reason [String] A human-readable explanation of why the topic could not be applied.
  #
  #   @param topic_id [String]
end

Instance Attribute Details

#reasonString

A human-readable explanation of why the topic could not be applied.

Parameters:

  • value (String)

Returns:

  • (String)


31
# File 'lib/courier/models/users/preference_bulk_update_response.rb', line 31

required :reason, String

#topic_idString

Parameters:

  • value (String)

Returns:

  • (String)


36
# File 'lib/courier/models/users/preference_bulk_update_response.rb', line 36

required :topic_id, String

Instance Method Details

#to_hash{ reason: String, topic_id: String }

Returns:

  • ({ reason: String, topic_id: String })


34
# File 'sig/courier/models/users/preference_bulk_update_response.rbs', line 34

def to_hash: -> { reason: String, topic_id: String }