Class: Knockapi::Models::Recipients::RecipientsChannelData::Data::PushChannelDataFull::Device

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/knockapi/models/recipients/channel_data.rb

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(devices:, tokens:) ⇒ Object

Some parameter documentations has been truncated, see Knockapi::Models::Recipients::RecipientsChannelData::Data::PushChannelDataFull for more details.

Push channel data.

Parameters:



92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/knockapi/models/recipients/channel_data.rb', line 92

class Device < Knockapi::Internal::Type::BaseModel
  # @!attribute token
  #   The device token to send the push notification to.
  #
  #   @return [String]
  required :token, String

  # @!attribute locale
  #   The locale of the object. Used for
  #   [message localization](/concepts/translations).
  #
  #   @return [String, nil]
  optional :locale, String, nil?: true

  # @!attribute timezone
  #   The timezone of the object. Must be a
  #   valid [tz database time zone string](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
  #   Used
  #   for [recurring schedules](/concepts/schedules#scheduling-workflows-with-recurring-schedules-for-recipients).
  #
  #   @return [String, nil]
  optional :timezone, String, nil?: true

  # @!method initialize(token:, locale: nil, timezone: nil)
  #   Some parameter documentations has been truncated, see
  #   {Knockapi::Models::Recipients::RecipientsChannelData::Data::PushChannelDataFull::Device}
  #   for more details.
  #
  #   @param token [String] The device token to send the push notification to.
  #
  #   @param locale [String, nil] The locale of the object. Used for [message localization](/concepts/translations
  #
  #   @param timezone [String, nil] The timezone of the object. Must be a valid [tz database time zone string](https
end

Instance Attribute Details

#localeString?

The locale of the object. Used for [message localization](/concepts/translations).

Returns:

  • (String, nil)


104
# File 'lib/knockapi/models/recipients/channel_data.rb', line 104

optional :locale, String, nil?: true

#timezoneString?

The timezone of the object. 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)


113
# File 'lib/knockapi/models/recipients/channel_data.rb', line 113

optional :timezone, String, nil?: true

#tokenString

The device token to send the push notification to.

Returns:

  • (String)


97
# File 'lib/knockapi/models/recipients/channel_data.rb', line 97

required :token, String