Class: Courier::Models::UserProfile

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

Defined Under Namespace

Classes: Address

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(address: nil, airship: nil, apn: nil, aws_sns: nil, birthdate: nil, custom: nil, discord: nil, email: nil, email_verified: nil, expo: nil, facebook_psid: nil, family_name: nil, firebase_token: nil, gender: nil, given_name: nil, intercom: nil, locale: nil, middle_name: nil, ms_teams: nil, name: nil, nickname: nil, phone_number: nil, phone_number_verified: nil, picture: nil, preferred_name: nil, profile: nil, slack: nil, sub: nil, updated_at: nil, website: nil, zoneinfo: nil) ⇒ UserProfile

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

Parameters:

  • address (Courier::Models::UserProfile::Address, nil) (defaults to: nil)
  • airship (Courier::Models::AirshipProfile, nil) (defaults to: nil)
  • apn (Courier::Models::Token, Courier::Models::MultipleTokens, nil) (defaults to: nil) —

    Apple Push Notification device tokens. Supply either a single token or a `toke

  • aws_sns (Courier::Models::AwsSns, nil) (defaults to: nil) —

    Routes a push notification through the AWS SNS provider. The target ARN must be

  • birthdate (String, nil) (defaults to: nil)
  • custom (Hash{Symbol=>Object}, nil) (defaults to: nil) —

    A free form object. Due to a limitation of the API Explorer, you can only enter

  • discord (Courier::Models::SendToChannel, Courier::Models::SendDirectMessage, nil) (defaults to: nil)
  • email (String, nil) (defaults to: nil)
  • email_verified (Boolean, nil) (defaults to: nil)
  • expo (Courier::Models::Token, Courier::Models::MultipleTokens, nil) (defaults to: nil) —

    Expo push tokens. Supply either a single token or a tokens value.

  • facebook_psid (String, nil) (defaults to: nil)
  • family_name (String, nil) (defaults to: nil)
  • firebase_token (String, Array<String>, nil) (defaults to: nil)
  • gender (String, nil) (defaults to: nil)
  • given_name (String, nil) (defaults to: nil)
  • intercom (Courier::Models::Intercom, nil) (defaults to: nil)
  • locale (String, nil) (defaults to: nil)
  • middle_name (String, nil) (defaults to: nil)
  • ms_teams (Courier::Models::SendToMsTeamsUserID, Courier::Models::SendToMsTeamsEmail, Courier::Models::SendToMsTeamsChannelID, Courier::Models::SendToMsTeamsConversationID, Courier::Models::SendToMsTeamsChannelName, nil) (defaults to: nil) —

    Provide at least one of tenant_id or service_url. If you provide both, they

  • name (String, nil) (defaults to: nil)
  • nickname (String, nil) (defaults to: nil)
  • phone_number (String, nil) (defaults to: nil)
  • phone_number_verified (Boolean, nil) (defaults to: nil)
  • picture (String, nil) (defaults to: nil)
  • preferred_name (String, nil) (defaults to: nil)
  • profile (String, nil) (defaults to: nil)
  • slack (Courier::Models::SendToSlackChannel, Courier::Models::SendToSlackEmail, Courier::Models::SendToSlackUserID, nil) (defaults to: nil)
  • sub (String, nil) (defaults to: nil)
  • updated_at (String, nil) (defaults to: nil)
  • website (String, nil) (defaults to: nil)
  • zoneinfo (String, nil) (defaults to: nil)
  • address: (Courier::UserProfile::Address, nil) (defaults to: nil)
  • airship: (Courier::AirshipProfile, nil) (defaults to: nil)
  • apn: (Courier::Models::apn, nil) (defaults to: nil)
  • aws_sns: (Courier::AwsSns, nil) (defaults to: nil)
  • birthdate: (String, nil) (defaults to: nil)
  • custom: (::Hash[Symbol, top], nil) (defaults to: nil)
  • discord: (Courier::Models::discord, nil) (defaults to: nil)
  • email: (String, nil) (defaults to: nil)
  • email_verified: (Boolean, nil) (defaults to: nil)
  • expo: (Courier::Models::expo, nil) (defaults to: nil)
  • facebook_psid: (String, nil) (defaults to: nil)
  • family_name: (String, nil) (defaults to: nil)
  • firebase_token: (Courier::Models::user_profile_firebase_token, nil) (defaults to: nil)
  • gender: (String, nil) (defaults to: nil)
  • given_name: (String, nil) (defaults to: nil)
  • intercom: (Courier::Intercom, nil) (defaults to: nil)
  • locale: (String, nil) (defaults to: nil)
  • middle_name: (String, nil) (defaults to: nil)
  • ms_teams: (Courier::Models::ms_teams, nil) (defaults to: nil)
  • name: (String, nil) (defaults to: nil)
  • nickname: (String, nil) (defaults to: nil)
  • phone_number: (String, nil) (defaults to: nil)
  • phone_number_verified: (Boolean, nil) (defaults to: nil)
  • picture: (String, nil) (defaults to: nil)
  • preferred_name: (String, nil) (defaults to: nil)
  • profile: (String, nil) (defaults to: nil)
  • slack: (Courier::Models::slack, nil) (defaults to: nil)
  • sub: (String, nil) (defaults to: nil)
  • updated_at: (String, nil) (defaults to: nil)
  • website: (String, nil) (defaults to: nil)
  • zoneinfo: (String, nil) (defaults to: nil)


# File 'lib/courier/models/user_profile.rb', line 175

Instance Attribute Details

#address ⇒ Courier::Models::UserProfile::Address?

Parameters:

  • value (Courier::UserProfile::Address, nil)

Returns:



9
# File 'lib/courier/models/user_profile.rb', line 9

optional :address, -> { Courier::UserProfile::Address }, nil?: true

#airship ⇒ Courier::Models::AirshipProfile?

Parameters:

Returns:



14
# File 'lib/courier/models/user_profile.rb', line 14

optional :airship, -> { Courier::AirshipProfile }, nil?: true

#apn ⇒ Courier::Models::Token, ...

Apple Push Notification device tokens. Supply either a single token or a tokens value. A bare string is rejected by the provider — the token must be wrapped in this object.

Parameters:

  • value (Courier::Models::apn, nil)

Returns:



22
# File 'lib/courier/models/user_profile.rb', line 22

optional :apn, union: -> { Courier::Apn }, nil?: true

#aws_sns ⇒ Courier::Models::AwsSns?

Routes a push notification through the AWS SNS provider. The target ARN must be nested under aws_sns — a top-level target_arn on the profile is ignored by the provider.

Parameters:

Returns:



30
# File 'lib/courier/models/user_profile.rb', line 30

optional :aws_sns, -> { Courier::AwsSns }, nil?: true

#birthdate ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


35
# File 'lib/courier/models/user_profile.rb', line 35

optional :birthdate, String, nil?: true

#custom ⇒ Hash{Symbol=>Object}?

A free form object. Due to a limitation of the API Explorer, you can only enter string key/values below, but this API accepts more complex object structures.

Parameters:

  • value (::Hash[Symbol, top], nil)

Returns:

  • (Hash{Symbol=>Object}, nil)


42
# File 'lib/courier/models/user_profile.rb', line 42

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

#discord ⇒ Courier::Models::SendToChannel, ...

Parameters:

  • value (Courier::Models::discord, nil)

Returns:



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

optional :discord, union: -> { Courier::Discord }, nil?: true

#email ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


52
# File 'lib/courier/models/user_profile.rb', line 52

optional :email, String, nil?: true

#email_verified ⇒ Boolean?

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


57
# File 'lib/courier/models/user_profile.rb', line 57

optional :email_verified, Courier::Internal::Type::Boolean, nil?: true

#expo ⇒ Courier::Models::Token, ...

Expo push tokens. Supply either a single token or a tokens value.

Parameters:

  • value (Courier::Models::expo, nil)

Returns:



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

optional :expo, union: -> { Courier::Expo }, nil?: true

#facebook_psid ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


68
# File 'lib/courier/models/user_profile.rb', line 68

optional :facebook_psid, String, api_name: :facebookPSID, nil?: true

#family_name ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


73
# File 'lib/courier/models/user_profile.rb', line 73

optional :family_name, String, nil?: true

#firebase_token ⇒ String, ...

Parameters:

  • value (Courier::Models::user_profile_firebase_token, nil)

Returns:

  • (String, Array<String>, nil)


78
79
80
81
# File 'lib/courier/models/user_profile.rb', line 78

optional :firebase_token,
union: -> { Courier::UserProfileFirebaseToken },
api_name: :firebaseToken,
nil?: true

#gender ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


86
# File 'lib/courier/models/user_profile.rb', line 86

optional :gender, String, nil?: true

#given_name ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


91
# File 'lib/courier/models/user_profile.rb', line 91

optional :given_name, String, nil?: true

#intercom ⇒ Courier::Models::Intercom?

Parameters:

Returns:



96
# File 'lib/courier/models/user_profile.rb', line 96

optional :intercom, -> { Courier::Intercom }, nil?: true

#locale ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


101
# File 'lib/courier/models/user_profile.rb', line 101

optional :locale, String, nil?: true

#middle_name ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


106
# File 'lib/courier/models/user_profile.rb', line 106

optional :middle_name, String, nil?: true

#ms_teams ⇒ Courier::Models::SendToMsTeamsUserID, ...

Provide at least one of tenant_id or service_url. If you provide both, they must agree.



113
# File 'lib/courier/models/user_profile.rb', line 113

optional :ms_teams, union: -> { Courier::MsTeams }, nil?: true

#name ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


118
# File 'lib/courier/models/user_profile.rb', line 118

optional :name, String, nil?: true

#nickname ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


123
# File 'lib/courier/models/user_profile.rb', line 123

optional :nickname, String, nil?: true

#phone_number ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


128
# File 'lib/courier/models/user_profile.rb', line 128

optional :phone_number, String, nil?: true

#phone_number_verified ⇒ Boolean?

Parameters:

  • value (Boolean, nil)

Returns:

  • (Boolean, nil)


133
# File 'lib/courier/models/user_profile.rb', line 133

optional :phone_number_verified, Courier::Internal::Type::Boolean, nil?: true

#picture ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


138
# File 'lib/courier/models/user_profile.rb', line 138

optional :picture, String, nil?: true

#preferred_name ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


143
# File 'lib/courier/models/user_profile.rb', line 143

optional :preferred_name, String, nil?: true

#profile ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


148
# File 'lib/courier/models/user_profile.rb', line 148

optional :profile, String, nil?: true

#slack ⇒ Courier::Models::SendToSlackChannel, ...

Parameters:

  • value (Courier::Models::slack, nil)

Returns:



153
# File 'lib/courier/models/user_profile.rb', line 153

optional :slack, union: -> { Courier::Slack }, nil?: true

#sub ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


158
# File 'lib/courier/models/user_profile.rb', line 158

optional :sub, String, nil?: true

#updated_at ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


163
# File 'lib/courier/models/user_profile.rb', line 163

optional :updated_at, String, nil?: true

#website ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


168
# File 'lib/courier/models/user_profile.rb', line 168

optional :website, String, nil?: true

#zoneinfo ⇒ String?

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


173
# File 'lib/courier/models/user_profile.rb', line 173

optional :zoneinfo, String, nil?: true

Instance Method Details

#to_hash ⇒ { address: Courier::UserProfile::Address?, airship: Courier::AirshipProfile?, apn: Courier::Models::apn?, aws_sns: Courier::AwsSns?, birthdate: String?, custom: ::Hash[Symbol, top]?, discord: Courier::Models::discord?, email: String?, email_verified: bool?, expo: Courier::Models::expo?, facebook_psid: String?, family_name: String?, firebase_token: Courier::Models::user_profile_firebase_token?, gender: String?, given_name: String?, intercom: Courier::Intercom?, locale: String?, middle_name: String?, ms_teams: Courier::Models::ms_teams?, name: String?, nickname: String?, phone_number: String?, phone_number_verified: bool?, picture: String?, preferred_name: String?, profile: String?, slack: Courier::Models::slack?, sub: String?, updated_at: String?, website: String?, zoneinfo: String? }

Returns:

  • ({ address: Courier::UserProfile::Address?, airship: Courier::AirshipProfile?, apn: Courier::Models::apn?, aws_sns: Courier::AwsSns?, birthdate: String?, custom: ::Hash[Symbol, top]?, discord: Courier::Models::discord?, email: String?, email_verified: bool?, expo: Courier::Models::expo?, facebook_psid: String?, family_name: String?, firebase_token: Courier::Models::user_profile_firebase_token?, gender: String?, given_name: String?, intercom: Courier::Intercom?, locale: String?, middle_name: String?, ms_teams: Courier::Models::ms_teams?, name: String?, nickname: String?, phone_number: String?, phone_number_verified: bool?, picture: String?, preferred_name: String?, profile: String?, slack: Courier::Models::slack?, sub: String?, updated_at: String?, website: String?, zoneinfo: String? })


135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# File 'sig/courier/models/user_profile.rbs', line 135

def to_hash: -> {
  address: Courier::UserProfile::Address?,
  airship: Courier::AirshipProfile?,
  apn: Courier::Models::apn?,
  aws_sns: Courier::AwsSns?,
  birthdate: String?,
  custom: ::Hash[Symbol, top]?,
  discord: Courier::Models::discord?,
  email: String?,
  email_verified: bool?,
  expo: Courier::Models::expo?,
  facebook_psid: String?,
  family_name: String?,
  firebase_token: Courier::Models::user_profile_firebase_token?,
  gender: String?,
  given_name: String?,
  intercom: Courier::Intercom?,
  locale: String?,
  middle_name: String?,
  ms_teams: Courier::Models::ms_teams?,
  name: String?,
  nickname: String?,
  phone_number: String?,
  phone_number_verified: bool?,
  picture: String?,
  preferred_name: String?,
  profile: String?,
  slack: Courier::Models::slack?,
  sub: String?,
  updated_at: String?,
  website: String?,
  zoneinfo: String?
}