Class: Knockapi::Models::Objects::BulkSetParams::Object

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/knockapi/models/objects/bulk_set_params.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(id:, channel_data: nil, created_at: nil, name: nil, preferences: nil) ⇒ Object

Some parameter documentations has been truncated, see Knockapi::Models::Objects::BulkSetParams::Object for more details.

A custom [Object](/concepts/objects) entity which belongs to a collection.

Parameters:



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/knockapi/models/objects/bulk_set_params.rb', line 22

class Object < Knockapi::Internal::Type::BaseModel
  # @!attribute id
  #   Unique identifier for the object.
  #
  #   @return [String]
  required :id, String

  # @!attribute channel_data
  #   A request to set channel data for a type of channel inline.
  #
  #   @return [Hash{Symbol=>Knockapi::Models::Recipients::PushChannelDataTokensOnly, Knockapi::Models::Recipients::PushChannelDataDevicesOnly, Knockapi::Models::Recipients::AwsSnsPushChannelDataTargetArnsOnly, Knockapi::Models::Recipients::AwsSnsPushChannelDataDevicesOnly, Knockapi::Models::Recipients::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData}, nil]
  optional :channel_data,
           -> {
             Knockapi::Internal::Type::HashOf[union: Knockapi::Recipients::InlineChannelDataRequestItem]
           },
           nil?: true

  # @!attribute created_at
  #   Timestamp when the resource was created.
  #
  #   @return [Time, nil]
  optional :created_at, Time, nil?: true

  # @!attribute name
  #   An optional name for the object.
  #
  #   @return [String, nil]
  optional :name, String, nil?: true

  # @!attribute preferences
  #   Inline set preferences for a recipient, where the key is the preference set id.
  #   Preferences that are set inline will be merged into any existing preferences
  #   rather than replacing them.
  #
  #   @return [Hash{Symbol=>Knockapi::Models::Recipients::PreferenceSetRequest}, nil]
  optional :preferences,
           -> { Knockapi::Internal::Type::HashOf[Knockapi::Recipients::PreferenceSetRequest] },
           nil?: true

  # @!method initialize(id:, channel_data: nil, created_at: nil, name: nil, preferences: nil)
  #   Some parameter documentations has been truncated, see
  #   {Knockapi::Models::Objects::BulkSetParams::Object} for more details.
  #
  #   A custom [Object](/concepts/objects) entity which belongs to a collection.
  #
  #   @param id [String] Unique identifier for the object.
  #
  #   @param channel_data [Hash{Symbol=>Knockapi::Models::Recipients::PushChannelDataTokensOnly, Knockapi::Models::Recipients::PushChannelDataDevicesOnly, Knockapi::Models::Recipients::AwsSnsPushChannelDataTargetArnsOnly, Knockapi::Models::Recipients::AwsSnsPushChannelDataDevicesOnly, Knockapi::Models::Recipients::OneSignalChannelDataPlayerIDsOnly, Knockapi::Models::Recipients::SlackChannelData, Knockapi::Models::Recipients::MsTeamsChannelData, Knockapi::Models::Recipients::DiscordChannelData}, nil] A request to set channel data for a type of channel inline.
  #
  #   @param created_at [Time, nil] Timestamp when the resource was created.
  #
  #   @param name [String, nil] An optional name for the object.
  #
  #   @param preferences [Hash{Symbol=>Knockapi::Models::Recipients::PreferenceSetRequest}, nil] Inline set preferences for a recipient, where the key is the preference set id.
end

Instance Attribute Details

#created_atTime?

Timestamp when the resource was created.

Returns:

  • (Time, nil)


43
# File 'lib/knockapi/models/objects/bulk_set_params.rb', line 43

optional :created_at, Time, nil?: true

#idString

Unique identifier for the object.

Returns:

  • (String)


27
# File 'lib/knockapi/models/objects/bulk_set_params.rb', line 27

required :id, String

#nameString?

An optional name for the object.

Returns:

  • (String, nil)


49
# File 'lib/knockapi/models/objects/bulk_set_params.rb', line 49

optional :name, String, nil?: true

#preferencesHash{Symbol=>Knockapi::Models::Recipients::PreferenceSetRequest}?

Inline set preferences for a recipient, where the key is the preference set id. Preferences that are set inline will be merged into any existing preferences rather than replacing them.



57
58
59
# File 'lib/knockapi/models/objects/bulk_set_params.rb', line 57

optional :preferences,
-> { Knockapi::Internal::Type::HashOf[Knockapi::Recipients::PreferenceSetRequest] },
nil?: true