Class: Notiflows::Models::User

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/notiflows/models/user.rb

Overview

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(id:, created_at:, external_id:, updated_at:, avatar: nil, custom_fields: nil, email: nil, first_name: nil, last_name: nil, locale: nil, phone: nil, timezone: nil) ⇒ Object

Some parameter documentations has been truncated, see Notiflows::Models::User for more details.

A user (recipient) in your project

Parameters:

  • id (String) —

    Internal Notiflows user ID (UUIDv7)

  • created_at (Time) —

    When the user was created (ISO 8601)

  • external_id (String) —

    Your system's unique identifier for this user

  • updated_at (Time) —

    When the user was last updated (ISO 8601)

  • avatar (String, nil) (defaults to: nil) —

    URL to user's avatar image (must be https://)

  • custom_fields (Object, nil) (defaults to: nil) —

    Arbitrary JSON object for additional user attributes. Accessible in templates as

  • email (String, nil) (defaults to: nil) —

    User's email address for email notifications

  • first_name (String, nil) (defaults to: nil) —

    User's first name for personalization

  • last_name (String, nil) (defaults to: nil) —

    User's last name for personalization

  • locale (String, nil) (defaults to: nil) —

    BCP 47 locale code for localized notifications

  • phone (String, nil) (defaults to: nil) —

    User's phone number in E.164 format for SMS notifications

  • timezone (String, nil) (defaults to: nil) —

    IANA timezone for time-sensitive notifications



# File 'lib/notiflows/models/user.rb', line 80

Instance Attribute Details

#avatar ⇒ String?

URL to user's avatar image (must be https://)

Returns:

  • (String, nil)


35
# File 'lib/notiflows/models/user.rb', line 35

optional :avatar, String, nil?: true

#created_at ⇒ Time

When the user was created (ISO 8601)

Returns:

  • (Time)


17
# File 'lib/notiflows/models/user.rb', line 17

required :created_at, Time

#custom_fields ⇒ Object?

Arbitrary JSON object for additional user attributes. Accessible in templates as recipient.custom_fields.*

Returns:

  • (Object, nil)


42
# File 'lib/notiflows/models/user.rb', line 42

optional :custom_fields, Notiflows::Internal::Type::Unknown, nil?: true

#email ⇒ String?

User's email address for email notifications

Returns:

  • (String, nil)


48
# File 'lib/notiflows/models/user.rb', line 48

optional :email, String, nil?: true

#external_id ⇒ String

Your system's unique identifier for this user

Returns:

  • (String)


23
# File 'lib/notiflows/models/user.rb', line 23

required :external_id, String

#first_name ⇒ String?

User's first name for personalization

Returns:

  • (String, nil)


54
# File 'lib/notiflows/models/user.rb', line 54

optional :first_name, String, nil?: true

#id ⇒ String

Internal Notiflows user ID (UUIDv7)

Returns:

  • (String)


11
# File 'lib/notiflows/models/user.rb', line 11

required :id, String

#last_name ⇒ String?

User's last name for personalization

Returns:

  • (String, nil)


60
# File 'lib/notiflows/models/user.rb', line 60

optional :last_name, String, nil?: true

#locale ⇒ String?

BCP 47 locale code for localized notifications

Returns:

  • (String, nil)


66
# File 'lib/notiflows/models/user.rb', line 66

optional :locale, String, nil?: true

#phone ⇒ String?

User's phone number in E.164 format for SMS notifications

Returns:

  • (String, nil)


72
# File 'lib/notiflows/models/user.rb', line 72

optional :phone, String, nil?: true

#timezone ⇒ String?

IANA timezone for time-sensitive notifications

Returns:

  • (String, nil)


78
# File 'lib/notiflows/models/user.rb', line 78

optional :timezone, String, nil?: true

#updated_at ⇒ Time

When the user was last updated (ISO 8601)

Returns:

  • (Time)


29
# File 'lib/notiflows/models/user.rb', line 29

required :updated_at, Time