Class: Courier::Models::UserRecipient

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

Defined Under Namespace

Classes: Preferences

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(account_id: nil, context: nil, data: nil, email: nil, list_id: nil, locale: nil, phone_number: nil, preferences: nil, tenant_id: nil, user_id: nil) ⇒ UserRecipient

Some parameter documentations has been truncated, see Courier::Models::UserRecipient for more details.

Parameters:

  • (defaults to: nil)

    Deprecated - Use tenant_id instead.

  • (defaults to: nil)

    Context such as tenant_id to send the notification with.

  • (defaults to: nil)
  • (defaults to: nil)

    The user's email address.

  • (defaults to: nil)

    The id of the list to send the message to.

  • (defaults to: nil)

    The user's preferred ISO 639-1 language code.

  • (defaults to: nil)

    The user's phone number.

  • (defaults to: nil)
  • (defaults to: nil)

    The id of the tenant the user is associated with.

  • (defaults to: nil)

    The user's unique identifier. Typically, this will match the user id of a user i

  • (defaults to: nil)
  • (defaults to: nil)
  • (defaults to: nil)
  • (defaults to: nil)
  • (defaults to: nil)
  • (defaults to: nil)
  • (defaults to: nil)
  • (defaults to: nil)
  • (defaults to: nil)
  • (defaults to: nil)


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

Instance Attribute Details

#account_id ⇒ String?

Deprecated - Use tenant_id instead.

Parameters:

Returns:



10
# File 'lib/courier/models/user_recipient.rb', line 10

optional :account_id, String, nil?: true

#context ⇒ Courier::Models::MessageContext?

Context such as tenant_id to send the notification with.

Parameters:

Returns:



16
# File 'lib/courier/models/user_recipient.rb', line 16

optional :context, -> { Courier::MessageContext }, nil?: true

#data ⇒ Hash{Symbol=>Object}?

Parameters:

Returns:



21
# File 'lib/courier/models/user_recipient.rb', line 21

optional :data, Courier::Internal::Type::HashOf[Courier::Internal::Type::Unknown], nil?: true

#email ⇒ String?

The user's email address.

Parameters:

Returns:



27
# File 'lib/courier/models/user_recipient.rb', line 27

optional :email, String, nil?: true

#list_id ⇒ String?

The id of the list to send the message to.

Parameters:

Returns:



33
# File 'lib/courier/models/user_recipient.rb', line 33

optional :list_id, String, nil?: true

#locale ⇒ String?

The user's preferred ISO 639-1 language code.

Parameters:

Returns:



39
# File 'lib/courier/models/user_recipient.rb', line 39

optional :locale, String, nil?: true

#phone_number ⇒ String?

The user's phone number.

Parameters:

Returns:



45
# File 'lib/courier/models/user_recipient.rb', line 45

optional :phone_number, String, nil?: true

#preferences ⇒ Courier::Models::UserRecipient::Preferences?

Parameters:

Returns:



50
# File 'lib/courier/models/user_recipient.rb', line 50

optional :preferences, -> { Courier::UserRecipient::Preferences }, nil?: true

#tenant_id ⇒ String?

The id of the tenant the user is associated with.

Parameters:

Returns:



56
# File 'lib/courier/models/user_recipient.rb', line 56

optional :tenant_id, String, nil?: true

#user_id ⇒ String?

The user's unique identifier. Typically, this will match the user id of a user in your system.

Parameters:

Returns:



63
# File 'lib/courier/models/user_recipient.rb', line 63

optional :user_id, String, nil?: true

Instance Method Details

#to_hash ⇒ { account_id: String?, context: Courier::MessageContext?, data: ::Hash[Symbol, top]?, email: String?, list_id: String?, locale: String?, phone_number: String?, preferences: Courier::UserRecipient::Preferences?, tenant_id: String?, user_id: String? }

Returns:



51
52
53
54
55
56
57
58
59
60
61
62
# File 'sig/courier/models/user_recipient.rbs', line 51

def to_hash: -> {
  account_id: String?,
  context: Courier::MessageContext?,
  data: ::Hash[Symbol, top]?,
  email: String?,
  list_id: String?,
  locale: String?,
  phone_number: String?,
  preferences: Courier::UserRecipient::Preferences?,
  tenant_id: String?,
  user_id: String?
}