Class: Courier::Models::Users::PreferenceBulkUpdateParams::Topic

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

Defined Under Namespace

Modules: Status

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(status:, topic_id:, custom_routing: nil, has_custom_routing: nil) ⇒ Object

Parameters:

  • status (Symbol, Courier::Models::Users::PreferenceBulkUpdateParams::Topic::Status)

    The subscription status to apply for this topic.

  • topic_id (String)

    A unique identifier associated with a subscription topic.

  • custom_routing (Array<Symbol, Courier::Models::ChannelClassification>) (defaults to: nil)

    The channels a user has chosen to receive notifications through for this topic.

  • has_custom_routing (Boolean) (defaults to: nil)

    Whether the recipient has chosen specific delivery channels for this topic.



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
# File 'lib/courier/models/users/preference_bulk_update_params.rb', line 42

class Topic < Courier::Internal::Type::BaseModel
  # @!attribute status
  #   The subscription status to apply for this topic.
  #
  #   @return [Symbol, Courier::Models::Users::PreferenceBulkUpdateParams::Topic::Status]
  required :status, enum: -> { Courier::Users::PreferenceBulkUpdateParams::Topic::Status }

  # @!attribute topic_id
  #   A unique identifier associated with a subscription topic.
  #
  #   @return [String]
  required :topic_id, String

  # @!attribute custom_routing
  #   The channels a user has chosen to receive notifications through for this topic.
  #
  #   @return [Array<Symbol, Courier::Models::ChannelClassification>, nil]
  optional :custom_routing, -> { Courier::Internal::Type::ArrayOf[enum: Courier::ChannelClassification] }

  # @!attribute has_custom_routing
  #   Whether the recipient has chosen specific delivery channels for this topic.
  #
  #   @return [Boolean, nil]
  optional :has_custom_routing, Courier::Internal::Type::Boolean

  # @!method initialize(status:, topic_id:, custom_routing: nil, has_custom_routing: nil)
  #   @param status [Symbol, Courier::Models::Users::PreferenceBulkUpdateParams::Topic::Status] The subscription status to apply for this topic.
  #
  #   @param topic_id [String] A unique identifier associated with a subscription topic.
  #
  #   @param custom_routing [Array<Symbol, Courier::Models::ChannelClassification>] The channels a user has chosen to receive notifications through for this topic.
  #
  #   @param has_custom_routing [Boolean] Whether the recipient has chosen specific delivery channels for this topic.

  # The subscription status to apply for this topic.
  #
  # @see Courier::Models::Users::PreferenceBulkUpdateParams::Topic#status
  module Status
    extend Courier::Internal::Type::Enum

    OPTED_IN = :OPTED_IN
    OPTED_OUT = :OPTED_OUT

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

Instance Attribute Details

#custom_routingArray<Symbol, Courier::Models::ChannelClassification>?

The channels a user has chosen to receive notifications through for this topic.

Returns:



59
# File 'lib/courier/models/users/preference_bulk_update_params.rb', line 59

optional :custom_routing, -> { Courier::Internal::Type::ArrayOf[enum: Courier::ChannelClassification] }

#has_custom_routingBoolean?

Whether the recipient has chosen specific delivery channels for this topic.

Parameters:

  • (Boolean)

Returns:

  • (Boolean, nil)


65
# File 'lib/courier/models/users/preference_bulk_update_params.rb', line 65

optional :has_custom_routing, Courier::Internal::Type::Boolean

#statusSymbol, Courier::Models::Users::PreferenceBulkUpdateParams::Topic::Status

The subscription status to apply for this topic.

Parameters:

  • value (Courier::Models::Users::PreferenceBulkUpdateParams::Topic::status)

Returns:



47
# File 'lib/courier/models/users/preference_bulk_update_params.rb', line 47

required :status, enum: -> { Courier::Users::PreferenceBulkUpdateParams::Topic::Status }

#topic_idString

A unique identifier associated with a subscription topic.

Parameters:

  • value (String)

Returns:

  • (String)


53
# File 'lib/courier/models/users/preference_bulk_update_params.rb', line 53

required :topic_id, String

Instance Method Details

#to_hash{

Returns:

  • ({)


66
# File 'sig/courier/models/users/preference_bulk_update_params.rbs', line 66

def to_hash: -> {