Class: Knockapi::Models::User

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/knockapi/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:, _typename:, updated_at:, avatar: nil, created_at: nil, email: nil, name: nil, phone_number: nil, timezone: nil) ⇒ Object

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

A [User](/concepts/users) represents an individual in your system who can receive notifications through Knock. Users are the most common recipients of notifications and are always referenced by your internal identifier.

Parameters:

  • id (String)

    The unique identifier of the user.

  • _typename (String)

    The typename of the schema.

  • updated_at (Time)

    The timestamp when the resource was last updated.

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

    A URL for the avatar of the user.

  • created_at (Time, nil) (defaults to: nil)

    The creation date of the user from your system.

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

    The primary email address for the user.

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

    Display name of the user.

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

    The timezone of the user. Must be a valid [tz database time zone string](https:/



# File 'lib/knockapi/models/user.rb', line 65

Instance Attribute Details

#_typenameString

The typename of the schema.

Returns:

  • (String)


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

required :_typename, String, api_name: :__typename

#avatarString?

A URL for the avatar of the user.

Returns:

  • (String, nil)


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

optional :avatar, String, nil?: true

#created_atTime?

The creation date of the user from your system.

Returns:

  • (Time, nil)


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

optional :created_at, Time, nil?: true

#emailString?

The primary email address for the user.

Returns:

  • (String, nil)


41
# File 'lib/knockapi/models/user.rb', line 41

optional :email, String, nil?: true

#idString

The unique identifier of the user.

Returns:

  • (String)


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

required :id, String

#nameString?

Display name of the user.

Returns:

  • (String, nil)


47
# File 'lib/knockapi/models/user.rb', line 47

optional :name, String, nil?: true

#phone_numberString?

The (www.twilio.com/docs/glossary/what-e164) phone number of the user (required for SMS channels).

Returns:

  • (String, nil)


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

optional :phone_number, String, nil?: true

#timezoneString?

The timezone of the user. Must be a valid [tz database time zone string](en.wikipedia.org/wiki/List_of_tz_database_time_zones). Used for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).

Returns:

  • (String, nil)


63
# File 'lib/knockapi/models/user.rb', line 63

optional :timezone, String, nil?: true

#updated_atTime

The timestamp when the resource was last updated.

Returns:

  • (Time)


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

required :updated_at, Time