trycourier 4.4.0 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +22 -0
  3. data/README.md +9 -9
  4. data/lib/trycourier/internal/transport/pooled_net_requester.rb +12 -10
  5. data/lib/trycourier/internal/type/base_model.rb +4 -3
  6. data/lib/trycourier/internal/type/union.rb +7 -9
  7. data/lib/trycourier/internal/util.rb +7 -2
  8. data/lib/trycourier/models/airship_profile.rb +21 -0
  9. data/lib/trycourier/models/airship_profile_audience.rb +15 -0
  10. data/lib/trycourier/models/audience.rb +3 -3
  11. data/lib/trycourier/models/audience_filter.rb +52 -0
  12. data/lib/trycourier/models/audience_recipient.rb +36 -0
  13. data/lib/trycourier/models/audience_update_params.rb +3 -3
  14. data/lib/trycourier/models/automation_list_params.rb +47 -0
  15. data/lib/trycourier/models/automation_template.rb +61 -0
  16. data/lib/trycourier/models/automation_template_list_response.rb +24 -0
  17. data/lib/trycourier/models/device_type.rb +7 -0
  18. data/lib/trycourier/models/discord.rb +16 -0
  19. data/lib/trycourier/models/expo.rb +16 -0
  20. data/lib/trycourier/models/filter.rb +8 -51
  21. data/lib/trycourier/models/filter_config.rb +8 -51
  22. data/lib/trycourier/models/intercom.rb +21 -0
  23. data/lib/trycourier/models/intercom_recipient.rb +15 -0
  24. data/lib/trycourier/models/list_filter.rb +52 -0
  25. data/lib/trycourier/models/list_pattern_recipient.rb +23 -0
  26. data/lib/trycourier/models/list_recipient.rb +29 -0
  27. data/lib/trycourier/models/ms_teams.rb +22 -0
  28. data/lib/trycourier/models/ms_teams_base_properties.rb +21 -0
  29. data/lib/trycourier/models/ms_teams_recipient.rb +17 -0
  30. data/lib/trycourier/models/multiple_tokens.rb +15 -0
  31. data/lib/trycourier/models/nested_filter_config.rb +49 -0
  32. data/lib/trycourier/models/pagerduty.rb +33 -0
  33. data/lib/trycourier/models/pagerduty_recipient.rb +17 -0
  34. data/lib/trycourier/models/send_direct_message.rb +15 -0
  35. data/lib/trycourier/models/send_message_params.rb +24 -7
  36. data/lib/trycourier/models/send_to_channel.rb +15 -0
  37. data/lib/trycourier/models/send_to_ms_teams_channel_id.rb +27 -0
  38. data/lib/trycourier/models/send_to_ms_teams_channel_name.rb +33 -0
  39. data/lib/trycourier/models/send_to_ms_teams_conversation_id.rb +27 -0
  40. data/lib/trycourier/models/send_to_ms_teams_email.rb +27 -0
  41. data/lib/trycourier/models/send_to_ms_teams_user_id.rb +27 -0
  42. data/lib/trycourier/models/send_to_slack_channel.rb +21 -0
  43. data/lib/trycourier/models/send_to_slack_email.rb +21 -0
  44. data/lib/trycourier/models/send_to_slack_user_id.rb +21 -0
  45. data/lib/trycourier/models/single_filter_config.rb +62 -0
  46. data/lib/trycourier/models/slack.rb +18 -0
  47. data/lib/trycourier/models/slack_base_properties.rb +15 -0
  48. data/lib/trycourier/models/slack_recipient.rb +17 -0
  49. data/lib/trycourier/models/token.rb +15 -0
  50. data/lib/trycourier/models/user_profile.rb +274 -0
  51. data/lib/trycourier/models/user_profile_firebase_token.rb +19 -0
  52. data/lib/trycourier/models/webhook_auth_mode.rb +16 -0
  53. data/lib/trycourier/models/webhook_authentication.rb +40 -0
  54. data/lib/trycourier/models/webhook_method.rb +15 -0
  55. data/lib/trycourier/models/webhook_profile.rb +53 -0
  56. data/lib/trycourier/models/webhook_profile_type.rb +15 -0
  57. data/lib/trycourier/models/webhook_recipient.rb +17 -0
  58. data/lib/trycourier/models.rb +90 -2
  59. data/lib/trycourier/resources/audiences.rb +1 -1
  60. data/lib/trycourier/resources/automations.rb +27 -0
  61. data/lib/trycourier/version.rb +1 -1
  62. data/lib/trycourier.rb +45 -1
  63. data/rbi/trycourier/models/airship_profile.rbi +41 -0
  64. data/rbi/trycourier/models/airship_profile_audience.rbi +26 -0
  65. data/rbi/trycourier/models/audience.rbi +8 -7
  66. data/rbi/trycourier/models/audience_filter.rbi +88 -0
  67. data/rbi/trycourier/models/audience_recipient.rbi +52 -0
  68. data/rbi/trycourier/models/audience_update_params.rbi +25 -7
  69. data/rbi/trycourier/models/automation_list_params.rbi +95 -0
  70. data/rbi/trycourier/models/automation_template.rbi +102 -0
  71. data/rbi/trycourier/models/automation_template_list_response.rbi +54 -0
  72. data/rbi/trycourier/models/device_type.rbi +7 -0
  73. data/rbi/trycourier/models/discord.rbi +18 -0
  74. data/rbi/trycourier/models/expo.rbi +16 -0
  75. data/rbi/trycourier/models/filter.rbi +8 -78
  76. data/rbi/trycourier/models/filter_config.rbi +8 -83
  77. data/rbi/trycourier/models/intercom.rbi +35 -0
  78. data/rbi/trycourier/models/intercom_recipient.rbi +23 -0
  79. data/rbi/trycourier/models/list_filter.rbi +86 -0
  80. data/rbi/trycourier/models/list_pattern_recipient.rbi +39 -0
  81. data/rbi/trycourier/models/list_recipient.rbi +44 -0
  82. data/rbi/trycourier/models/ms_teams.rbi +24 -0
  83. data/rbi/trycourier/models/ms_teams_base_properties.rbi +31 -0
  84. data/rbi/trycourier/models/ms_teams_recipient.rbi +58 -0
  85. data/rbi/trycourier/models/multiple_tokens.rbi +27 -0
  86. data/rbi/trycourier/models/nested_filter_config.rbi +104 -0
  87. data/rbi/trycourier/models/pagerduty.rbi +53 -0
  88. data/rbi/trycourier/models/pagerduty_recipient.rbi +31 -0
  89. data/rbi/trycourier/models/send_direct_message.rbi +23 -0
  90. data/rbi/trycourier/models/send_message_params.rbi +34 -10
  91. data/rbi/trycourier/models/send_to_channel.rbi +23 -0
  92. data/rbi/trycourier/models/send_to_ms_teams_channel_id.rbi +42 -0
  93. data/rbi/trycourier/models/send_to_ms_teams_channel_name.rbi +51 -0
  94. data/rbi/trycourier/models/send_to_ms_teams_conversation_id.rbi +42 -0
  95. data/rbi/trycourier/models/send_to_ms_teams_email.rbi +37 -0
  96. data/rbi/trycourier/models/send_to_ms_teams_user_id.rbi +37 -0
  97. data/rbi/trycourier/models/send_to_slack_channel.rbi +28 -0
  98. data/rbi/trycourier/models/send_to_slack_email.rbi +28 -0
  99. data/rbi/trycourier/models/send_to_slack_user_id.rbi +28 -0
  100. data/rbi/trycourier/models/single_filter_config.rbi +116 -0
  101. data/rbi/trycourier/models/slack.rbi +22 -0
  102. data/rbi/trycourier/models/slack_base_properties.rbi +23 -0
  103. data/rbi/trycourier/models/slack_recipient.rbi +52 -0
  104. data/rbi/trycourier/models/token.rbi +21 -0
  105. data/rbi/trycourier/models/user_profile.rbi +377 -0
  106. data/rbi/trycourier/models/user_profile_firebase_token.rbi +25 -0
  107. data/rbi/trycourier/models/webhook_auth_mode.rbi +22 -0
  108. data/rbi/trycourier/models/webhook_authentication.rbi +64 -0
  109. data/rbi/trycourier/models/webhook_method.rbi +21 -0
  110. data/rbi/trycourier/models/webhook_profile.rbi +80 -0
  111. data/rbi/trycourier/models/webhook_profile_type.rbi +22 -0
  112. data/rbi/trycourier/models/webhook_recipient.rbi +31 -0
  113. data/rbi/trycourier/models.rbi +91 -2
  114. data/rbi/trycourier/resources/audiences.rbi +7 -1
  115. data/rbi/trycourier/resources/automations.rbi +19 -0
  116. data/sig/trycourier/models/airship_profile.rbs +25 -0
  117. data/sig/trycourier/models/airship_profile_audience.rbs +13 -0
  118. data/sig/trycourier/models/audience.rbs +4 -4
  119. data/sig/trycourier/models/audience_filter.rbs +50 -0
  120. data/sig/trycourier/models/audience_recipient.rbs +30 -0
  121. data/sig/trycourier/models/audience_update_params.rbs +8 -4
  122. data/sig/trycourier/models/automation_list_params.rbs +48 -0
  123. data/sig/trycourier/models/automation_template.rbs +55 -0
  124. data/sig/trycourier/models/automation_template_list_response.rbs +28 -0
  125. data/sig/trycourier/models/device_type.rbs +5 -0
  126. data/sig/trycourier/models/discord.rbs +11 -0
  127. data/sig/trycourier/models/expo.rbs +11 -0
  128. data/sig/trycourier/models/filter.rbs +4 -61
  129. data/sig/trycourier/models/filter_config.rbs +4 -61
  130. data/sig/trycourier/models/intercom.rbs +15 -0
  131. data/sig/trycourier/models/intercom_recipient.rbs +13 -0
  132. data/sig/trycourier/models/list_filter.rbs +50 -0
  133. data/sig/trycourier/models/list_pattern_recipient.rbs +19 -0
  134. data/sig/trycourier/models/list_recipient.rbs +30 -0
  135. data/sig/trycourier/models/ms_teams.rbs +16 -0
  136. data/sig/trycourier/models/ms_teams_base_properties.rbs +15 -0
  137. data/sig/trycourier/models/ms_teams_recipient.rbs +13 -0
  138. data/sig/trycourier/models/multiple_tokens.rbs +13 -0
  139. data/sig/trycourier/models/nested_filter_config.rbs +64 -0
  140. data/sig/trycourier/models/pagerduty.rbs +35 -0
  141. data/sig/trycourier/models/pagerduty_recipient.rbs +13 -0
  142. data/sig/trycourier/models/send_direct_message.rbs +13 -0
  143. data/sig/trycourier/models/send_message_params.rbs +9 -3
  144. data/sig/trycourier/models/send_to_channel.rbs +13 -0
  145. data/sig/trycourier/models/send_to_ms_teams_channel_id.rbs +26 -0
  146. data/sig/trycourier/models/send_to_ms_teams_channel_name.rbs +35 -0
  147. data/sig/trycourier/models/send_to_ms_teams_conversation_id.rbs +26 -0
  148. data/sig/trycourier/models/send_to_ms_teams_email.rbs +22 -0
  149. data/sig/trycourier/models/send_to_ms_teams_user_id.rbs +26 -0
  150. data/sig/trycourier/models/send_to_slack_channel.rbs +15 -0
  151. data/sig/trycourier/models/send_to_slack_email.rbs +15 -0
  152. data/sig/trycourier/models/send_to_slack_user_id.rbs +15 -0
  153. data/sig/trycourier/models/single_filter_config.rbs +69 -0
  154. data/sig/trycourier/models/slack.rbs +14 -0
  155. data/sig/trycourier/models/slack_base_properties.rbs +13 -0
  156. data/sig/trycourier/models/slack_recipient.rbs +13 -0
  157. data/sig/trycourier/models/token.rbs +13 -0
  158. data/sig/trycourier/models/user_profile.rbs +212 -0
  159. data/sig/trycourier/models/user_profile_firebase_token.rbs +13 -0
  160. data/sig/trycourier/models/webhook_auth_mode.rbs +15 -0
  161. data/sig/trycourier/models/webhook_authentication.rbs +35 -0
  162. data/sig/trycourier/models/webhook_method.rbs +14 -0
  163. data/sig/trycourier/models/webhook_profile.rbs +40 -0
  164. data/sig/trycourier/models/webhook_profile_type.rbs +14 -0
  165. data/sig/trycourier/models/webhook_recipient.rbs +13 -0
  166. data/sig/trycourier/models.rbs +92 -4
  167. data/sig/trycourier/resources/audiences.rbs +1 -1
  168. data/sig/trycourier/resources/automations.rbs +6 -0
  169. metadata +137 -5
  170. data/lib/trycourier/models/recipient.rb +0 -113
  171. data/rbi/trycourier/models/recipient.rbi +0 -161
  172. data/sig/trycourier/models/recipient.rbs +0 -92
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ class SingleFilterConfig < Trycourier::Internal::Type::BaseModel
6
+ # @!attribute operator
7
+ # The operator to use for filtering
8
+ #
9
+ # @return [Symbol, Trycourier::Models::SingleFilterConfig::Operator]
10
+ required :operator, enum: -> { Trycourier::SingleFilterConfig::Operator }
11
+
12
+ # @!attribute path
13
+ # The attribe name from profile whose value will be operated against the filter
14
+ # value
15
+ #
16
+ # @return [String]
17
+ required :path, String
18
+
19
+ # @!attribute value
20
+ # The value to use for filtering
21
+ #
22
+ # @return [String]
23
+ required :value, String
24
+
25
+ # @!method initialize(operator:, path:, value:)
26
+ # Some parameter documentations has been truncated, see
27
+ # {Trycourier::Models::SingleFilterConfig} for more details.
28
+ #
29
+ # @param operator [Symbol, Trycourier::Models::SingleFilterConfig::Operator] The operator to use for filtering
30
+ #
31
+ # @param path [String] The attribe name from profile whose value will be operated against the filter va
32
+ #
33
+ # @param value [String] The value to use for filtering
34
+
35
+ # The operator to use for filtering
36
+ #
37
+ # @see Trycourier::Models::SingleFilterConfig#operator
38
+ module Operator
39
+ extend Trycourier::Internal::Type::Enum
40
+
41
+ ENDS_WITH = :ENDS_WITH
42
+ EQ = :EQ
43
+ EXISTS = :EXISTS
44
+ GT = :GT
45
+ GTE = :GTE
46
+ INCLUDES = :INCLUDES
47
+ IS_AFTER = :IS_AFTER
48
+ IS_BEFORE = :IS_BEFORE
49
+ LT = :LT
50
+ LTE = :LTE
51
+ NEQ = :NEQ
52
+ OMIT = :OMIT
53
+ STARTS_WITH = :STARTS_WITH
54
+ AND = :AND
55
+ OR = :OR
56
+
57
+ # @!method self.values
58
+ # @return [Array<Symbol>]
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ module Slack
6
+ extend Trycourier::Internal::Type::Union
7
+
8
+ variant -> { Trycourier::SendToSlackChannel }
9
+
10
+ variant -> { Trycourier::SendToSlackEmail }
11
+
12
+ variant -> { Trycourier::SendToSlackUserID }
13
+
14
+ # @!method self.variants
15
+ # @return [Array(Trycourier::Models::SendToSlackChannel, Trycourier::Models::SendToSlackEmail, Trycourier::Models::SendToSlackUserID)]
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ class SlackBaseProperties < Trycourier::Internal::Type::BaseModel
6
+ # @!attribute access_token
7
+ #
8
+ # @return [String]
9
+ required :access_token, String
10
+
11
+ # @!method initialize(access_token:)
12
+ # @param access_token [String]
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ class SlackRecipient < Trycourier::Internal::Type::BaseModel
6
+ # @!attribute slack
7
+ #
8
+ # @return [Trycourier::Models::SendToSlackChannel, Trycourier::Models::SendToSlackEmail, Trycourier::Models::SendToSlackUserID]
9
+ required :slack, union: -> { Trycourier::Slack }
10
+
11
+ # @!method initialize(slack:)
12
+ # Send via Slack (channel, email, or user_id)
13
+ #
14
+ # @param slack [Trycourier::Models::SendToSlackChannel, Trycourier::Models::SendToSlackEmail, Trycourier::Models::SendToSlackUserID]
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ class Token < Trycourier::Internal::Type::BaseModel
6
+ # @!attribute token
7
+ #
8
+ # @return [String]
9
+ required :token, String
10
+
11
+ # @!method initialize(token:)
12
+ # @param token [String]
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,274 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ class UserProfile < Trycourier::Internal::Type::BaseModel
6
+ # @!attribute address
7
+ #
8
+ # @return [Trycourier::Models::UserProfile::Address, nil]
9
+ optional :address, -> { Trycourier::UserProfile::Address }, nil?: true
10
+
11
+ # @!attribute airship
12
+ #
13
+ # @return [Trycourier::Models::AirshipProfile, nil]
14
+ optional :airship, -> { Trycourier::AirshipProfile }, nil?: true
15
+
16
+ # @!attribute apn
17
+ #
18
+ # @return [String, nil]
19
+ optional :apn, String, nil?: true
20
+
21
+ # @!attribute birthdate
22
+ #
23
+ # @return [String, nil]
24
+ optional :birthdate, String, nil?: true
25
+
26
+ # @!attribute custom
27
+ # A free form object. Due to a limitation of the API Explorer, you can only enter
28
+ # string key/values below, but this API accepts more complex object structures.
29
+ #
30
+ # @return [Hash{Symbol=>Object}, nil]
31
+ optional :custom, Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::Unknown], nil?: true
32
+
33
+ # @!attribute discord
34
+ #
35
+ # @return [Trycourier::Models::SendToChannel, Trycourier::Models::SendDirectMessage, nil]
36
+ optional :discord, union: -> { Trycourier::Discord }, nil?: true
37
+
38
+ # @!attribute email
39
+ #
40
+ # @return [String, nil]
41
+ optional :email, String, nil?: true
42
+
43
+ # @!attribute email_verified
44
+ #
45
+ # @return [Boolean, nil]
46
+ optional :email_verified, Trycourier::Internal::Type::Boolean, nil?: true
47
+
48
+ # @!attribute expo
49
+ #
50
+ # @return [Trycourier::Models::Token, Trycourier::Models::MultipleTokens, nil]
51
+ optional :expo, union: -> { Trycourier::Expo }, nil?: true
52
+
53
+ # @!attribute facebook_psid
54
+ #
55
+ # @return [String, nil]
56
+ optional :facebook_psid, String, api_name: :facebookPSID, nil?: true
57
+
58
+ # @!attribute family_name
59
+ #
60
+ # @return [String, nil]
61
+ optional :family_name, String, nil?: true
62
+
63
+ # @!attribute firebase_token
64
+ #
65
+ # @return [String, Array<String>, nil]
66
+ optional :firebase_token,
67
+ union: -> { Trycourier::UserProfileFirebaseToken },
68
+ api_name: :firebaseToken,
69
+ nil?: true
70
+
71
+ # @!attribute gender
72
+ #
73
+ # @return [String, nil]
74
+ optional :gender, String, nil?: true
75
+
76
+ # @!attribute given_name
77
+ #
78
+ # @return [String, nil]
79
+ optional :given_name, String, nil?: true
80
+
81
+ # @!attribute intercom
82
+ #
83
+ # @return [Trycourier::Models::Intercom, nil]
84
+ optional :intercom, -> { Trycourier::Intercom }, nil?: true
85
+
86
+ # @!attribute locale
87
+ #
88
+ # @return [String, nil]
89
+ optional :locale, String, nil?: true
90
+
91
+ # @!attribute middle_name
92
+ #
93
+ # @return [String, nil]
94
+ optional :middle_name, String, nil?: true
95
+
96
+ # @!attribute ms_teams
97
+ #
98
+ # @return [Trycourier::Models::SendToMsTeamsUserID, Trycourier::Models::SendToMsTeamsEmail, Trycourier::Models::SendToMsTeamsChannelID, Trycourier::Models::SendToMsTeamsConversationID, Trycourier::Models::SendToMsTeamsChannelName, nil]
99
+ optional :ms_teams, union: -> { Trycourier::MsTeams }, nil?: true
100
+
101
+ # @!attribute name
102
+ #
103
+ # @return [String, nil]
104
+ optional :name, String, nil?: true
105
+
106
+ # @!attribute nickname
107
+ #
108
+ # @return [String, nil]
109
+ optional :nickname, String, nil?: true
110
+
111
+ # @!attribute phone_number
112
+ #
113
+ # @return [String, nil]
114
+ optional :phone_number, String, nil?: true
115
+
116
+ # @!attribute phone_number_verified
117
+ #
118
+ # @return [Boolean, nil]
119
+ optional :phone_number_verified, Trycourier::Internal::Type::Boolean, nil?: true
120
+
121
+ # @!attribute picture
122
+ #
123
+ # @return [String, nil]
124
+ optional :picture, String, nil?: true
125
+
126
+ # @!attribute preferred_name
127
+ #
128
+ # @return [String, nil]
129
+ optional :preferred_name, String, nil?: true
130
+
131
+ # @!attribute profile
132
+ #
133
+ # @return [String, nil]
134
+ optional :profile, String, nil?: true
135
+
136
+ # @!attribute slack
137
+ #
138
+ # @return [Trycourier::Models::SendToSlackChannel, Trycourier::Models::SendToSlackEmail, Trycourier::Models::SendToSlackUserID, nil]
139
+ optional :slack, union: -> { Trycourier::Slack }, nil?: true
140
+
141
+ # @!attribute sub
142
+ #
143
+ # @return [String, nil]
144
+ optional :sub, String, nil?: true
145
+
146
+ # @!attribute target_arn
147
+ #
148
+ # @return [String, nil]
149
+ optional :target_arn, String, nil?: true
150
+
151
+ # @!attribute updated_at
152
+ #
153
+ # @return [String, nil]
154
+ optional :updated_at, String, nil?: true
155
+
156
+ # @!attribute website
157
+ #
158
+ # @return [String, nil]
159
+ optional :website, String, nil?: true
160
+
161
+ # @!attribute zoneinfo
162
+ #
163
+ # @return [String, nil]
164
+ optional :zoneinfo, String, nil?: true
165
+
166
+ # @!method initialize(address: nil, airship: nil, apn: 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, target_arn: nil, updated_at: nil, website: nil, zoneinfo: nil)
167
+ # Some parameter documentations has been truncated, see
168
+ # {Trycourier::Models::UserProfile} for more details.
169
+ #
170
+ # @param address [Trycourier::Models::UserProfile::Address, nil]
171
+ #
172
+ # @param airship [Trycourier::Models::AirshipProfile, nil]
173
+ #
174
+ # @param apn [String, nil]
175
+ #
176
+ # @param birthdate [String, nil]
177
+ #
178
+ # @param custom [Hash{Symbol=>Object}, nil] A free form object. Due to a limitation of the API Explorer, you can only enter
179
+ #
180
+ # @param discord [Trycourier::Models::SendToChannel, Trycourier::Models::SendDirectMessage, nil]
181
+ #
182
+ # @param email [String, nil]
183
+ #
184
+ # @param email_verified [Boolean, nil]
185
+ #
186
+ # @param expo [Trycourier::Models::Token, Trycourier::Models::MultipleTokens, nil]
187
+ #
188
+ # @param facebook_psid [String, nil]
189
+ #
190
+ # @param family_name [String, nil]
191
+ #
192
+ # @param firebase_token [String, Array<String>, nil]
193
+ #
194
+ # @param gender [String, nil]
195
+ #
196
+ # @param given_name [String, nil]
197
+ #
198
+ # @param intercom [Trycourier::Models::Intercom, nil]
199
+ #
200
+ # @param locale [String, nil]
201
+ #
202
+ # @param middle_name [String, nil]
203
+ #
204
+ # @param ms_teams [Trycourier::Models::SendToMsTeamsUserID, Trycourier::Models::SendToMsTeamsEmail, Trycourier::Models::SendToMsTeamsChannelID, Trycourier::Models::SendToMsTeamsConversationID, Trycourier::Models::SendToMsTeamsChannelName, nil]
205
+ #
206
+ # @param name [String, nil]
207
+ #
208
+ # @param nickname [String, nil]
209
+ #
210
+ # @param phone_number [String, nil]
211
+ #
212
+ # @param phone_number_verified [Boolean, nil]
213
+ #
214
+ # @param picture [String, nil]
215
+ #
216
+ # @param preferred_name [String, nil]
217
+ #
218
+ # @param profile [String, nil]
219
+ #
220
+ # @param slack [Trycourier::Models::SendToSlackChannel, Trycourier::Models::SendToSlackEmail, Trycourier::Models::SendToSlackUserID, nil]
221
+ #
222
+ # @param sub [String, nil]
223
+ #
224
+ # @param target_arn [String, nil]
225
+ #
226
+ # @param updated_at [String, nil]
227
+ #
228
+ # @param website [String, nil]
229
+ #
230
+ # @param zoneinfo [String, nil]
231
+
232
+ # @see Trycourier::Models::UserProfile#address
233
+ class Address < Trycourier::Internal::Type::BaseModel
234
+ # @!attribute country
235
+ #
236
+ # @return [String]
237
+ required :country, String
238
+
239
+ # @!attribute formatted
240
+ #
241
+ # @return [String]
242
+ required :formatted, String
243
+
244
+ # @!attribute locality
245
+ #
246
+ # @return [String]
247
+ required :locality, String
248
+
249
+ # @!attribute postal_code
250
+ #
251
+ # @return [String]
252
+ required :postal_code, String
253
+
254
+ # @!attribute region
255
+ #
256
+ # @return [String]
257
+ required :region, String
258
+
259
+ # @!attribute street_address
260
+ #
261
+ # @return [String]
262
+ required :street_address, String
263
+
264
+ # @!method initialize(country:, formatted:, locality:, postal_code:, region:, street_address:)
265
+ # @param country [String]
266
+ # @param formatted [String]
267
+ # @param locality [String]
268
+ # @param postal_code [String]
269
+ # @param region [String]
270
+ # @param street_address [String]
271
+ end
272
+ end
273
+ end
274
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ module UserProfileFirebaseToken
6
+ extend Trycourier::Internal::Type::Union
7
+
8
+ variant String
9
+
10
+ variant -> { Trycourier::Models::UserProfileFirebaseToken::StringArray }
11
+
12
+ # @!method self.variants
13
+ # @return [Array(String, Array<String>)]
14
+
15
+ # @type [Trycourier::Internal::Type::Converter]
16
+ StringArray = Trycourier::Internal::Type::ArrayOf[String]
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ module WebhookAuthMode
6
+ extend Trycourier::Internal::Type::Enum
7
+
8
+ NONE = :none
9
+ BASIC = :basic
10
+ BEARER = :bearer
11
+
12
+ # @!method self.values
13
+ # @return [Array<Symbol>]
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ class WebhookAuthentication < Trycourier::Internal::Type::BaseModel
6
+ # @!attribute mode
7
+ # The authentication mode to use. Defaults to 'none' if not specified.
8
+ #
9
+ # @return [Symbol, Trycourier::Models::WebhookAuthMode]
10
+ required :mode, enum: -> { Trycourier::WebhookAuthMode }
11
+
12
+ # @!attribute token
13
+ # Token for bearer authentication.
14
+ #
15
+ # @return [String, nil]
16
+ optional :token, String, nil?: true
17
+
18
+ # @!attribute password
19
+ # Password for basic authentication.
20
+ #
21
+ # @return [String, nil]
22
+ optional :password, String, nil?: true
23
+
24
+ # @!attribute username
25
+ # Username for basic authentication.
26
+ #
27
+ # @return [String, nil]
28
+ optional :username, String, nil?: true
29
+
30
+ # @!method initialize(mode:, token: nil, password: nil, username: nil)
31
+ # @param mode [Symbol, Trycourier::Models::WebhookAuthMode] The authentication mode to use. Defaults to 'none' if not specified.
32
+ #
33
+ # @param token [String, nil] Token for bearer authentication.
34
+ #
35
+ # @param password [String, nil] Password for basic authentication.
36
+ #
37
+ # @param username [String, nil] Username for basic authentication.
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ module WebhookMethod
6
+ extend Trycourier::Internal::Type::Enum
7
+
8
+ POST = :POST
9
+ PUT = :PUT
10
+
11
+ # @!method self.values
12
+ # @return [Array<Symbol>]
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,53 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ class WebhookProfile < Trycourier::Internal::Type::BaseModel
6
+ # @!attribute url
7
+ # The URL to send the webhook request to.
8
+ #
9
+ # @return [String]
10
+ required :url, String
11
+
12
+ # @!attribute authentication
13
+ # Authentication configuration for the webhook request.
14
+ #
15
+ # @return [Trycourier::Models::WebhookAuthentication, nil]
16
+ optional :authentication, -> { Trycourier::WebhookAuthentication }, nil?: true
17
+
18
+ # @!attribute headers
19
+ # Custom headers to include in the webhook request.
20
+ #
21
+ # @return [Hash{Symbol=>String}, nil]
22
+ optional :headers, Trycourier::Internal::Type::HashOf[String], nil?: true
23
+
24
+ # @!attribute method_
25
+ # The HTTP method to use for the webhook request. Defaults to POST if not
26
+ # specified.
27
+ #
28
+ # @return [Symbol, Trycourier::Models::WebhookMethod, nil]
29
+ optional :method_, enum: -> { Trycourier::WebhookMethod }, api_name: :method, nil?: true
30
+
31
+ # @!attribute profile
32
+ # Specifies what profile information is included in the request payload. Defaults
33
+ # to 'limited' if not specified.
34
+ #
35
+ # @return [Symbol, Trycourier::Models::WebhookProfileType, nil]
36
+ optional :profile, enum: -> { Trycourier::WebhookProfileType }, nil?: true
37
+
38
+ # @!method initialize(url:, authentication: nil, headers: nil, method_: nil, profile: nil)
39
+ # Some parameter documentations has been truncated, see
40
+ # {Trycourier::Models::WebhookProfile} for more details.
41
+ #
42
+ # @param url [String] The URL to send the webhook request to.
43
+ #
44
+ # @param authentication [Trycourier::Models::WebhookAuthentication, nil] Authentication configuration for the webhook request.
45
+ #
46
+ # @param headers [Hash{Symbol=>String}, nil] Custom headers to include in the webhook request.
47
+ #
48
+ # @param method_ [Symbol, Trycourier::Models::WebhookMethod, nil] The HTTP method to use for the webhook request. Defaults to POST if not specifie
49
+ #
50
+ # @param profile [Symbol, Trycourier::Models::WebhookProfileType, nil] Specifies what profile information is included in the request payload. Defaults
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ module WebhookProfileType
6
+ extend Trycourier::Internal::Type::Enum
7
+
8
+ LIMITED = :limited
9
+ EXPANDED = :expanded
10
+
11
+ # @!method self.values
12
+ # @return [Array<Symbol>]
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Trycourier
4
+ module Models
5
+ class WebhookRecipient < Trycourier::Internal::Type::BaseModel
6
+ # @!attribute webhook
7
+ #
8
+ # @return [Trycourier::Models::WebhookProfile]
9
+ required :webhook, -> { Trycourier::WebhookProfile }
10
+
11
+ # @!method initialize(webhook:)
12
+ # Send via webhook
13
+ #
14
+ # @param webhook [Trycourier::Models::WebhookProfile]
15
+ end
16
+ end
17
+ end