trycourier 3.4.0.pre.alpha4 → 3.4.0.pre.alpha6
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/trycourier/internal/type/base_model.rb +3 -5
- data/lib/trycourier/models/audience.rb +1 -0
- data/lib/trycourier/models/audit_event.rb +1 -0
- data/lib/trycourier/models/brand.rb +1 -0
- data/lib/trycourier/models/message_details.rb +1 -0
- data/lib/trycourier/models/notification_get_content.rb +1 -0
- data/lib/trycourier/models/recipient.rb +2 -2
- data/lib/trycourier/models/subscription_list.rb +1 -0
- data/lib/trycourier/models/tenant.rb +1 -0
- data/lib/trycourier/models/user_recipient.rb +2 -2
- data/lib/trycourier/models/users/preference_retrieve_response.rb +3 -3
- data/lib/trycourier/models/users/preference_retrieve_topic_response.rb +3 -3
- data/lib/trycourier/models/users/token_add_single_params.rb +1 -1
- data/lib/trycourier/models/users/token_list_response.rb +1 -1
- data/lib/trycourier/models/users/token_retrieve_response.rb +1 -1
- data/lib/trycourier/models/users/topic_preference.rb +55 -0
- data/lib/trycourier/models/users/user_token.rb +183 -0
- data/lib/trycourier/models.rb +0 -4
- data/lib/trycourier/resources/users/tokens.rb +5 -5
- data/lib/trycourier/version.rb +1 -1
- data/lib/trycourier.rb +2 -2
- data/rbi/trycourier/models/recipient.rbi +2 -2
- data/rbi/trycourier/models/user_recipient.rbi +2 -2
- data/rbi/trycourier/models/users/preference_retrieve_response.rbi +3 -3
- data/rbi/trycourier/models/users/preference_retrieve_topic_response.rbi +4 -4
- data/rbi/trycourier/models/users/token_add_single_params.rbi +1 -1
- data/rbi/trycourier/models/users/token_list_response.rbi +1 -1
- data/rbi/trycourier/models/users/token_retrieve_response.rbi +1 -1
- data/rbi/trycourier/models/users/topic_preference.rbi +80 -0
- data/rbi/trycourier/models/users/user_token.rbi +291 -0
- data/rbi/trycourier/models.rbi +0 -4
- data/rbi/trycourier/resources/users/tokens.rbi +6 -5
- data/sig/trycourier/models/users/preference_retrieve_response.rbs +4 -4
- data/sig/trycourier/models/users/preference_retrieve_topic_response.rbs +4 -4
- data/sig/trycourier/models/users/token_add_single_params.rbs +1 -1
- data/sig/trycourier/models/users/token_list_response.rbs +1 -1
- data/sig/trycourier/models/users/token_retrieve_response.rbs +1 -1
- data/sig/trycourier/models/users/topic_preference.rbs +47 -0
- data/sig/trycourier/models/users/user_token.rbs +141 -0
- data/sig/trycourier/models.rbs +0 -4
- data/sig/trycourier/resources/users/tokens.rbs +4 -4
- metadata +8 -8
- data/lib/trycourier/models/topic_preference.rb +0 -53
- data/lib/trycourier/models/user_token.rb +0 -179
- data/rbi/trycourier/models/topic_preference.rbi +0 -75
- data/rbi/trycourier/models/user_token.rbi +0 -267
- data/sig/trycourier/models/topic_preference.rbs +0 -45
- data/sig/trycourier/models/user_token.rbs +0 -137
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8eadbb8e9f666e7914fb8c7ebd4593aa298024aa10bed408e1007301801987e1
|
|
4
|
+
data.tar.gz: 2f0605578542696913f1b237bf742b7cd6a6c7cf9d8c8ff4c3b121a105bb5937
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5e58b501557cbb4fb81bf30e83ce3756efe4c5aa80d828a76d40426e437d3fe97323780f632bf6f1e8c968dc30c08001671d1ad6f66e2a685a230f805b73bb7a
|
|
7
|
+
data.tar.gz: 60533c437f26fda04fcf518a2a3c00de129e027c340c210cf1573195d7fc4038042b3cd8d14d7962dbaedc3fa1b8f7e3ccf362c9df6f08cfb59953476741d5d3
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.4.0-alpha6 (2025-10-17)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v3.4.0-alpha5...v3.4.0-alpha6](https://github.com/trycourier/courier-ruby/compare/v3.4.0-alpha5...v3.4.0-alpha6)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
* Dep Warning ([3439cba](https://github.com/trycourier/courier-ruby/commit/3439cbae785d9e2198cc6af4a19e4e54e9e74c0c))
|
|
10
|
+
|
|
11
|
+
## 3.4.0-alpha5 (2025-10-17)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v3.4.0-alpha4...v3.4.0-alpha5](https://github.com/trycourier/courier-ruby/compare/v3.4.0-alpha4...v3.4.0-alpha5)
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* Updated paths for each model and go example updates ([3589716](https://github.com/trycourier/courier-ruby/commit/358971631427bdec2f3c609aa0b96139ee285503))
|
|
18
|
+
|
|
3
19
|
## 3.4.0-alpha4 (2025-10-16)
|
|
4
20
|
|
|
5
21
|
Full Changelog: [v3.4.0-alpha3...v3.4.0-alpha4](https://github.com/trycourier/courier-ruby/compare/v3.4.0-alpha3...v3.4.0-alpha4)
|
data/README.md
CHANGED
|
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
|
15
15
|
<!-- x-release-please-start-version -->
|
|
16
16
|
|
|
17
17
|
```ruby
|
|
18
|
-
gem "trycourier", "~> 3.4.0.pre.
|
|
18
|
+
gem "trycourier", "~> 3.4.0.pre.alpha6"
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
<!-- x-release-please-end -->
|
|
@@ -438,11 +438,9 @@ module Trycourier
|
|
|
438
438
|
# @return [Hash{Symbol=>Object}]
|
|
439
439
|
#
|
|
440
440
|
# @example
|
|
441
|
-
# # `
|
|
442
|
-
#
|
|
443
|
-
#
|
|
444
|
-
# created_at: created_at,
|
|
445
|
-
# description: description
|
|
441
|
+
# # `channel_preference` is a `Trycourier::ChannelPreference`
|
|
442
|
+
# channel_preference => {
|
|
443
|
+
# channel: channel
|
|
446
444
|
# }
|
|
447
445
|
def deconstruct_keys(keys)
|
|
448
446
|
(keys || self.class.known_fields.keys)
|
|
@@ -4,7 +4,7 @@ module Trycourier
|
|
|
4
4
|
module Models
|
|
5
5
|
class Recipient < Trycourier::Internal::Type::BaseModel
|
|
6
6
|
# @!attribute account_id
|
|
7
|
-
# Use `tenant_id` instead.
|
|
7
|
+
# Deprecated - Use `tenant_id` instead.
|
|
8
8
|
#
|
|
9
9
|
# @return [String, nil]
|
|
10
10
|
optional :account_id, String, nil?: true
|
|
@@ -60,7 +60,7 @@ module Trycourier
|
|
|
60
60
|
# Some parameter documentations has been truncated, see
|
|
61
61
|
# {Trycourier::Models::Recipient} for more details.
|
|
62
62
|
#
|
|
63
|
-
# @param account_id [String, nil] Use `tenant_id` instead.
|
|
63
|
+
# @param account_id [String, nil] Deprecated - Use `tenant_id` instead.
|
|
64
64
|
#
|
|
65
65
|
# @param context [Trycourier::Models::MessageContext, nil] Context such as tenant_id to send the notification with.
|
|
66
66
|
#
|
|
@@ -4,7 +4,7 @@ module Trycourier
|
|
|
4
4
|
module Models
|
|
5
5
|
class UserRecipient < Trycourier::Internal::Type::BaseModel
|
|
6
6
|
# @!attribute account_id
|
|
7
|
-
# Use `tenant_id` instead.
|
|
7
|
+
# Deprecated - Use `tenant_id` instead.
|
|
8
8
|
#
|
|
9
9
|
# @return [String, nil]
|
|
10
10
|
optional :account_id, String, nil?: true
|
|
@@ -60,7 +60,7 @@ module Trycourier
|
|
|
60
60
|
# Some parameter documentations has been truncated, see
|
|
61
61
|
# {Trycourier::Models::UserRecipient} for more details.
|
|
62
62
|
#
|
|
63
|
-
# @param account_id [String, nil] Use `tenant_id` instead.
|
|
63
|
+
# @param account_id [String, nil] Deprecated - Use `tenant_id` instead.
|
|
64
64
|
#
|
|
65
65
|
# @param context [Trycourier::Models::MessageContext, nil] Context such as tenant_id to send the notification with.
|
|
66
66
|
#
|
|
@@ -8,8 +8,8 @@ module Trycourier
|
|
|
8
8
|
# @!attribute items
|
|
9
9
|
# The Preferences associated with the user_id.
|
|
10
10
|
#
|
|
11
|
-
# @return [Array<Trycourier::Models::TopicPreference>]
|
|
12
|
-
required :items, -> { Trycourier::Internal::Type::ArrayOf[Trycourier::TopicPreference] }
|
|
11
|
+
# @return [Array<Trycourier::Models::Users::TopicPreference>]
|
|
12
|
+
required :items, -> { Trycourier::Internal::Type::ArrayOf[Trycourier::Users::TopicPreference] }
|
|
13
13
|
|
|
14
14
|
# @!attribute paging
|
|
15
15
|
# Deprecated - Paging not implemented on this endpoint
|
|
@@ -18,7 +18,7 @@ module Trycourier
|
|
|
18
18
|
required :paging, -> { Trycourier::Paging }
|
|
19
19
|
|
|
20
20
|
# @!method initialize(items:, paging:)
|
|
21
|
-
# @param items [Array<Trycourier::Models::TopicPreference>] The Preferences associated with the user_id.
|
|
21
|
+
# @param items [Array<Trycourier::Models::Users::TopicPreference>] The Preferences associated with the user_id.
|
|
22
22
|
#
|
|
23
23
|
# @param paging [Trycourier::Models::Paging] Deprecated - Paging not implemented on this endpoint
|
|
24
24
|
end
|
|
@@ -7,11 +7,11 @@ module Trycourier
|
|
|
7
7
|
class PreferenceRetrieveTopicResponse < Trycourier::Internal::Type::BaseModel
|
|
8
8
|
# @!attribute topic
|
|
9
9
|
#
|
|
10
|
-
# @return [Trycourier::Models::TopicPreference]
|
|
11
|
-
required :topic, -> { Trycourier::TopicPreference }
|
|
10
|
+
# @return [Trycourier::Models::Users::TopicPreference]
|
|
11
|
+
required :topic, -> { Trycourier::Users::TopicPreference }
|
|
12
12
|
|
|
13
13
|
# @!method initialize(topic:)
|
|
14
|
-
# @param topic [Trycourier::Models::TopicPreference]
|
|
14
|
+
# @param topic [Trycourier::Models::Users::TopicPreference]
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
end
|
|
@@ -4,7 +4,7 @@ module Trycourier
|
|
|
4
4
|
module Models
|
|
5
5
|
module Users
|
|
6
6
|
# @see Trycourier::Resources::Users::Tokens#add_single
|
|
7
|
-
class TokenAddSingleParams < Trycourier::Models::UserToken
|
|
7
|
+
class TokenAddSingleParams < Trycourier::Models::Users::UserToken
|
|
8
8
|
extend Trycourier::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Trycourier::Internal::Type::RequestParameters
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ module Trycourier
|
|
|
4
4
|
module Models
|
|
5
5
|
module Users
|
|
6
6
|
# @type [Trycourier::Internal::Type::Converter]
|
|
7
|
-
TokenListResponse = Trycourier::Internal::Type::ArrayOf[-> { Trycourier::UserToken }]
|
|
7
|
+
TokenListResponse = Trycourier::Internal::Type::ArrayOf[-> { Trycourier::Users::UserToken }]
|
|
8
8
|
end
|
|
9
9
|
end
|
|
10
10
|
end
|
|
@@ -4,7 +4,7 @@ module Trycourier
|
|
|
4
4
|
module Models
|
|
5
5
|
module Users
|
|
6
6
|
# @see Trycourier::Resources::Users::Tokens#retrieve
|
|
7
|
-
class TokenRetrieveResponse < Trycourier::Models::UserToken
|
|
7
|
+
class TokenRetrieveResponse < Trycourier::Models::Users::UserToken
|
|
8
8
|
# @!attribute status
|
|
9
9
|
#
|
|
10
10
|
# @return [Symbol, Trycourier::Models::Users::TokenRetrieveResponse::Status, nil]
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Trycourier
|
|
4
|
+
module Models
|
|
5
|
+
module Users
|
|
6
|
+
class TopicPreference < Trycourier::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute default_status
|
|
8
|
+
#
|
|
9
|
+
# @return [Symbol, Trycourier::Models::PreferenceStatus]
|
|
10
|
+
required :default_status, enum: -> { Trycourier::PreferenceStatus }
|
|
11
|
+
|
|
12
|
+
# @!attribute status
|
|
13
|
+
#
|
|
14
|
+
# @return [Symbol, Trycourier::Models::PreferenceStatus]
|
|
15
|
+
required :status, enum: -> { Trycourier::PreferenceStatus }
|
|
16
|
+
|
|
17
|
+
# @!attribute topic_id
|
|
18
|
+
#
|
|
19
|
+
# @return [String]
|
|
20
|
+
required :topic_id, String
|
|
21
|
+
|
|
22
|
+
# @!attribute topic_name
|
|
23
|
+
#
|
|
24
|
+
# @return [String]
|
|
25
|
+
required :topic_name, String
|
|
26
|
+
|
|
27
|
+
# @!attribute custom_routing
|
|
28
|
+
# The Channels a user has chosen to receive notifications through for this topic
|
|
29
|
+
#
|
|
30
|
+
# @return [Array<Symbol, Trycourier::Models::ChannelClassification>, nil]
|
|
31
|
+
optional :custom_routing,
|
|
32
|
+
-> { Trycourier::Internal::Type::ArrayOf[enum: Trycourier::ChannelClassification] },
|
|
33
|
+
nil?: true
|
|
34
|
+
|
|
35
|
+
# @!attribute has_custom_routing
|
|
36
|
+
#
|
|
37
|
+
# @return [Boolean, nil]
|
|
38
|
+
optional :has_custom_routing, Trycourier::Internal::Type::Boolean, nil?: true
|
|
39
|
+
|
|
40
|
+
# @!method initialize(default_status:, status:, topic_id:, topic_name:, custom_routing: nil, has_custom_routing: nil)
|
|
41
|
+
# @param default_status [Symbol, Trycourier::Models::PreferenceStatus]
|
|
42
|
+
#
|
|
43
|
+
# @param status [Symbol, Trycourier::Models::PreferenceStatus]
|
|
44
|
+
#
|
|
45
|
+
# @param topic_id [String]
|
|
46
|
+
#
|
|
47
|
+
# @param topic_name [String]
|
|
48
|
+
#
|
|
49
|
+
# @param custom_routing [Array<Symbol, Trycourier::Models::ChannelClassification>, nil] The Channels a user has chosen to receive notifications through for this topic
|
|
50
|
+
#
|
|
51
|
+
# @param has_custom_routing [Boolean, nil]
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Trycourier
|
|
4
|
+
module Models
|
|
5
|
+
module Users
|
|
6
|
+
class UserToken < Trycourier::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute provider_key
|
|
8
|
+
#
|
|
9
|
+
# @return [Symbol, Trycourier::Models::Users::UserToken::ProviderKey]
|
|
10
|
+
required :provider_key, enum: -> { Trycourier::Users::UserToken::ProviderKey }
|
|
11
|
+
|
|
12
|
+
# @!attribute token
|
|
13
|
+
# Full body of the token. Must match token in URL.
|
|
14
|
+
#
|
|
15
|
+
# @return [String, nil]
|
|
16
|
+
optional :token, String, nil?: true
|
|
17
|
+
|
|
18
|
+
# @!attribute device
|
|
19
|
+
# Information about the device the token is associated with.
|
|
20
|
+
#
|
|
21
|
+
# @return [Trycourier::Models::Users::UserToken::Device, nil]
|
|
22
|
+
optional :device, -> { Trycourier::Users::UserToken::Device }, nil?: true
|
|
23
|
+
|
|
24
|
+
# @!attribute expiry_date
|
|
25
|
+
# ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
|
|
26
|
+
# disable expiration.
|
|
27
|
+
#
|
|
28
|
+
# @return [String, Boolean, nil]
|
|
29
|
+
optional :expiry_date, union: -> { Trycourier::Users::UserToken::ExpiryDate }, nil?: true
|
|
30
|
+
|
|
31
|
+
# @!attribute properties
|
|
32
|
+
# Properties sent to the provider along with the token
|
|
33
|
+
#
|
|
34
|
+
# @return [Object, nil]
|
|
35
|
+
optional :properties, Trycourier::Internal::Type::Unknown
|
|
36
|
+
|
|
37
|
+
# @!attribute tracking
|
|
38
|
+
# Information about the device the token is associated with.
|
|
39
|
+
#
|
|
40
|
+
# @return [Trycourier::Models::Users::UserToken::Tracking, nil]
|
|
41
|
+
optional :tracking, -> { Trycourier::Users::UserToken::Tracking }, nil?: true
|
|
42
|
+
|
|
43
|
+
# @!method initialize(provider_key:, token: nil, device: nil, expiry_date: nil, properties: nil, tracking: nil)
|
|
44
|
+
# Some parameter documentations has been truncated, see
|
|
45
|
+
# {Trycourier::Models::Users::UserToken} for more details.
|
|
46
|
+
#
|
|
47
|
+
# @param provider_key [Symbol, Trycourier::Models::Users::UserToken::ProviderKey]
|
|
48
|
+
#
|
|
49
|
+
# @param token [String, nil] Full body of the token. Must match token in URL.
|
|
50
|
+
#
|
|
51
|
+
# @param device [Trycourier::Models::Users::UserToken::Device, nil] Information about the device the token is associated with.
|
|
52
|
+
#
|
|
53
|
+
# @param expiry_date [String, Boolean, nil] ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
|
|
54
|
+
#
|
|
55
|
+
# @param properties [Object] Properties sent to the provider along with the token
|
|
56
|
+
#
|
|
57
|
+
# @param tracking [Trycourier::Models::Users::UserToken::Tracking, nil] Information about the device the token is associated with.
|
|
58
|
+
|
|
59
|
+
# @see Trycourier::Models::Users::UserToken#provider_key
|
|
60
|
+
module ProviderKey
|
|
61
|
+
extend Trycourier::Internal::Type::Enum
|
|
62
|
+
|
|
63
|
+
FIREBASE_FCM = :"firebase-fcm"
|
|
64
|
+
APN = :apn
|
|
65
|
+
EXPO = :expo
|
|
66
|
+
ONESIGNAL = :onesignal
|
|
67
|
+
|
|
68
|
+
# @!method self.values
|
|
69
|
+
# @return [Array<Symbol>]
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# @see Trycourier::Models::Users::UserToken#device
|
|
73
|
+
class Device < Trycourier::Internal::Type::BaseModel
|
|
74
|
+
# @!attribute ad_id
|
|
75
|
+
# Id of the advertising identifier
|
|
76
|
+
#
|
|
77
|
+
# @return [String, nil]
|
|
78
|
+
optional :ad_id, String, nil?: true
|
|
79
|
+
|
|
80
|
+
# @!attribute app_id
|
|
81
|
+
# Id of the application the token is used for
|
|
82
|
+
#
|
|
83
|
+
# @return [String, nil]
|
|
84
|
+
optional :app_id, String, nil?: true
|
|
85
|
+
|
|
86
|
+
# @!attribute device_id
|
|
87
|
+
# Id of the device the token is associated with
|
|
88
|
+
#
|
|
89
|
+
# @return [String, nil]
|
|
90
|
+
optional :device_id, String, nil?: true
|
|
91
|
+
|
|
92
|
+
# @!attribute manufacturer
|
|
93
|
+
# The device manufacturer
|
|
94
|
+
#
|
|
95
|
+
# @return [String, nil]
|
|
96
|
+
optional :manufacturer, String, nil?: true
|
|
97
|
+
|
|
98
|
+
# @!attribute model
|
|
99
|
+
# The device model
|
|
100
|
+
#
|
|
101
|
+
# @return [String, nil]
|
|
102
|
+
optional :model, String, nil?: true
|
|
103
|
+
|
|
104
|
+
# @!attribute platform
|
|
105
|
+
# The device platform i.e. android, ios, web
|
|
106
|
+
#
|
|
107
|
+
# @return [String, nil]
|
|
108
|
+
optional :platform, String, nil?: true
|
|
109
|
+
|
|
110
|
+
# @!method initialize(ad_id: nil, app_id: nil, device_id: nil, manufacturer: nil, model: nil, platform: nil)
|
|
111
|
+
# Information about the device the token is associated with.
|
|
112
|
+
#
|
|
113
|
+
# @param ad_id [String, nil] Id of the advertising identifier
|
|
114
|
+
#
|
|
115
|
+
# @param app_id [String, nil] Id of the application the token is used for
|
|
116
|
+
#
|
|
117
|
+
# @param device_id [String, nil] Id of the device the token is associated with
|
|
118
|
+
#
|
|
119
|
+
# @param manufacturer [String, nil] The device manufacturer
|
|
120
|
+
#
|
|
121
|
+
# @param model [String, nil] The device model
|
|
122
|
+
#
|
|
123
|
+
# @param platform [String, nil] The device platform i.e. android, ios, web
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# ISO 8601 formatted date the token expires. Defaults to 2 months. Set to false to
|
|
127
|
+
# disable expiration.
|
|
128
|
+
#
|
|
129
|
+
# @see Trycourier::Models::Users::UserToken#expiry_date
|
|
130
|
+
module ExpiryDate
|
|
131
|
+
extend Trycourier::Internal::Type::Union
|
|
132
|
+
|
|
133
|
+
variant String
|
|
134
|
+
|
|
135
|
+
variant Trycourier::Internal::Type::Boolean
|
|
136
|
+
|
|
137
|
+
# @!method self.variants
|
|
138
|
+
# @return [Array(String, Boolean)]
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
# @see Trycourier::Models::Users::UserToken#tracking
|
|
142
|
+
class Tracking < Trycourier::Internal::Type::BaseModel
|
|
143
|
+
# @!attribute ip
|
|
144
|
+
# The IP address of the device
|
|
145
|
+
#
|
|
146
|
+
# @return [String, nil]
|
|
147
|
+
optional :ip, String, nil?: true
|
|
148
|
+
|
|
149
|
+
# @!attribute lat
|
|
150
|
+
# The latitude of the device
|
|
151
|
+
#
|
|
152
|
+
# @return [String, nil]
|
|
153
|
+
optional :lat, String, nil?: true
|
|
154
|
+
|
|
155
|
+
# @!attribute long
|
|
156
|
+
# The longitude of the device
|
|
157
|
+
#
|
|
158
|
+
# @return [String, nil]
|
|
159
|
+
optional :long, String, nil?: true
|
|
160
|
+
|
|
161
|
+
# @!attribute os_version
|
|
162
|
+
# The operating system version
|
|
163
|
+
#
|
|
164
|
+
# @return [String, nil]
|
|
165
|
+
optional :os_version, String, nil?: true
|
|
166
|
+
|
|
167
|
+
# @!method initialize(ip: nil, lat: nil, long: nil, os_version: nil)
|
|
168
|
+
# Information about the device the token is associated with.
|
|
169
|
+
#
|
|
170
|
+
# @param ip [String, nil] The IP address of the device
|
|
171
|
+
#
|
|
172
|
+
# @param lat [String, nil] The latitude of the device
|
|
173
|
+
#
|
|
174
|
+
# @param long [String, nil] The longitude of the device
|
|
175
|
+
#
|
|
176
|
+
# @param os_version [String, nil] The operating system version
|
|
177
|
+
end
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
UserToken = Users::UserToken
|
|
182
|
+
end
|
|
183
|
+
end
|
data/lib/trycourier/models.rb
CHANGED
|
@@ -251,8 +251,6 @@ module Trycourier
|
|
|
251
251
|
|
|
252
252
|
TextStyle = Trycourier::Models::TextStyle
|
|
253
253
|
|
|
254
|
-
TopicPreference = Trycourier::Models::TopicPreference
|
|
255
|
-
|
|
256
254
|
TranslationRetrieveParams = Trycourier::Models::TranslationRetrieveParams
|
|
257
255
|
|
|
258
256
|
TranslationUpdateParams = Trycourier::Models::TranslationUpdateParams
|
|
@@ -261,8 +259,6 @@ module Trycourier
|
|
|
261
259
|
|
|
262
260
|
Users = Trycourier::Models::Users
|
|
263
261
|
|
|
264
|
-
UserToken = Trycourier::Models::UserToken
|
|
265
|
-
|
|
266
262
|
Utm = Trycourier::Models::Utm
|
|
267
263
|
|
|
268
264
|
WidgetBackground = Trycourier::Models::WidgetBackground
|
|
@@ -69,14 +69,14 @@ module Trycourier
|
|
|
69
69
|
#
|
|
70
70
|
# @param request_options [Trycourier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
71
71
|
#
|
|
72
|
-
# @return [Array<Trycourier::Models::UserToken>]
|
|
72
|
+
# @return [Array<Trycourier::Models::Users::UserToken>]
|
|
73
73
|
#
|
|
74
74
|
# @see Trycourier::Models::Users::TokenListParams
|
|
75
75
|
def list(user_id, params = {})
|
|
76
76
|
@client.request(
|
|
77
77
|
method: :get,
|
|
78
78
|
path: ["users/%1$s/tokens", user_id],
|
|
79
|
-
model: Trycourier::Internal::Type::ArrayOf[Trycourier::UserToken],
|
|
79
|
+
model: Trycourier::Internal::Type::ArrayOf[Trycourier::Users::UserToken],
|
|
80
80
|
options: params[:request_options]
|
|
81
81
|
)
|
|
82
82
|
end
|
|
@@ -139,17 +139,17 @@ module Trycourier
|
|
|
139
139
|
#
|
|
140
140
|
# @param user_id [String] Path param: The user's ID. This can be any uniquely identifiable string.
|
|
141
141
|
#
|
|
142
|
-
# @param provider_key [Symbol, Trycourier::Models::UserToken::ProviderKey] Body param:
|
|
142
|
+
# @param provider_key [Symbol, Trycourier::Models::Users::UserToken::ProviderKey] Body param:
|
|
143
143
|
#
|
|
144
144
|
# @param body_token [String, nil] Body param: Full body of the token. Must match token in URL.
|
|
145
145
|
#
|
|
146
|
-
# @param device [Trycourier::Models::UserToken::Device, nil] Body param: Information about the device the token is associated with.
|
|
146
|
+
# @param device [Trycourier::Models::Users::UserToken::Device, nil] Body param: Information about the device the token is associated with.
|
|
147
147
|
#
|
|
148
148
|
# @param expiry_date [String, Boolean, nil] Body param: ISO 8601 formatted date the token expires. Defaults to 2 months. Set
|
|
149
149
|
#
|
|
150
150
|
# @param properties [Object] Body param: Properties sent to the provider along with the token
|
|
151
151
|
#
|
|
152
|
-
# @param tracking [Trycourier::Models::UserToken::Tracking, nil] Body param: Information about the device the token is associated with.
|
|
152
|
+
# @param tracking [Trycourier::Models::Users::UserToken::Tracking, nil] Body param: Information about the device the token is associated with.
|
|
153
153
|
#
|
|
154
154
|
# @param request_options [Trycourier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
155
155
|
#
|
data/lib/trycourier/version.rb
CHANGED
data/lib/trycourier.rb
CHANGED
|
@@ -58,7 +58,7 @@ require_relative "trycourier/models/subscription_topic_new"
|
|
|
58
58
|
require_relative "trycourier/models/elemental_channel_node"
|
|
59
59
|
require_relative "trycourier/models/message_details"
|
|
60
60
|
require_relative "trycourier/models/base_template_tenant_association"
|
|
61
|
-
require_relative "trycourier/models/user_token"
|
|
61
|
+
require_relative "trycourier/models/users/user_token"
|
|
62
62
|
require_relative "trycourier/models/alignment"
|
|
63
63
|
require_relative "trycourier/models/audience"
|
|
64
64
|
require_relative "trycourier/models/audience_delete_params"
|
|
@@ -199,7 +199,6 @@ require_relative "trycourier/models/tenants/tenant_default_preferences/item_dele
|
|
|
199
199
|
require_relative "trycourier/models/tenants/tenant_default_preferences/item_update_params"
|
|
200
200
|
require_relative "trycourier/models/tenant_update_params"
|
|
201
201
|
require_relative "trycourier/models/text_style"
|
|
202
|
-
require_relative "trycourier/models/topic_preference"
|
|
203
202
|
require_relative "trycourier/models/translation_retrieve_params"
|
|
204
203
|
require_relative "trycourier/models/translation_retrieve_response"
|
|
205
204
|
require_relative "trycourier/models/translation_update_params"
|
|
@@ -224,6 +223,7 @@ require_relative "trycourier/models/users/token_list_response"
|
|
|
224
223
|
require_relative "trycourier/models/users/token_retrieve_params"
|
|
225
224
|
require_relative "trycourier/models/users/token_retrieve_response"
|
|
226
225
|
require_relative "trycourier/models/users/token_update_params"
|
|
226
|
+
require_relative "trycourier/models/users/topic_preference"
|
|
227
227
|
require_relative "trycourier/models/utm"
|
|
228
228
|
require_relative "trycourier/models/widget_background"
|
|
229
229
|
require_relative "trycourier/models"
|
|
@@ -8,7 +8,7 @@ module Trycourier
|
|
|
8
8
|
T.any(Trycourier::Recipient, Trycourier::Internal::AnyHash)
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
# Use `tenant_id` instead.
|
|
11
|
+
# Deprecated - Use `tenant_id` instead.
|
|
12
12
|
sig { returns(T.nilable(String)) }
|
|
13
13
|
attr_accessor :account_id
|
|
14
14
|
|
|
@@ -69,7 +69,7 @@ module Trycourier
|
|
|
69
69
|
).returns(T.attached_class)
|
|
70
70
|
end
|
|
71
71
|
def self.new(
|
|
72
|
-
# Use `tenant_id` instead.
|
|
72
|
+
# Deprecated - Use `tenant_id` instead.
|
|
73
73
|
account_id: nil,
|
|
74
74
|
# Context such as tenant_id to send the notification with.
|
|
75
75
|
context: nil,
|
|
@@ -8,7 +8,7 @@ module Trycourier
|
|
|
8
8
|
T.any(Trycourier::UserRecipient, Trycourier::Internal::AnyHash)
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
# Use `tenant_id` instead.
|
|
11
|
+
# Deprecated - Use `tenant_id` instead.
|
|
12
12
|
sig { returns(T.nilable(String)) }
|
|
13
13
|
attr_accessor :account_id
|
|
14
14
|
|
|
@@ -70,7 +70,7 @@ module Trycourier
|
|
|
70
70
|
).returns(T.attached_class)
|
|
71
71
|
end
|
|
72
72
|
def self.new(
|
|
73
|
-
# Use `tenant_id` instead.
|
|
73
|
+
# Deprecated - Use `tenant_id` instead.
|
|
74
74
|
account_id: nil,
|
|
75
75
|
# Context such as tenant_id to send the notification with.
|
|
76
76
|
context: nil,
|
|
@@ -13,7 +13,7 @@ module Trycourier
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
# The Preferences associated with the user_id.
|
|
16
|
-
sig { returns(T::Array[Trycourier::TopicPreference]) }
|
|
16
|
+
sig { returns(T::Array[Trycourier::Users::TopicPreference]) }
|
|
17
17
|
attr_accessor :items
|
|
18
18
|
|
|
19
19
|
# Deprecated - Paging not implemented on this endpoint
|
|
@@ -25,7 +25,7 @@ module Trycourier
|
|
|
25
25
|
|
|
26
26
|
sig do
|
|
27
27
|
params(
|
|
28
|
-
items: T::Array[Trycourier::TopicPreference::OrHash],
|
|
28
|
+
items: T::Array[Trycourier::Users::TopicPreference::OrHash],
|
|
29
29
|
paging: Trycourier::Paging::OrHash
|
|
30
30
|
).returns(T.attached_class)
|
|
31
31
|
end
|
|
@@ -40,7 +40,7 @@ module Trycourier
|
|
|
40
40
|
sig do
|
|
41
41
|
override.returns(
|
|
42
42
|
{
|
|
43
|
-
items: T::Array[Trycourier::TopicPreference],
|
|
43
|
+
items: T::Array[Trycourier::Users::TopicPreference],
|
|
44
44
|
paging: Trycourier::Paging
|
|
45
45
|
}
|
|
46
46
|
)
|
|
@@ -12,21 +12,21 @@ module Trycourier
|
|
|
12
12
|
)
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
sig { returns(Trycourier::TopicPreference) }
|
|
15
|
+
sig { returns(Trycourier::Users::TopicPreference) }
|
|
16
16
|
attr_reader :topic
|
|
17
17
|
|
|
18
|
-
sig { params(topic: Trycourier::TopicPreference::OrHash).void }
|
|
18
|
+
sig { params(topic: Trycourier::Users::TopicPreference::OrHash).void }
|
|
19
19
|
attr_writer :topic
|
|
20
20
|
|
|
21
21
|
sig do
|
|
22
|
-
params(topic: Trycourier::TopicPreference::OrHash).returns(
|
|
22
|
+
params(topic: Trycourier::Users::TopicPreference::OrHash).returns(
|
|
23
23
|
T.attached_class
|
|
24
24
|
)
|
|
25
25
|
end
|
|
26
26
|
def self.new(topic:)
|
|
27
27
|
end
|
|
28
28
|
|
|
29
|
-
sig { override.returns({ topic: Trycourier::TopicPreference }) }
|
|
29
|
+
sig { override.returns({ topic: Trycourier::Users::TopicPreference }) }
|
|
30
30
|
def to_hash
|
|
31
31
|
end
|
|
32
32
|
end
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
module Trycourier
|
|
4
4
|
module Models
|
|
5
5
|
module Users
|
|
6
|
-
class TokenAddSingleParams < Trycourier::Models::UserToken
|
|
6
|
+
class TokenAddSingleParams < Trycourier::Models::Users::UserToken
|
|
7
7
|
extend Trycourier::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Trycourier::Internal::Type::RequestParameters
|
|
9
9
|
|