trycourier 4.2.0 → 4.3.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +1 -1
- data/lib/trycourier/models/recipient.rb +26 -3
- data/lib/trycourier/models/user_recipient.rb +26 -3
- data/lib/trycourier/models/users/token_list_response.rb +12 -2
- data/lib/trycourier/models.rb +0 -2
- data/lib/trycourier/resources/users/tokens.rb +2 -2
- data/lib/trycourier/version.rb +1 -1
- data/lib/trycourier.rb +0 -1
- data/rbi/trycourier/models/recipient.rbi +46 -4
- data/rbi/trycourier/models/user_recipient.rbi +47 -4
- data/rbi/trycourier/models/users/token_list_response.rbi +27 -5
- data/rbi/trycourier/models.rbi +0 -2
- data/rbi/trycourier/resources/users/tokens.rbi +1 -1
- data/sig/trycourier/models/recipient.rbs +31 -4
- data/sig/trycourier/models/user_recipient.rbs +31 -4
- data/sig/trycourier/models/users/token_list_response.rbs +9 -2
- data/sig/trycourier/models.rbs +0 -2
- data/sig/trycourier/resources/users/tokens.rbs +1 -1
- metadata +1 -4
- data/lib/trycourier/models/profile_preferences.rb +0 -27
- data/rbi/trycourier/models/profile_preferences.rbi +0 -44
- data/sig/trycourier/models/profile_preferences.rbs +0 -30
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 90938239a2ad14d3834d90316b9e134aaa3f1173482cc20006a47281b169eaaf
|
|
4
|
+
data.tar.gz: 88885b2fe15f0a98fdfe61c5803795b8b717f93f2be1486332e07828466ab994
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6df42006118d203008458dcc1012e35f903e53039ee881d60cf90b532db7f9a2565f77ffe82a5dc32b1bf9508750470d2fbc88dc3f855abc477c2a3f0df6bf3c
|
|
7
|
+
data.tar.gz: 719003467281f8692c54d450e7830a85ab4470cb68e80eb2a2962acc46980999bf68a321f7e8afccbe85178909f2cee53e6a2a8295ee1104a6c931f6f1fb212f
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.3.0 (2025-12-08)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v4.2.0...v4.3.0](https://github.com/trycourier/courier-ruby/compare/v4.2.0...v4.3.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* Fix UsersGetAllTokensResponse to return object with tokens property i… ([dad98a1](https://github.com/trycourier/courier-ruby/commit/dad98a163d391bf45510d10c10d2d7597e1af74e))
|
|
10
|
+
|
|
3
11
|
## 4.2.0 (2025-12-08)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v4.1.1...v4.2.0](https://github.com/trycourier/courier-ruby/compare/v4.1.1...v4.2.0)
|
data/README.md
CHANGED
|
@@ -46,8 +46,8 @@ module Trycourier
|
|
|
46
46
|
|
|
47
47
|
# @!attribute preferences
|
|
48
48
|
#
|
|
49
|
-
# @return [Trycourier::Models::
|
|
50
|
-
optional :preferences, -> { Trycourier::
|
|
49
|
+
# @return [Trycourier::Models::Recipient::Preferences, nil]
|
|
50
|
+
optional :preferences, -> { Trycourier::Recipient::Preferences }, nil?: true
|
|
51
51
|
|
|
52
52
|
# @!attribute tenant_id
|
|
53
53
|
# The id of the tenant the user is associated with.
|
|
@@ -80,11 +80,34 @@ module Trycourier
|
|
|
80
80
|
#
|
|
81
81
|
# @param phone_number [String, nil] The user's phone number.
|
|
82
82
|
#
|
|
83
|
-
# @param preferences [Trycourier::Models::
|
|
83
|
+
# @param preferences [Trycourier::Models::Recipient::Preferences, nil]
|
|
84
84
|
#
|
|
85
85
|
# @param tenant_id [String, nil] The id of the tenant the user is associated with.
|
|
86
86
|
#
|
|
87
87
|
# @param user_id [String, nil] The user's unique identifier. Typically, this will match the user id of a user i
|
|
88
|
+
|
|
89
|
+
# @see Trycourier::Models::Recipient#preferences
|
|
90
|
+
class Preferences < Trycourier::Internal::Type::BaseModel
|
|
91
|
+
# @!attribute notifications
|
|
92
|
+
#
|
|
93
|
+
# @return [Hash{Symbol=>Trycourier::Models::Preference}]
|
|
94
|
+
required :notifications, -> { Trycourier::Internal::Type::HashOf[Trycourier::Preference] }
|
|
95
|
+
|
|
96
|
+
# @!attribute categories
|
|
97
|
+
#
|
|
98
|
+
# @return [Hash{Symbol=>Trycourier::Models::Preference}, nil]
|
|
99
|
+
optional :categories, -> { Trycourier::Internal::Type::HashOf[Trycourier::Preference] }, nil?: true
|
|
100
|
+
|
|
101
|
+
# @!attribute template_id
|
|
102
|
+
#
|
|
103
|
+
# @return [String, nil]
|
|
104
|
+
optional :template_id, String, api_name: :templateId, nil?: true
|
|
105
|
+
|
|
106
|
+
# @!method initialize(notifications:, categories: nil, template_id: nil)
|
|
107
|
+
# @param notifications [Hash{Symbol=>Trycourier::Models::Preference}]
|
|
108
|
+
# @param categories [Hash{Symbol=>Trycourier::Models::Preference}, nil]
|
|
109
|
+
# @param template_id [String, nil]
|
|
110
|
+
end
|
|
88
111
|
end
|
|
89
112
|
end
|
|
90
113
|
end
|
|
@@ -46,8 +46,8 @@ module Trycourier
|
|
|
46
46
|
|
|
47
47
|
# @!attribute preferences
|
|
48
48
|
#
|
|
49
|
-
# @return [Trycourier::Models::
|
|
50
|
-
optional :preferences, -> { Trycourier::
|
|
49
|
+
# @return [Trycourier::Models::UserRecipient::Preferences, nil]
|
|
50
|
+
optional :preferences, -> { Trycourier::UserRecipient::Preferences }, nil?: true
|
|
51
51
|
|
|
52
52
|
# @!attribute tenant_id
|
|
53
53
|
# The id of the tenant the user is associated with.
|
|
@@ -80,11 +80,34 @@ module Trycourier
|
|
|
80
80
|
#
|
|
81
81
|
# @param phone_number [String, nil] The user's phone number.
|
|
82
82
|
#
|
|
83
|
-
# @param preferences [Trycourier::Models::
|
|
83
|
+
# @param preferences [Trycourier::Models::UserRecipient::Preferences, nil]
|
|
84
84
|
#
|
|
85
85
|
# @param tenant_id [String, nil] The id of the tenant the user is associated with.
|
|
86
86
|
#
|
|
87
87
|
# @param user_id [String, nil] The user's unique identifier. Typically, this will match the user id of a user i
|
|
88
|
+
|
|
89
|
+
# @see Trycourier::Models::UserRecipient#preferences
|
|
90
|
+
class Preferences < Trycourier::Internal::Type::BaseModel
|
|
91
|
+
# @!attribute notifications
|
|
92
|
+
#
|
|
93
|
+
# @return [Hash{Symbol=>Trycourier::Models::Preference}]
|
|
94
|
+
required :notifications, -> { Trycourier::Internal::Type::HashOf[Trycourier::Preference] }
|
|
95
|
+
|
|
96
|
+
# @!attribute categories
|
|
97
|
+
#
|
|
98
|
+
# @return [Hash{Symbol=>Trycourier::Models::Preference}, nil]
|
|
99
|
+
optional :categories, -> { Trycourier::Internal::Type::HashOf[Trycourier::Preference] }, nil?: true
|
|
100
|
+
|
|
101
|
+
# @!attribute template_id
|
|
102
|
+
#
|
|
103
|
+
# @return [String, nil]
|
|
104
|
+
optional :template_id, String, api_name: :templateId, nil?: true
|
|
105
|
+
|
|
106
|
+
# @!method initialize(notifications:, categories: nil, template_id: nil)
|
|
107
|
+
# @param notifications [Hash{Symbol=>Trycourier::Models::Preference}]
|
|
108
|
+
# @param categories [Hash{Symbol=>Trycourier::Models::Preference}, nil]
|
|
109
|
+
# @param template_id [String, nil]
|
|
110
|
+
end
|
|
88
111
|
end
|
|
89
112
|
end
|
|
90
113
|
end
|
|
@@ -3,8 +3,18 @@
|
|
|
3
3
|
module Trycourier
|
|
4
4
|
module Models
|
|
5
5
|
module Users
|
|
6
|
-
# @
|
|
7
|
-
TokenListResponse
|
|
6
|
+
# @see Trycourier::Resources::Users::Tokens#list
|
|
7
|
+
class TokenListResponse < Trycourier::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute tokens
|
|
9
|
+
#
|
|
10
|
+
# @return [Array<Trycourier::Models::Users::UserToken>]
|
|
11
|
+
required :tokens, -> { Trycourier::Internal::Type::ArrayOf[Trycourier::Users::UserToken] }
|
|
12
|
+
|
|
13
|
+
# @!method initialize(tokens:)
|
|
14
|
+
# A list of tokens registered with the user.
|
|
15
|
+
#
|
|
16
|
+
# @param tokens [Array<Trycourier::Models::Users::UserToken>]
|
|
17
|
+
end
|
|
8
18
|
end
|
|
9
19
|
end
|
|
10
20
|
end
|
data/lib/trycourier/models.rb
CHANGED
|
@@ -207,8 +207,6 @@ module Trycourier
|
|
|
207
207
|
|
|
208
208
|
ProfileDeleteParams = Trycourier::Models::ProfileDeleteParams
|
|
209
209
|
|
|
210
|
-
ProfilePreferences = Trycourier::Models::ProfilePreferences
|
|
211
|
-
|
|
212
210
|
ProfileReplaceParams = Trycourier::Models::ProfileReplaceParams
|
|
213
211
|
|
|
214
212
|
ProfileRetrieveParams = Trycourier::Models::ProfileRetrieveParams
|
|
@@ -69,14 +69,14 @@ module Trycourier
|
|
|
69
69
|
#
|
|
70
70
|
# @param request_options [Trycourier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
71
71
|
#
|
|
72
|
-
# @return [
|
|
72
|
+
# @return [Trycourier::Models::Users::TokenListResponse]
|
|
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::
|
|
79
|
+
model: Trycourier::Models::Users::TokenListResponse,
|
|
80
80
|
options: params[:request_options]
|
|
81
81
|
)
|
|
82
82
|
end
|
data/lib/trycourier/version.rb
CHANGED
data/lib/trycourier.rb
CHANGED
|
@@ -166,7 +166,6 @@ require_relative "trycourier/models/preference_status"
|
|
|
166
166
|
require_relative "trycourier/models/profile_create_params"
|
|
167
167
|
require_relative "trycourier/models/profile_create_response"
|
|
168
168
|
require_relative "trycourier/models/profile_delete_params"
|
|
169
|
-
require_relative "trycourier/models/profile_preferences"
|
|
170
169
|
require_relative "trycourier/models/profile_replace_params"
|
|
171
170
|
require_relative "trycourier/models/profile_replace_response"
|
|
172
171
|
require_relative "trycourier/models/profile_retrieve_params"
|
|
@@ -40,12 +40,12 @@ module Trycourier
|
|
|
40
40
|
sig { returns(T.nilable(String)) }
|
|
41
41
|
attr_accessor :phone_number
|
|
42
42
|
|
|
43
|
-
sig { returns(T.nilable(Trycourier::
|
|
43
|
+
sig { returns(T.nilable(Trycourier::Recipient::Preferences)) }
|
|
44
44
|
attr_reader :preferences
|
|
45
45
|
|
|
46
46
|
sig do
|
|
47
47
|
params(
|
|
48
|
-
preferences: T.nilable(Trycourier::
|
|
48
|
+
preferences: T.nilable(Trycourier::Recipient::Preferences::OrHash)
|
|
49
49
|
).void
|
|
50
50
|
end
|
|
51
51
|
attr_writer :preferences
|
|
@@ -68,7 +68,7 @@ module Trycourier
|
|
|
68
68
|
list_id: T.nilable(String),
|
|
69
69
|
locale: T.nilable(String),
|
|
70
70
|
phone_number: T.nilable(String),
|
|
71
|
-
preferences: T.nilable(Trycourier::
|
|
71
|
+
preferences: T.nilable(Trycourier::Recipient::Preferences::OrHash),
|
|
72
72
|
tenant_id: T.nilable(String),
|
|
73
73
|
user_id: T.nilable(String)
|
|
74
74
|
).returns(T.attached_class)
|
|
@@ -106,7 +106,7 @@ module Trycourier
|
|
|
106
106
|
list_id: T.nilable(String),
|
|
107
107
|
locale: T.nilable(String),
|
|
108
108
|
phone_number: T.nilable(String),
|
|
109
|
-
preferences: T.nilable(Trycourier::
|
|
109
|
+
preferences: T.nilable(Trycourier::Recipient::Preferences),
|
|
110
110
|
tenant_id: T.nilable(String),
|
|
111
111
|
user_id: T.nilable(String)
|
|
112
112
|
}
|
|
@@ -114,6 +114,48 @@ module Trycourier
|
|
|
114
114
|
end
|
|
115
115
|
def to_hash
|
|
116
116
|
end
|
|
117
|
+
|
|
118
|
+
class Preferences < Trycourier::Internal::Type::BaseModel
|
|
119
|
+
OrHash =
|
|
120
|
+
T.type_alias do
|
|
121
|
+
T.any(
|
|
122
|
+
Trycourier::Recipient::Preferences,
|
|
123
|
+
Trycourier::Internal::AnyHash
|
|
124
|
+
)
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
sig { returns(T::Hash[Symbol, Trycourier::Preference]) }
|
|
128
|
+
attr_accessor :notifications
|
|
129
|
+
|
|
130
|
+
sig { returns(T.nilable(T::Hash[Symbol, Trycourier::Preference])) }
|
|
131
|
+
attr_accessor :categories
|
|
132
|
+
|
|
133
|
+
sig { returns(T.nilable(String)) }
|
|
134
|
+
attr_accessor :template_id
|
|
135
|
+
|
|
136
|
+
sig do
|
|
137
|
+
params(
|
|
138
|
+
notifications: T::Hash[Symbol, Trycourier::Preference::OrHash],
|
|
139
|
+
categories:
|
|
140
|
+
T.nilable(T::Hash[Symbol, Trycourier::Preference::OrHash]),
|
|
141
|
+
template_id: T.nilable(String)
|
|
142
|
+
).returns(T.attached_class)
|
|
143
|
+
end
|
|
144
|
+
def self.new(notifications:, categories: nil, template_id: nil)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
sig do
|
|
148
|
+
override.returns(
|
|
149
|
+
{
|
|
150
|
+
notifications: T::Hash[Symbol, Trycourier::Preference],
|
|
151
|
+
categories: T.nilable(T::Hash[Symbol, Trycourier::Preference]),
|
|
152
|
+
template_id: T.nilable(String)
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
end
|
|
156
|
+
def to_hash
|
|
157
|
+
end
|
|
158
|
+
end
|
|
117
159
|
end
|
|
118
160
|
end
|
|
119
161
|
end
|
|
@@ -40,12 +40,12 @@ module Trycourier
|
|
|
40
40
|
sig { returns(T.nilable(String)) }
|
|
41
41
|
attr_accessor :phone_number
|
|
42
42
|
|
|
43
|
-
sig { returns(T.nilable(Trycourier::
|
|
43
|
+
sig { returns(T.nilable(Trycourier::UserRecipient::Preferences)) }
|
|
44
44
|
attr_reader :preferences
|
|
45
45
|
|
|
46
46
|
sig do
|
|
47
47
|
params(
|
|
48
|
-
preferences: T.nilable(Trycourier::
|
|
48
|
+
preferences: T.nilable(Trycourier::UserRecipient::Preferences::OrHash)
|
|
49
49
|
).void
|
|
50
50
|
end
|
|
51
51
|
attr_writer :preferences
|
|
@@ -68,7 +68,8 @@ module Trycourier
|
|
|
68
68
|
list_id: T.nilable(String),
|
|
69
69
|
locale: T.nilable(String),
|
|
70
70
|
phone_number: T.nilable(String),
|
|
71
|
-
preferences:
|
|
71
|
+
preferences:
|
|
72
|
+
T.nilable(Trycourier::UserRecipient::Preferences::OrHash),
|
|
72
73
|
tenant_id: T.nilable(String),
|
|
73
74
|
user_id: T.nilable(String)
|
|
74
75
|
).returns(T.attached_class)
|
|
@@ -106,7 +107,7 @@ module Trycourier
|
|
|
106
107
|
list_id: T.nilable(String),
|
|
107
108
|
locale: T.nilable(String),
|
|
108
109
|
phone_number: T.nilable(String),
|
|
109
|
-
preferences: T.nilable(Trycourier::
|
|
110
|
+
preferences: T.nilable(Trycourier::UserRecipient::Preferences),
|
|
110
111
|
tenant_id: T.nilable(String),
|
|
111
112
|
user_id: T.nilable(String)
|
|
112
113
|
}
|
|
@@ -114,6 +115,48 @@ module Trycourier
|
|
|
114
115
|
end
|
|
115
116
|
def to_hash
|
|
116
117
|
end
|
|
118
|
+
|
|
119
|
+
class Preferences < Trycourier::Internal::Type::BaseModel
|
|
120
|
+
OrHash =
|
|
121
|
+
T.type_alias do
|
|
122
|
+
T.any(
|
|
123
|
+
Trycourier::UserRecipient::Preferences,
|
|
124
|
+
Trycourier::Internal::AnyHash
|
|
125
|
+
)
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
sig { returns(T::Hash[Symbol, Trycourier::Preference]) }
|
|
129
|
+
attr_accessor :notifications
|
|
130
|
+
|
|
131
|
+
sig { returns(T.nilable(T::Hash[Symbol, Trycourier::Preference])) }
|
|
132
|
+
attr_accessor :categories
|
|
133
|
+
|
|
134
|
+
sig { returns(T.nilable(String)) }
|
|
135
|
+
attr_accessor :template_id
|
|
136
|
+
|
|
137
|
+
sig do
|
|
138
|
+
params(
|
|
139
|
+
notifications: T::Hash[Symbol, Trycourier::Preference::OrHash],
|
|
140
|
+
categories:
|
|
141
|
+
T.nilable(T::Hash[Symbol, Trycourier::Preference::OrHash]),
|
|
142
|
+
template_id: T.nilable(String)
|
|
143
|
+
).returns(T.attached_class)
|
|
144
|
+
end
|
|
145
|
+
def self.new(notifications:, categories: nil, template_id: nil)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
sig do
|
|
149
|
+
override.returns(
|
|
150
|
+
{
|
|
151
|
+
notifications: T::Hash[Symbol, Trycourier::Preference],
|
|
152
|
+
categories: T.nilable(T::Hash[Symbol, Trycourier::Preference]),
|
|
153
|
+
template_id: T.nilable(String)
|
|
154
|
+
}
|
|
155
|
+
)
|
|
156
|
+
end
|
|
157
|
+
def to_hash
|
|
158
|
+
end
|
|
159
|
+
end
|
|
117
160
|
end
|
|
118
161
|
end
|
|
119
162
|
end
|
|
@@ -3,11 +3,33 @@
|
|
|
3
3
|
module Trycourier
|
|
4
4
|
module Models
|
|
5
5
|
module Users
|
|
6
|
-
TokenListResponse
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
class TokenListResponse < Trycourier::Internal::Type::BaseModel
|
|
7
|
+
OrHash =
|
|
8
|
+
T.type_alias do
|
|
9
|
+
T.any(
|
|
10
|
+
Trycourier::Models::Users::TokenListResponse,
|
|
11
|
+
Trycourier::Internal::AnyHash
|
|
12
|
+
)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
sig { returns(T::Array[Trycourier::Users::UserToken]) }
|
|
16
|
+
attr_accessor :tokens
|
|
17
|
+
|
|
18
|
+
# A list of tokens registered with the user.
|
|
19
|
+
sig do
|
|
20
|
+
params(
|
|
21
|
+
tokens: T::Array[Trycourier::Users::UserToken::OrHash]
|
|
22
|
+
).returns(T.attached_class)
|
|
23
|
+
end
|
|
24
|
+
def self.new(tokens:)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
sig do
|
|
28
|
+
override.returns({ tokens: T::Array[Trycourier::Users::UserToken] })
|
|
29
|
+
end
|
|
30
|
+
def to_hash
|
|
31
|
+
end
|
|
32
|
+
end
|
|
11
33
|
end
|
|
12
34
|
end
|
|
13
35
|
end
|
data/rbi/trycourier/models.rbi
CHANGED
|
@@ -174,8 +174,6 @@ module Trycourier
|
|
|
174
174
|
|
|
175
175
|
ProfileDeleteParams = Trycourier::Models::ProfileDeleteParams
|
|
176
176
|
|
|
177
|
-
ProfilePreferences = Trycourier::Models::ProfilePreferences
|
|
178
|
-
|
|
179
177
|
ProfileReplaceParams = Trycourier::Models::ProfileReplaceParams
|
|
180
178
|
|
|
181
179
|
ProfileRetrieveParams = Trycourier::Models::ProfileRetrieveParams
|
|
@@ -47,7 +47,7 @@ module Trycourier
|
|
|
47
47
|
params(
|
|
48
48
|
user_id: String,
|
|
49
49
|
request_options: Trycourier::RequestOptions::OrHash
|
|
50
|
-
).returns(
|
|
50
|
+
).returns(Trycourier::Models::Users::TokenListResponse)
|
|
51
51
|
end
|
|
52
52
|
def list(
|
|
53
53
|
# The user's ID. This can be any uniquely identifiable string.
|
|
@@ -9,7 +9,7 @@ module Trycourier
|
|
|
9
9
|
list_id: String?,
|
|
10
10
|
locale: String?,
|
|
11
11
|
phone_number: String?,
|
|
12
|
-
preferences: Trycourier::
|
|
12
|
+
preferences: Trycourier::Recipient::Preferences?,
|
|
13
13
|
tenant_id: String?,
|
|
14
14
|
user_id: String?
|
|
15
15
|
}
|
|
@@ -29,7 +29,7 @@ module Trycourier
|
|
|
29
29
|
|
|
30
30
|
attr_accessor phone_number: String?
|
|
31
31
|
|
|
32
|
-
attr_accessor preferences: Trycourier::
|
|
32
|
+
attr_accessor preferences: Trycourier::Recipient::Preferences?
|
|
33
33
|
|
|
34
34
|
attr_accessor tenant_id: String?
|
|
35
35
|
|
|
@@ -43,7 +43,7 @@ module Trycourier
|
|
|
43
43
|
?list_id: String?,
|
|
44
44
|
?locale: String?,
|
|
45
45
|
?phone_number: String?,
|
|
46
|
-
?preferences: Trycourier::
|
|
46
|
+
?preferences: Trycourier::Recipient::Preferences?,
|
|
47
47
|
?tenant_id: String?,
|
|
48
48
|
?user_id: String?
|
|
49
49
|
) -> void
|
|
@@ -56,10 +56,37 @@ module Trycourier
|
|
|
56
56
|
list_id: String?,
|
|
57
57
|
locale: String?,
|
|
58
58
|
phone_number: String?,
|
|
59
|
-
preferences: Trycourier::
|
|
59
|
+
preferences: Trycourier::Recipient::Preferences?,
|
|
60
60
|
tenant_id: String?,
|
|
61
61
|
user_id: String?
|
|
62
62
|
}
|
|
63
|
+
|
|
64
|
+
type preferences =
|
|
65
|
+
{
|
|
66
|
+
notifications: ::Hash[Symbol, Trycourier::Preference],
|
|
67
|
+
categories: ::Hash[Symbol, Trycourier::Preference]?,
|
|
68
|
+
template_id: String?
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
class Preferences < Trycourier::Internal::Type::BaseModel
|
|
72
|
+
attr_accessor notifications: ::Hash[Symbol, Trycourier::Preference]
|
|
73
|
+
|
|
74
|
+
attr_accessor categories: ::Hash[Symbol, Trycourier::Preference]?
|
|
75
|
+
|
|
76
|
+
attr_accessor template_id: String?
|
|
77
|
+
|
|
78
|
+
def initialize: (
|
|
79
|
+
notifications: ::Hash[Symbol, Trycourier::Preference],
|
|
80
|
+
?categories: ::Hash[Symbol, Trycourier::Preference]?,
|
|
81
|
+
?template_id: String?
|
|
82
|
+
) -> void
|
|
83
|
+
|
|
84
|
+
def to_hash: -> {
|
|
85
|
+
notifications: ::Hash[Symbol, Trycourier::Preference],
|
|
86
|
+
categories: ::Hash[Symbol, Trycourier::Preference]?,
|
|
87
|
+
template_id: String?
|
|
88
|
+
}
|
|
89
|
+
end
|
|
63
90
|
end
|
|
64
91
|
end
|
|
65
92
|
end
|
|
@@ -9,7 +9,7 @@ module Trycourier
|
|
|
9
9
|
list_id: String?,
|
|
10
10
|
locale: String?,
|
|
11
11
|
phone_number: String?,
|
|
12
|
-
preferences: Trycourier::
|
|
12
|
+
preferences: Trycourier::UserRecipient::Preferences?,
|
|
13
13
|
tenant_id: String?,
|
|
14
14
|
user_id: String?
|
|
15
15
|
}
|
|
@@ -29,7 +29,7 @@ module Trycourier
|
|
|
29
29
|
|
|
30
30
|
attr_accessor phone_number: String?
|
|
31
31
|
|
|
32
|
-
attr_accessor preferences: Trycourier::
|
|
32
|
+
attr_accessor preferences: Trycourier::UserRecipient::Preferences?
|
|
33
33
|
|
|
34
34
|
attr_accessor tenant_id: String?
|
|
35
35
|
|
|
@@ -43,7 +43,7 @@ module Trycourier
|
|
|
43
43
|
?list_id: String?,
|
|
44
44
|
?locale: String?,
|
|
45
45
|
?phone_number: String?,
|
|
46
|
-
?preferences: Trycourier::
|
|
46
|
+
?preferences: Trycourier::UserRecipient::Preferences?,
|
|
47
47
|
?tenant_id: String?,
|
|
48
48
|
?user_id: String?
|
|
49
49
|
) -> void
|
|
@@ -56,10 +56,37 @@ module Trycourier
|
|
|
56
56
|
list_id: String?,
|
|
57
57
|
locale: String?,
|
|
58
58
|
phone_number: String?,
|
|
59
|
-
preferences: Trycourier::
|
|
59
|
+
preferences: Trycourier::UserRecipient::Preferences?,
|
|
60
60
|
tenant_id: String?,
|
|
61
61
|
user_id: String?
|
|
62
62
|
}
|
|
63
|
+
|
|
64
|
+
type preferences =
|
|
65
|
+
{
|
|
66
|
+
notifications: ::Hash[Symbol, Trycourier::Preference],
|
|
67
|
+
categories: ::Hash[Symbol, Trycourier::Preference]?,
|
|
68
|
+
template_id: String?
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
class Preferences < Trycourier::Internal::Type::BaseModel
|
|
72
|
+
attr_accessor notifications: ::Hash[Symbol, Trycourier::Preference]
|
|
73
|
+
|
|
74
|
+
attr_accessor categories: ::Hash[Symbol, Trycourier::Preference]?
|
|
75
|
+
|
|
76
|
+
attr_accessor template_id: String?
|
|
77
|
+
|
|
78
|
+
def initialize: (
|
|
79
|
+
notifications: ::Hash[Symbol, Trycourier::Preference],
|
|
80
|
+
?categories: ::Hash[Symbol, Trycourier::Preference]?,
|
|
81
|
+
?template_id: String?
|
|
82
|
+
) -> void
|
|
83
|
+
|
|
84
|
+
def to_hash: -> {
|
|
85
|
+
notifications: ::Hash[Symbol, Trycourier::Preference],
|
|
86
|
+
categories: ::Hash[Symbol, Trycourier::Preference]?,
|
|
87
|
+
template_id: String?
|
|
88
|
+
}
|
|
89
|
+
end
|
|
63
90
|
end
|
|
64
91
|
end
|
|
65
92
|
end
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
module Trycourier
|
|
2
2
|
module Models
|
|
3
3
|
module Users
|
|
4
|
-
type token_list_response =
|
|
4
|
+
type token_list_response =
|
|
5
|
+
{ tokens: ::Array[Trycourier::Users::UserToken] }
|
|
5
6
|
|
|
6
|
-
TokenListResponse
|
|
7
|
+
class TokenListResponse < Trycourier::Internal::Type::BaseModel
|
|
8
|
+
attr_accessor tokens: ::Array[Trycourier::Users::UserToken]
|
|
9
|
+
|
|
10
|
+
def initialize: (tokens: ::Array[Trycourier::Users::UserToken]) -> void
|
|
11
|
+
|
|
12
|
+
def to_hash: -> { tokens: ::Array[Trycourier::Users::UserToken] }
|
|
13
|
+
end
|
|
7
14
|
end
|
|
8
15
|
end
|
|
9
16
|
end
|
data/sig/trycourier/models.rbs
CHANGED
|
@@ -167,8 +167,6 @@ module Trycourier
|
|
|
167
167
|
|
|
168
168
|
class ProfileDeleteParams = Trycourier::Models::ProfileDeleteParams
|
|
169
169
|
|
|
170
|
-
class ProfilePreferences = Trycourier::Models::ProfilePreferences
|
|
171
|
-
|
|
172
170
|
class ProfileReplaceParams = Trycourier::Models::ProfileReplaceParams
|
|
173
171
|
|
|
174
172
|
class ProfileRetrieveParams = Trycourier::Models::ProfileRetrieveParams
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: trycourier
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.
|
|
4
|
+
version: 4.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Courier
|
|
@@ -167,7 +167,6 @@ files:
|
|
|
167
167
|
- lib/trycourier/models/profile_create_params.rb
|
|
168
168
|
- lib/trycourier/models/profile_create_response.rb
|
|
169
169
|
- lib/trycourier/models/profile_delete_params.rb
|
|
170
|
-
- lib/trycourier/models/profile_preferences.rb
|
|
171
170
|
- lib/trycourier/models/profile_replace_params.rb
|
|
172
171
|
- lib/trycourier/models/profile_replace_response.rb
|
|
173
172
|
- lib/trycourier/models/profile_retrieve_params.rb
|
|
@@ -393,7 +392,6 @@ files:
|
|
|
393
392
|
- rbi/trycourier/models/profile_create_params.rbi
|
|
394
393
|
- rbi/trycourier/models/profile_create_response.rbi
|
|
395
394
|
- rbi/trycourier/models/profile_delete_params.rbi
|
|
396
|
-
- rbi/trycourier/models/profile_preferences.rbi
|
|
397
395
|
- rbi/trycourier/models/profile_replace_params.rbi
|
|
398
396
|
- rbi/trycourier/models/profile_replace_response.rbi
|
|
399
397
|
- rbi/trycourier/models/profile_retrieve_params.rbi
|
|
@@ -618,7 +616,6 @@ files:
|
|
|
618
616
|
- sig/trycourier/models/profile_create_params.rbs
|
|
619
617
|
- sig/trycourier/models/profile_create_response.rbs
|
|
620
618
|
- sig/trycourier/models/profile_delete_params.rbs
|
|
621
|
-
- sig/trycourier/models/profile_preferences.rbs
|
|
622
619
|
- sig/trycourier/models/profile_replace_params.rbs
|
|
623
620
|
- sig/trycourier/models/profile_replace_response.rbs
|
|
624
621
|
- sig/trycourier/models/profile_retrieve_params.rbs
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Trycourier
|
|
4
|
-
module Models
|
|
5
|
-
class ProfilePreferences < Trycourier::Internal::Type::BaseModel
|
|
6
|
-
# @!attribute notifications
|
|
7
|
-
#
|
|
8
|
-
# @return [Hash{Symbol=>Trycourier::Models::Preference}]
|
|
9
|
-
required :notifications, -> { Trycourier::Internal::Type::HashOf[Trycourier::Preference] }
|
|
10
|
-
|
|
11
|
-
# @!attribute categories
|
|
12
|
-
#
|
|
13
|
-
# @return [Hash{Symbol=>Trycourier::Models::Preference}, nil]
|
|
14
|
-
optional :categories, -> { Trycourier::Internal::Type::HashOf[Trycourier::Preference] }, nil?: true
|
|
15
|
-
|
|
16
|
-
# @!attribute template_id
|
|
17
|
-
#
|
|
18
|
-
# @return [String, nil]
|
|
19
|
-
optional :template_id, String, api_name: :templateId, nil?: true
|
|
20
|
-
|
|
21
|
-
# @!method initialize(notifications:, categories: nil, template_id: nil)
|
|
22
|
-
# @param notifications [Hash{Symbol=>Trycourier::Models::Preference}]
|
|
23
|
-
# @param categories [Hash{Symbol=>Trycourier::Models::Preference}, nil]
|
|
24
|
-
# @param template_id [String, nil]
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# typed: strong
|
|
2
|
-
|
|
3
|
-
module Trycourier
|
|
4
|
-
module Models
|
|
5
|
-
class ProfilePreferences < Trycourier::Internal::Type::BaseModel
|
|
6
|
-
OrHash =
|
|
7
|
-
T.type_alias do
|
|
8
|
-
T.any(Trycourier::ProfilePreferences, Trycourier::Internal::AnyHash)
|
|
9
|
-
end
|
|
10
|
-
|
|
11
|
-
sig { returns(T::Hash[Symbol, Trycourier::Preference]) }
|
|
12
|
-
attr_accessor :notifications
|
|
13
|
-
|
|
14
|
-
sig { returns(T.nilable(T::Hash[Symbol, Trycourier::Preference])) }
|
|
15
|
-
attr_accessor :categories
|
|
16
|
-
|
|
17
|
-
sig { returns(T.nilable(String)) }
|
|
18
|
-
attr_accessor :template_id
|
|
19
|
-
|
|
20
|
-
sig do
|
|
21
|
-
params(
|
|
22
|
-
notifications: T::Hash[Symbol, Trycourier::Preference::OrHash],
|
|
23
|
-
categories:
|
|
24
|
-
T.nilable(T::Hash[Symbol, Trycourier::Preference::OrHash]),
|
|
25
|
-
template_id: T.nilable(String)
|
|
26
|
-
).returns(T.attached_class)
|
|
27
|
-
end
|
|
28
|
-
def self.new(notifications:, categories: nil, template_id: nil)
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
sig do
|
|
32
|
-
override.returns(
|
|
33
|
-
{
|
|
34
|
-
notifications: T::Hash[Symbol, Trycourier::Preference],
|
|
35
|
-
categories: T.nilable(T::Hash[Symbol, Trycourier::Preference]),
|
|
36
|
-
template_id: T.nilable(String)
|
|
37
|
-
}
|
|
38
|
-
)
|
|
39
|
-
end
|
|
40
|
-
def to_hash
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
|
-
end
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
module Trycourier
|
|
2
|
-
module Models
|
|
3
|
-
type profile_preferences =
|
|
4
|
-
{
|
|
5
|
-
notifications: ::Hash[Symbol, Trycourier::Preference],
|
|
6
|
-
categories: ::Hash[Symbol, Trycourier::Preference]?,
|
|
7
|
-
template_id: String?
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
class ProfilePreferences < Trycourier::Internal::Type::BaseModel
|
|
11
|
-
attr_accessor notifications: ::Hash[Symbol, Trycourier::Preference]
|
|
12
|
-
|
|
13
|
-
attr_accessor categories: ::Hash[Symbol, Trycourier::Preference]?
|
|
14
|
-
|
|
15
|
-
attr_accessor template_id: String?
|
|
16
|
-
|
|
17
|
-
def initialize: (
|
|
18
|
-
notifications: ::Hash[Symbol, Trycourier::Preference],
|
|
19
|
-
?categories: ::Hash[Symbol, Trycourier::Preference]?,
|
|
20
|
-
?template_id: String?
|
|
21
|
-
) -> void
|
|
22
|
-
|
|
23
|
-
def to_hash: -> {
|
|
24
|
-
notifications: ::Hash[Symbol, Trycourier::Preference],
|
|
25
|
-
categories: ::Hash[Symbol, Trycourier::Preference]?,
|
|
26
|
-
template_id: String?
|
|
27
|
-
}
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|