trycourier 3.4.0.pre.alpha3 → 3.4.0.pre.alpha5

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 (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/trycourier/internal/type/base_model.rb +3 -5
  5. data/lib/trycourier/internal/util.rb +3 -2
  6. data/lib/trycourier/models/audience.rb +1 -0
  7. data/lib/trycourier/models/audit_event.rb +1 -0
  8. data/lib/trycourier/models/brand.rb +1 -0
  9. data/lib/trycourier/models/message_details.rb +1 -0
  10. data/lib/trycourier/models/notification_get_content.rb +1 -0
  11. data/lib/trycourier/models/subscription_list.rb +1 -0
  12. data/lib/trycourier/models/tenant.rb +1 -0
  13. data/lib/trycourier/models/users/preference_retrieve_response.rb +3 -3
  14. data/lib/trycourier/models/users/preference_retrieve_topic_response.rb +3 -3
  15. data/lib/trycourier/models/users/token_add_single_params.rb +1 -1
  16. data/lib/trycourier/models/users/token_list_response.rb +1 -1
  17. data/lib/trycourier/models/users/token_retrieve_response.rb +1 -1
  18. data/lib/trycourier/models/users/topic_preference.rb +55 -0
  19. data/lib/trycourier/models/users/user_token.rb +183 -0
  20. data/lib/trycourier/models.rb +0 -4
  21. data/lib/trycourier/resources/users/tokens.rb +5 -5
  22. data/lib/trycourier/version.rb +1 -1
  23. data/lib/trycourier.rb +2 -2
  24. data/rbi/trycourier/models/users/preference_retrieve_response.rbi +3 -3
  25. data/rbi/trycourier/models/users/preference_retrieve_topic_response.rbi +4 -4
  26. data/rbi/trycourier/models/users/token_add_single_params.rbi +1 -1
  27. data/rbi/trycourier/models/users/token_list_response.rbi +1 -1
  28. data/rbi/trycourier/models/users/token_retrieve_response.rbi +1 -1
  29. data/rbi/trycourier/models/users/topic_preference.rbi +80 -0
  30. data/rbi/trycourier/models/users/user_token.rbi +291 -0
  31. data/rbi/trycourier/models.rbi +0 -4
  32. data/rbi/trycourier/resources/users/tokens.rbi +6 -5
  33. data/sig/trycourier/models/users/preference_retrieve_response.rbs +4 -4
  34. data/sig/trycourier/models/users/preference_retrieve_topic_response.rbs +4 -4
  35. data/sig/trycourier/models/users/token_add_single_params.rbs +1 -1
  36. data/sig/trycourier/models/users/token_list_response.rbs +1 -1
  37. data/sig/trycourier/models/users/token_retrieve_response.rbs +1 -1
  38. data/sig/trycourier/models/users/topic_preference.rbs +47 -0
  39. data/sig/trycourier/models/users/user_token.rbs +141 -0
  40. data/sig/trycourier/models.rbs +0 -4
  41. data/sig/trycourier/resources/users/tokens.rbs +4 -4
  42. metadata +8 -8
  43. data/lib/trycourier/models/topic_preference.rb +0 -53
  44. data/lib/trycourier/models/user_token.rb +0 -179
  45. data/rbi/trycourier/models/topic_preference.rbi +0 -75
  46. data/rbi/trycourier/models/user_token.rbi +0 -267
  47. data/sig/trycourier/models/topic_preference.rbs +0 -45
  48. data/sig/trycourier/models/user_token.rbs +0 -137
@@ -34,12 +34,12 @@ module Trycourier
34
34
  def add_single: (
35
35
  String path_token,
36
36
  user_id: String,
37
- provider_key: Trycourier::Models::UserToken::provider_key,
37
+ provider_key: Trycourier::Models::Users::UserToken::provider_key,
38
38
  ?body_token: String?,
39
- ?device: Trycourier::UserToken::Device?,
40
- ?expiry_date: Trycourier::Models::UserToken::expiry_date?,
39
+ ?device: Trycourier::Users::UserToken::Device?,
40
+ ?expiry_date: Trycourier::Models::Users::UserToken::expiry_date?,
41
41
  ?properties: top,
42
- ?tracking: Trycourier::UserToken::Tracking?,
42
+ ?tracking: Trycourier::Users::UserToken::Tracking?,
43
43
  ?request_options: Trycourier::request_opts
44
44
  ) -> nil
45
45
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trycourier
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.0.pre.alpha3
4
+ version: 3.4.0.pre.alpha5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Courier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-10-15 00:00:00.000000000 Z
11
+ date: 2025-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool
@@ -203,12 +203,10 @@ files:
203
203
  - lib/trycourier/models/tenants/tenant_default_preferences/item_delete_params.rb
204
204
  - lib/trycourier/models/tenants/tenant_default_preferences/item_update_params.rb
205
205
  - lib/trycourier/models/text_style.rb
206
- - lib/trycourier/models/topic_preference.rb
207
206
  - lib/trycourier/models/translation_retrieve_params.rb
208
207
  - lib/trycourier/models/translation_retrieve_response.rb
209
208
  - lib/trycourier/models/translation_update_params.rb
210
209
  - lib/trycourier/models/user_recipient.rb
211
- - lib/trycourier/models/user_token.rb
212
210
  - lib/trycourier/models/users/preference_retrieve_params.rb
213
211
  - lib/trycourier/models/users/preference_retrieve_response.rb
214
212
  - lib/trycourier/models/users/preference_retrieve_topic_params.rb
@@ -229,6 +227,8 @@ files:
229
227
  - lib/trycourier/models/users/token_retrieve_params.rb
230
228
  - lib/trycourier/models/users/token_retrieve_response.rb
231
229
  - lib/trycourier/models/users/token_update_params.rb
230
+ - lib/trycourier/models/users/topic_preference.rb
231
+ - lib/trycourier/models/users/user_token.rb
232
232
  - lib/trycourier/models/utm.rb
233
233
  - lib/trycourier/models/widget_background.rb
234
234
  - lib/trycourier/request_options.rb
@@ -428,12 +428,10 @@ files:
428
428
  - rbi/trycourier/models/tenants/tenant_default_preferences/item_delete_params.rbi
429
429
  - rbi/trycourier/models/tenants/tenant_default_preferences/item_update_params.rbi
430
430
  - rbi/trycourier/models/text_style.rbi
431
- - rbi/trycourier/models/topic_preference.rbi
432
431
  - rbi/trycourier/models/translation_retrieve_params.rbi
433
432
  - rbi/trycourier/models/translation_retrieve_response.rbi
434
433
  - rbi/trycourier/models/translation_update_params.rbi
435
434
  - rbi/trycourier/models/user_recipient.rbi
436
- - rbi/trycourier/models/user_token.rbi
437
435
  - rbi/trycourier/models/users/preference_retrieve_params.rbi
438
436
  - rbi/trycourier/models/users/preference_retrieve_response.rbi
439
437
  - rbi/trycourier/models/users/preference_retrieve_topic_params.rbi
@@ -454,6 +452,8 @@ files:
454
452
  - rbi/trycourier/models/users/token_retrieve_params.rbi
455
453
  - rbi/trycourier/models/users/token_retrieve_response.rbi
456
454
  - rbi/trycourier/models/users/token_update_params.rbi
455
+ - rbi/trycourier/models/users/topic_preference.rbi
456
+ - rbi/trycourier/models/users/user_token.rbi
457
457
  - rbi/trycourier/models/utm.rbi
458
458
  - rbi/trycourier/models/widget_background.rbi
459
459
  - rbi/trycourier/request_options.rbi
@@ -652,12 +652,10 @@ files:
652
652
  - sig/trycourier/models/tenants/tenant_default_preferences/item_delete_params.rbs
653
653
  - sig/trycourier/models/tenants/tenant_default_preferences/item_update_params.rbs
654
654
  - sig/trycourier/models/text_style.rbs
655
- - sig/trycourier/models/topic_preference.rbs
656
655
  - sig/trycourier/models/translation_retrieve_params.rbs
657
656
  - sig/trycourier/models/translation_retrieve_response.rbs
658
657
  - sig/trycourier/models/translation_update_params.rbs
659
658
  - sig/trycourier/models/user_recipient.rbs
660
- - sig/trycourier/models/user_token.rbs
661
659
  - sig/trycourier/models/users/preference_retrieve_params.rbs
662
660
  - sig/trycourier/models/users/preference_retrieve_response.rbs
663
661
  - sig/trycourier/models/users/preference_retrieve_topic_params.rbs
@@ -678,6 +676,8 @@ files:
678
676
  - sig/trycourier/models/users/token_retrieve_params.rbs
679
677
  - sig/trycourier/models/users/token_retrieve_response.rbs
680
678
  - sig/trycourier/models/users/token_update_params.rbs
679
+ - sig/trycourier/models/users/topic_preference.rbs
680
+ - sig/trycourier/models/users/user_token.rbs
681
681
  - sig/trycourier/models/utm.rbs
682
682
  - sig/trycourier/models/widget_background.rbs
683
683
  - sig/trycourier/request_options.rbs
@@ -1,53 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Trycourier
4
- module Models
5
- class TopicPreference < Trycourier::Internal::Type::BaseModel
6
- # @!attribute default_status
7
- #
8
- # @return [Symbol, Trycourier::Models::PreferenceStatus]
9
- required :default_status, enum: -> { Trycourier::PreferenceStatus }
10
-
11
- # @!attribute status
12
- #
13
- # @return [Symbol, Trycourier::Models::PreferenceStatus]
14
- required :status, enum: -> { Trycourier::PreferenceStatus }
15
-
16
- # @!attribute topic_id
17
- #
18
- # @return [String]
19
- required :topic_id, String
20
-
21
- # @!attribute topic_name
22
- #
23
- # @return [String]
24
- required :topic_name, String
25
-
26
- # @!attribute custom_routing
27
- # The Channels a user has chosen to receive notifications through for this topic
28
- #
29
- # @return [Array<Symbol, Trycourier::Models::ChannelClassification>, nil]
30
- optional :custom_routing,
31
- -> { Trycourier::Internal::Type::ArrayOf[enum: Trycourier::ChannelClassification] },
32
- nil?: true
33
-
34
- # @!attribute has_custom_routing
35
- #
36
- # @return [Boolean, nil]
37
- optional :has_custom_routing, Trycourier::Internal::Type::Boolean, nil?: true
38
-
39
- # @!method initialize(default_status:, status:, topic_id:, topic_name:, custom_routing: nil, has_custom_routing: nil)
40
- # @param default_status [Symbol, Trycourier::Models::PreferenceStatus]
41
- #
42
- # @param status [Symbol, Trycourier::Models::PreferenceStatus]
43
- #
44
- # @param topic_id [String]
45
- #
46
- # @param topic_name [String]
47
- #
48
- # @param custom_routing [Array<Symbol, Trycourier::Models::ChannelClassification>, nil] The Channels a user has chosen to receive notifications through for this topic
49
- #
50
- # @param has_custom_routing [Boolean, nil]
51
- end
52
- end
53
- end
@@ -1,179 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Trycourier
4
- module Models
5
- class UserToken < Trycourier::Internal::Type::BaseModel
6
- # @!attribute provider_key
7
- #
8
- # @return [Symbol, Trycourier::Models::UserToken::ProviderKey]
9
- required :provider_key, enum: -> { Trycourier::UserToken::ProviderKey }
10
-
11
- # @!attribute token
12
- # Full body of the token. Must match token in URL.
13
- #
14
- # @return [String, nil]
15
- optional :token, String, nil?: true
16
-
17
- # @!attribute device
18
- # Information about the device the token is associated with.
19
- #
20
- # @return [Trycourier::Models::UserToken::Device, nil]
21
- optional :device, -> { Trycourier::UserToken::Device }, nil?: true
22
-
23
- # @!attribute expiry_date
24
- # ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
25
- # disable expiration.
26
- #
27
- # @return [String, Boolean, nil]
28
- optional :expiry_date, union: -> { Trycourier::UserToken::ExpiryDate }, nil?: true
29
-
30
- # @!attribute properties
31
- # Properties sent to the provider along with the token
32
- #
33
- # @return [Object, nil]
34
- optional :properties, Trycourier::Internal::Type::Unknown
35
-
36
- # @!attribute tracking
37
- # Information about the device the token is associated with.
38
- #
39
- # @return [Trycourier::Models::UserToken::Tracking, nil]
40
- optional :tracking, -> { Trycourier::UserToken::Tracking }, nil?: true
41
-
42
- # @!method initialize(provider_key:, token: nil, device: nil, expiry_date: nil, properties: nil, tracking: nil)
43
- # Some parameter documentations has been truncated, see
44
- # {Trycourier::Models::UserToken} for more details.
45
- #
46
- # @param provider_key [Symbol, Trycourier::Models::UserToken::ProviderKey]
47
- #
48
- # @param token [String, nil] Full body of the token. Must match token in URL.
49
- #
50
- # @param device [Trycourier::Models::UserToken::Device, nil] Information about the device the token is associated with.
51
- #
52
- # @param expiry_date [String, Boolean, nil] ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
53
- #
54
- # @param properties [Object] Properties sent to the provider along with the token
55
- #
56
- # @param tracking [Trycourier::Models::UserToken::Tracking, nil] Information about the device the token is associated with.
57
-
58
- # @see Trycourier::Models::UserToken#provider_key
59
- module ProviderKey
60
- extend Trycourier::Internal::Type::Enum
61
-
62
- FIREBASE_FCM = :"firebase-fcm"
63
- APN = :apn
64
- EXPO = :expo
65
- ONESIGNAL = :onesignal
66
-
67
- # @!method self.values
68
- # @return [Array<Symbol>]
69
- end
70
-
71
- # @see Trycourier::Models::UserToken#device
72
- class Device < Trycourier::Internal::Type::BaseModel
73
- # @!attribute ad_id
74
- # Id of the advertising identifier
75
- #
76
- # @return [String, nil]
77
- optional :ad_id, String, nil?: true
78
-
79
- # @!attribute app_id
80
- # Id of the application the token is used for
81
- #
82
- # @return [String, nil]
83
- optional :app_id, String, nil?: true
84
-
85
- # @!attribute device_id
86
- # Id of the device the token is associated with
87
- #
88
- # @return [String, nil]
89
- optional :device_id, String, nil?: true
90
-
91
- # @!attribute manufacturer
92
- # The device manufacturer
93
- #
94
- # @return [String, nil]
95
- optional :manufacturer, String, nil?: true
96
-
97
- # @!attribute model
98
- # The device model
99
- #
100
- # @return [String, nil]
101
- optional :model, String, nil?: true
102
-
103
- # @!attribute platform
104
- # The device platform i.e. android, ios, web
105
- #
106
- # @return [String, nil]
107
- optional :platform, String, nil?: true
108
-
109
- # @!method initialize(ad_id: nil, app_id: nil, device_id: nil, manufacturer: nil, model: nil, platform: nil)
110
- # Information about the device the token is associated with.
111
- #
112
- # @param ad_id [String, nil] Id of the advertising identifier
113
- #
114
- # @param app_id [String, nil] Id of the application the token is used for
115
- #
116
- # @param device_id [String, nil] Id of the device the token is associated with
117
- #
118
- # @param manufacturer [String, nil] The device manufacturer
119
- #
120
- # @param model [String, nil] The device model
121
- #
122
- # @param platform [String, nil] The device platform i.e. android, ios, web
123
- end
124
-
125
- # ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
126
- # disable expiration.
127
- #
128
- # @see Trycourier::Models::UserToken#expiry_date
129
- module ExpiryDate
130
- extend Trycourier::Internal::Type::Union
131
-
132
- variant String
133
-
134
- variant Trycourier::Internal::Type::Boolean
135
-
136
- # @!method self.variants
137
- # @return [Array(String, Boolean)]
138
- end
139
-
140
- # @see Trycourier::Models::UserToken#tracking
141
- class Tracking < Trycourier::Internal::Type::BaseModel
142
- # @!attribute ip
143
- # The IP address of the device
144
- #
145
- # @return [String, nil]
146
- optional :ip, String, nil?: true
147
-
148
- # @!attribute lat
149
- # The latitude of the device
150
- #
151
- # @return [String, nil]
152
- optional :lat, String, nil?: true
153
-
154
- # @!attribute long
155
- # The longitude of the device
156
- #
157
- # @return [String, nil]
158
- optional :long, String, nil?: true
159
-
160
- # @!attribute os_version
161
- # The operating system version
162
- #
163
- # @return [String, nil]
164
- optional :os_version, String, nil?: true
165
-
166
- # @!method initialize(ip: nil, lat: nil, long: nil, os_version: nil)
167
- # Information about the device the token is associated with.
168
- #
169
- # @param ip [String, nil] The IP address of the device
170
- #
171
- # @param lat [String, nil] The latitude of the device
172
- #
173
- # @param long [String, nil] The longitude of the device
174
- #
175
- # @param os_version [String, nil] The operating system version
176
- end
177
- end
178
- end
179
- end
@@ -1,75 +0,0 @@
1
- # typed: strong
2
-
3
- module Trycourier
4
- module Models
5
- class TopicPreference < Trycourier::Internal::Type::BaseModel
6
- OrHash =
7
- T.type_alias do
8
- T.any(Trycourier::TopicPreference, Trycourier::Internal::AnyHash)
9
- end
10
-
11
- sig { returns(Trycourier::PreferenceStatus::TaggedSymbol) }
12
- attr_accessor :default_status
13
-
14
- sig { returns(Trycourier::PreferenceStatus::TaggedSymbol) }
15
- attr_accessor :status
16
-
17
- sig { returns(String) }
18
- attr_accessor :topic_id
19
-
20
- sig { returns(String) }
21
- attr_accessor :topic_name
22
-
23
- # The Channels a user has chosen to receive notifications through for this topic
24
- sig do
25
- returns(
26
- T.nilable(T::Array[Trycourier::ChannelClassification::TaggedSymbol])
27
- )
28
- end
29
- attr_accessor :custom_routing
30
-
31
- sig { returns(T.nilable(T::Boolean)) }
32
- attr_accessor :has_custom_routing
33
-
34
- sig do
35
- params(
36
- default_status: Trycourier::PreferenceStatus::OrSymbol,
37
- status: Trycourier::PreferenceStatus::OrSymbol,
38
- topic_id: String,
39
- topic_name: String,
40
- custom_routing:
41
- T.nilable(T::Array[Trycourier::ChannelClassification::OrSymbol]),
42
- has_custom_routing: T.nilable(T::Boolean)
43
- ).returns(T.attached_class)
44
- end
45
- def self.new(
46
- default_status:,
47
- status:,
48
- topic_id:,
49
- topic_name:,
50
- # The Channels a user has chosen to receive notifications through for this topic
51
- custom_routing: nil,
52
- has_custom_routing: nil
53
- )
54
- end
55
-
56
- sig do
57
- override.returns(
58
- {
59
- default_status: Trycourier::PreferenceStatus::TaggedSymbol,
60
- status: Trycourier::PreferenceStatus::TaggedSymbol,
61
- topic_id: String,
62
- topic_name: String,
63
- custom_routing:
64
- T.nilable(
65
- T::Array[Trycourier::ChannelClassification::TaggedSymbol]
66
- ),
67
- has_custom_routing: T.nilable(T::Boolean)
68
- }
69
- )
70
- end
71
- def to_hash
72
- end
73
- end
74
- end
75
- end
@@ -1,267 +0,0 @@
1
- # typed: strong
2
-
3
- module Trycourier
4
- module Models
5
- class UserToken < Trycourier::Internal::Type::BaseModel
6
- OrHash =
7
- T.type_alias do
8
- T.any(Trycourier::UserToken, Trycourier::Internal::AnyHash)
9
- end
10
-
11
- sig { returns(Trycourier::UserToken::ProviderKey::TaggedSymbol) }
12
- attr_accessor :provider_key
13
-
14
- # Full body of the token. Must match token in URL.
15
- sig { returns(T.nilable(String)) }
16
- attr_accessor :token
17
-
18
- # Information about the device the token is associated with.
19
- sig { returns(T.nilable(Trycourier::UserToken::Device)) }
20
- attr_reader :device
21
-
22
- sig do
23
- params(device: T.nilable(Trycourier::UserToken::Device::OrHash)).void
24
- end
25
- attr_writer :device
26
-
27
- # ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
28
- # disable expiration.
29
- sig { returns(T.nilable(Trycourier::UserToken::ExpiryDate::Variants)) }
30
- attr_accessor :expiry_date
31
-
32
- # Properties sent to the provider along with the token
33
- sig { returns(T.nilable(T.anything)) }
34
- attr_reader :properties
35
-
36
- sig { params(properties: T.anything).void }
37
- attr_writer :properties
38
-
39
- # Information about the device the token is associated with.
40
- sig { returns(T.nilable(Trycourier::UserToken::Tracking)) }
41
- attr_reader :tracking
42
-
43
- sig do
44
- params(
45
- tracking: T.nilable(Trycourier::UserToken::Tracking::OrHash)
46
- ).void
47
- end
48
- attr_writer :tracking
49
-
50
- sig do
51
- params(
52
- provider_key: Trycourier::UserToken::ProviderKey::OrSymbol,
53
- token: T.nilable(String),
54
- device: T.nilable(Trycourier::UserToken::Device::OrHash),
55
- expiry_date: T.nilable(Trycourier::UserToken::ExpiryDate::Variants),
56
- properties: T.anything,
57
- tracking: T.nilable(Trycourier::UserToken::Tracking::OrHash)
58
- ).returns(T.attached_class)
59
- end
60
- def self.new(
61
- provider_key:,
62
- # Full body of the token. Must match token in URL.
63
- token: nil,
64
- # Information about the device the token is associated with.
65
- device: nil,
66
- # ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
67
- # disable expiration.
68
- expiry_date: nil,
69
- # Properties sent to the provider along with the token
70
- properties: nil,
71
- # Information about the device the token is associated with.
72
- tracking: nil
73
- )
74
- end
75
-
76
- sig do
77
- override.returns(
78
- {
79
- provider_key: Trycourier::UserToken::ProviderKey::TaggedSymbol,
80
- token: T.nilable(String),
81
- device: T.nilable(Trycourier::UserToken::Device),
82
- expiry_date: T.nilable(Trycourier::UserToken::ExpiryDate::Variants),
83
- properties: T.anything,
84
- tracking: T.nilable(Trycourier::UserToken::Tracking)
85
- }
86
- )
87
- end
88
- def to_hash
89
- end
90
-
91
- module ProviderKey
92
- extend Trycourier::Internal::Type::Enum
93
-
94
- TaggedSymbol =
95
- T.type_alias { T.all(Symbol, Trycourier::UserToken::ProviderKey) }
96
- OrSymbol = T.type_alias { T.any(Symbol, String) }
97
-
98
- FIREBASE_FCM =
99
- T.let(
100
- :"firebase-fcm",
101
- Trycourier::UserToken::ProviderKey::TaggedSymbol
102
- )
103
- APN = T.let(:apn, Trycourier::UserToken::ProviderKey::TaggedSymbol)
104
- EXPO = T.let(:expo, Trycourier::UserToken::ProviderKey::TaggedSymbol)
105
- ONESIGNAL =
106
- T.let(:onesignal, Trycourier::UserToken::ProviderKey::TaggedSymbol)
107
-
108
- sig do
109
- override.returns(
110
- T::Array[Trycourier::UserToken::ProviderKey::TaggedSymbol]
111
- )
112
- end
113
- def self.values
114
- end
115
- end
116
-
117
- class Device < Trycourier::Internal::Type::BaseModel
118
- OrHash =
119
- T.type_alias do
120
- T.any(Trycourier::UserToken::Device, Trycourier::Internal::AnyHash)
121
- end
122
-
123
- # Id of the advertising identifier
124
- sig { returns(T.nilable(String)) }
125
- attr_accessor :ad_id
126
-
127
- # Id of the application the token is used for
128
- sig { returns(T.nilable(String)) }
129
- attr_accessor :app_id
130
-
131
- # Id of the device the token is associated with
132
- sig { returns(T.nilable(String)) }
133
- attr_accessor :device_id
134
-
135
- # The device manufacturer
136
- sig { returns(T.nilable(String)) }
137
- attr_accessor :manufacturer
138
-
139
- # The device model
140
- sig { returns(T.nilable(String)) }
141
- attr_accessor :model
142
-
143
- # The device platform i.e. android, ios, web
144
- sig { returns(T.nilable(String)) }
145
- attr_accessor :platform
146
-
147
- # Information about the device the token is associated with.
148
- sig do
149
- params(
150
- ad_id: T.nilable(String),
151
- app_id: T.nilable(String),
152
- device_id: T.nilable(String),
153
- manufacturer: T.nilable(String),
154
- model: T.nilable(String),
155
- platform: T.nilable(String)
156
- ).returns(T.attached_class)
157
- end
158
- def self.new(
159
- # Id of the advertising identifier
160
- ad_id: nil,
161
- # Id of the application the token is used for
162
- app_id: nil,
163
- # Id of the device the token is associated with
164
- device_id: nil,
165
- # The device manufacturer
166
- manufacturer: nil,
167
- # The device model
168
- model: nil,
169
- # The device platform i.e. android, ios, web
170
- platform: nil
171
- )
172
- end
173
-
174
- sig do
175
- override.returns(
176
- {
177
- ad_id: T.nilable(String),
178
- app_id: T.nilable(String),
179
- device_id: T.nilable(String),
180
- manufacturer: T.nilable(String),
181
- model: T.nilable(String),
182
- platform: T.nilable(String)
183
- }
184
- )
185
- end
186
- def to_hash
187
- end
188
- end
189
-
190
- # ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
191
- # disable expiration.
192
- module ExpiryDate
193
- extend Trycourier::Internal::Type::Union
194
-
195
- Variants = T.type_alias { T.any(String, T::Boolean) }
196
-
197
- sig do
198
- override.returns(
199
- T::Array[Trycourier::UserToken::ExpiryDate::Variants]
200
- )
201
- end
202
- def self.variants
203
- end
204
- end
205
-
206
- class Tracking < Trycourier::Internal::Type::BaseModel
207
- OrHash =
208
- T.type_alias do
209
- T.any(
210
- Trycourier::UserToken::Tracking,
211
- Trycourier::Internal::AnyHash
212
- )
213
- end
214
-
215
- # The IP address of the device
216
- sig { returns(T.nilable(String)) }
217
- attr_accessor :ip
218
-
219
- # The latitude of the device
220
- sig { returns(T.nilable(String)) }
221
- attr_accessor :lat
222
-
223
- # The longitude of the device
224
- sig { returns(T.nilable(String)) }
225
- attr_accessor :long
226
-
227
- # The operating system version
228
- sig { returns(T.nilable(String)) }
229
- attr_accessor :os_version
230
-
231
- # Information about the device the token is associated with.
232
- sig do
233
- params(
234
- ip: T.nilable(String),
235
- lat: T.nilable(String),
236
- long: T.nilable(String),
237
- os_version: T.nilable(String)
238
- ).returns(T.attached_class)
239
- end
240
- def self.new(
241
- # The IP address of the device
242
- ip: nil,
243
- # The latitude of the device
244
- lat: nil,
245
- # The longitude of the device
246
- long: nil,
247
- # The operating system version
248
- os_version: nil
249
- )
250
- end
251
-
252
- sig do
253
- override.returns(
254
- {
255
- ip: T.nilable(String),
256
- lat: T.nilable(String),
257
- long: T.nilable(String),
258
- os_version: T.nilable(String)
259
- }
260
- )
261
- end
262
- def to_hash
263
- end
264
- end
265
- end
266
- end
267
- end