trycourier 4.2.0 → 4.4.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 +17 -0
- data/README.md +1 -1
- data/lib/trycourier/models/bulk_create_job_params.rb +12 -3
- data/lib/trycourier/models/bulk_retrieve_job_response.rb +15 -3
- data/lib/trycourier/models/inbound_bulk_message.rb +79 -113
- data/lib/trycourier/models/inbound_bulk_message_user.rb +21 -6
- data/lib/trycourier/models/recipient.rb +26 -3
- data/lib/trycourier/models/send_message_params.rb +14 -1
- 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/bulk.rb +17 -3
- 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/bulk_create_job_params.rbi +21 -20
- data/rbi/trycourier/models/bulk_retrieve_job_response.rbi +24 -9
- data/rbi/trycourier/models/inbound_bulk_message.rbi +97 -153
- data/rbi/trycourier/models/inbound_bulk_message_user.rbi +20 -7
- data/rbi/trycourier/models/recipient.rbi +46 -4
- data/rbi/trycourier/models/send_message_params.rbi +16 -1
- 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/bulk.rbi +22 -8
- data/rbi/trycourier/resources/users/tokens.rbi +1 -1
- data/sig/trycourier/models/bulk_create_job_params.rbs +4 -4
- data/sig/trycourier/models/bulk_retrieve_job_response.rbs +4 -4
- data/sig/trycourier/models/inbound_bulk_message.rbs +52 -99
- data/sig/trycourier/models/inbound_bulk_message_user.rbs +4 -6
- data/sig/trycourier/models/recipient.rbs +31 -4
- data/sig/trycourier/models/send_message_params.rbs +13 -3
- 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 +1 -3
- data/sig/trycourier/resources/bulk.rbs +1 -1
- data/sig/trycourier/resources/users/tokens.rbs +1 -1
- metadata +2 -5
- 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: 44c04a056977df7fe1d6cb3728f5cd20d3146303a4aa290ab736cd8b0b5b48cc
|
|
4
|
+
data.tar.gz: 2f8b70b8eadaa154cec067afbbb503ed808278ebed1f867981790a661ea027c6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 17ddc44b894c1652b8ab7fe614d2bcf99c936e9d36f124c1121ee913dfff46d6674c9672c1f3192c160fae83c76eaa1bd50382bcb9aff1963978ace8bf883bb2
|
|
7
|
+
data.tar.gz: c0ce826de197896c96af433c3089989bb133d3c53dba59509e828fb52145c823bf0e77f9323004a22b87f94c073d3efe515caace6939ba167e8afae4c29d59d5
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.4.0 (2025-12-16)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v4.3.0...v4.4.0](https://github.com/trycourier/courier-ruby/compare/v4.3.0...v4.4.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* Add timezone field to Delay schema ([980df61](https://github.com/trycourier/courier-ruby/commit/980df617cffc47a231bac77a4250ef4e409cb57c))
|
|
10
|
+
* Update bulk API spec: make event required, document profile.email req… ([73718b3](https://github.com/trycourier/courier-ruby/commit/73718b3e6c13e0a3ac1bc5487eb07953f435a956))
|
|
11
|
+
|
|
12
|
+
## 4.3.0 (2025-12-08)
|
|
13
|
+
|
|
14
|
+
Full Changelog: [v4.2.0...v4.3.0](https://github.com/trycourier/courier-ruby/compare/v4.2.0...v4.3.0)
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
* Fix UsersGetAllTokensResponse to return object with tokens property i… ([dad98a1](https://github.com/trycourier/courier-ruby/commit/dad98a163d391bf45510d10c10d2d7597e1af74e))
|
|
19
|
+
|
|
3
20
|
## 4.2.0 (2025-12-08)
|
|
4
21
|
|
|
5
22
|
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
|
@@ -8,12 +8,21 @@ module Trycourier
|
|
|
8
8
|
include Trycourier::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
10
|
# @!attribute message
|
|
11
|
+
# Bulk message definition. Supports two formats:
|
|
11
12
|
#
|
|
12
|
-
#
|
|
13
|
-
|
|
13
|
+
# - V1 format: Requires `event` field (event ID or notification ID)
|
|
14
|
+
# - V2 format: Optionally use `template` (notification ID) or `content` (Elemental
|
|
15
|
+
# content) in addition to `event`
|
|
16
|
+
#
|
|
17
|
+
# @return [Trycourier::Models::InboundBulkMessage]
|
|
18
|
+
required :message, -> { Trycourier::InboundBulkMessage }
|
|
14
19
|
|
|
15
20
|
# @!method initialize(message:, request_options: {})
|
|
16
|
-
#
|
|
21
|
+
# Some parameter documentations has been truncated, see
|
|
22
|
+
# {Trycourier::Models::BulkCreateJobParams} for more details.
|
|
23
|
+
#
|
|
24
|
+
# @param message [Trycourier::Models::InboundBulkMessage] Bulk message definition. Supports two formats:
|
|
25
|
+
#
|
|
17
26
|
# @param request_options [Trycourier::RequestOptions, Hash{Symbol=>Object}]
|
|
18
27
|
end
|
|
19
28
|
end
|
|
@@ -15,9 +15,14 @@ module Trycourier
|
|
|
15
15
|
# @see Trycourier::Models::BulkRetrieveJobResponse#job
|
|
16
16
|
class Job < Trycourier::Internal::Type::BaseModel
|
|
17
17
|
# @!attribute definition
|
|
18
|
+
# Bulk message definition. Supports two formats:
|
|
18
19
|
#
|
|
19
|
-
#
|
|
20
|
-
|
|
20
|
+
# - V1 format: Requires `event` field (event ID or notification ID)
|
|
21
|
+
# - V2 format: Optionally use `template` (notification ID) or `content` (Elemental
|
|
22
|
+
# content) in addition to `event`
|
|
23
|
+
#
|
|
24
|
+
# @return [Trycourier::Models::InboundBulkMessage]
|
|
25
|
+
required :definition, -> { Trycourier::InboundBulkMessage }
|
|
21
26
|
|
|
22
27
|
# @!attribute enqueued
|
|
23
28
|
#
|
|
@@ -40,10 +45,17 @@ module Trycourier
|
|
|
40
45
|
required :status, enum: -> { Trycourier::Models::BulkRetrieveJobResponse::Job::Status }
|
|
41
46
|
|
|
42
47
|
# @!method initialize(definition:, enqueued:, failures:, received:, status:)
|
|
43
|
-
#
|
|
48
|
+
# Some parameter documentations has been truncated, see
|
|
49
|
+
# {Trycourier::Models::BulkRetrieveJobResponse::Job} for more details.
|
|
50
|
+
#
|
|
51
|
+
# @param definition [Trycourier::Models::InboundBulkMessage] Bulk message definition. Supports two formats:
|
|
52
|
+
#
|
|
44
53
|
# @param enqueued [Integer]
|
|
54
|
+
#
|
|
45
55
|
# @param failures [Integer]
|
|
56
|
+
#
|
|
46
57
|
# @param received [Integer]
|
|
58
|
+
#
|
|
47
59
|
# @param status [Symbol, Trycourier::Models::BulkRetrieveJobResponse::Job::Status]
|
|
48
60
|
|
|
49
61
|
# @see Trycourier::Models::BulkRetrieveJobResponse::Job#status
|
|
@@ -2,124 +2,90 @@
|
|
|
2
2
|
|
|
3
3
|
module Trycourier
|
|
4
4
|
module Models
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
# @return [Hash{Symbol=>Hash{Symbol=>Object}}, nil]
|
|
81
|
-
optional :locale,
|
|
82
|
-
Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::Unknown]],
|
|
83
|
-
nil?: true
|
|
84
|
-
|
|
85
|
-
# @!attribute override
|
|
86
|
-
#
|
|
87
|
-
# @return [Hash{Symbol=>Object}, nil]
|
|
88
|
-
optional :override,
|
|
89
|
-
Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::Unknown],
|
|
90
|
-
nil?: true
|
|
91
|
-
|
|
92
|
-
# @!method initialize(content:, brand: nil, data: nil, event: nil, locale: nil, override: nil)
|
|
93
|
-
# @param content [Trycourier::Models::ElementalContentSugar, Trycourier::Models::ElementalContent] Syntactic sugar to provide a fast shorthand for Courier Elemental Blocks.
|
|
94
|
-
#
|
|
95
|
-
# @param brand [String, nil]
|
|
96
|
-
#
|
|
97
|
-
# @param data [Hash{Symbol=>Object}, nil]
|
|
98
|
-
#
|
|
99
|
-
# @param event [String, nil]
|
|
100
|
-
#
|
|
101
|
-
# @param locale [Hash{Symbol=>Hash{Symbol=>Object}}, nil]
|
|
102
|
-
#
|
|
103
|
-
# @param override [Hash{Symbol=>Object}, nil]
|
|
5
|
+
class InboundBulkMessage < Trycourier::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute event
|
|
7
|
+
# Event ID or Notification ID (required). Can be either a Notification ID (e.g.,
|
|
8
|
+
# "FRH3QXM9E34W4RKP7MRC8NZ1T8V8") or a custom Event ID (e.g., "welcome-email")
|
|
9
|
+
# mapped to a notification.
|
|
10
|
+
#
|
|
11
|
+
# @return [String]
|
|
12
|
+
required :event, String
|
|
13
|
+
|
|
14
|
+
# @!attribute brand
|
|
15
|
+
#
|
|
16
|
+
# @return [String, nil]
|
|
17
|
+
optional :brand, String, nil?: true
|
|
18
|
+
|
|
19
|
+
# @!attribute content
|
|
20
|
+
# Elemental content (optional, for V2 format). When provided, this will be used
|
|
21
|
+
# instead of the notification associated with the `event` field.
|
|
22
|
+
#
|
|
23
|
+
# @return [Trycourier::Models::ElementalContentSugar, Trycourier::Models::ElementalContent, nil]
|
|
24
|
+
optional :content, union: -> { Trycourier::InboundBulkMessage::Content }, nil?: true
|
|
25
|
+
|
|
26
|
+
# @!attribute data
|
|
27
|
+
#
|
|
28
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
29
|
+
optional :data, Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::Unknown], nil?: true
|
|
30
|
+
|
|
31
|
+
# @!attribute locale
|
|
32
|
+
#
|
|
33
|
+
# @return [Hash{Symbol=>Hash{Symbol=>Object}}, nil]
|
|
34
|
+
optional :locale,
|
|
35
|
+
Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::Unknown]],
|
|
36
|
+
nil?: true
|
|
37
|
+
|
|
38
|
+
# @!attribute override
|
|
39
|
+
#
|
|
40
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
41
|
+
optional :override, Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::Unknown], nil?: true
|
|
42
|
+
|
|
43
|
+
# @!attribute template
|
|
44
|
+
# Notification ID or template ID (optional, for V2 format). When provided, this
|
|
45
|
+
# will be used instead of the notification associated with the `event` field.
|
|
46
|
+
#
|
|
47
|
+
# @return [String, nil]
|
|
48
|
+
optional :template, String, nil?: true
|
|
49
|
+
|
|
50
|
+
# @!method initialize(event:, brand: nil, content: nil, data: nil, locale: nil, override: nil, template: nil)
|
|
51
|
+
# Some parameter documentations has been truncated, see
|
|
52
|
+
# {Trycourier::Models::InboundBulkMessage} for more details.
|
|
53
|
+
#
|
|
54
|
+
# Bulk message definition. Supports two formats:
|
|
55
|
+
#
|
|
56
|
+
# - V1 format: Requires `event` field (event ID or notification ID)
|
|
57
|
+
# - V2 format: Optionally use `template` (notification ID) or `content` (Elemental
|
|
58
|
+
# content) in addition to `event`
|
|
59
|
+
#
|
|
60
|
+
# @param event [String] Event ID or Notification ID (required). Can be either a
|
|
61
|
+
#
|
|
62
|
+
# @param brand [String, nil]
|
|
63
|
+
#
|
|
64
|
+
# @param content [Trycourier::Models::ElementalContentSugar, Trycourier::Models::ElementalContent, nil] Elemental content (optional, for V2 format). When provided, this will be used
|
|
65
|
+
#
|
|
66
|
+
# @param data [Hash{Symbol=>Object}, nil]
|
|
67
|
+
#
|
|
68
|
+
# @param locale [Hash{Symbol=>Hash{Symbol=>Object}}, nil]
|
|
69
|
+
#
|
|
70
|
+
# @param override [Hash{Symbol=>Object}, nil]
|
|
71
|
+
#
|
|
72
|
+
# @param template [String, nil] Notification ID or template ID (optional, for V2 format). When provided,
|
|
73
|
+
|
|
74
|
+
# Elemental content (optional, for V2 format). When provided, this will be used
|
|
75
|
+
# instead of the notification associated with the `event` field.
|
|
76
|
+
#
|
|
77
|
+
# @see Trycourier::Models::InboundBulkMessage#content
|
|
78
|
+
module Content
|
|
79
|
+
extend Trycourier::Internal::Type::Union
|
|
104
80
|
|
|
105
81
|
# Syntactic sugar to provide a fast shorthand for Courier Elemental Blocks.
|
|
106
|
-
|
|
107
|
-
# @see Trycourier::Models::InboundBulkMessage::InboundBulkContentMessage#content
|
|
108
|
-
module Content
|
|
109
|
-
extend Trycourier::Internal::Type::Union
|
|
82
|
+
variant -> { Trycourier::ElementalContentSugar }
|
|
110
83
|
|
|
111
|
-
|
|
112
|
-
variant -> { Trycourier::ElementalContentSugar }
|
|
84
|
+
variant -> { Trycourier::ElementalContent }
|
|
113
85
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
# @!method self.variants
|
|
117
|
-
# @return [Array(Trycourier::Models::ElementalContentSugar, Trycourier::Models::ElementalContent)]
|
|
118
|
-
end
|
|
86
|
+
# @!method self.variants
|
|
87
|
+
# @return [Array(Trycourier::Models::ElementalContentSugar, Trycourier::Models::ElementalContent)]
|
|
119
88
|
end
|
|
120
|
-
|
|
121
|
-
# @!method self.variants
|
|
122
|
-
# @return [Array(Trycourier::Models::InboundBulkMessage::InboundBulkTemplateMessage, Trycourier::Models::InboundBulkMessage::InboundBulkContentMessage)]
|
|
123
89
|
end
|
|
124
90
|
end
|
|
125
91
|
end
|
|
@@ -4,6 +4,7 @@ module Trycourier
|
|
|
4
4
|
module Models
|
|
5
5
|
class InboundBulkMessageUser < Trycourier::Internal::Type::BaseModel
|
|
6
6
|
# @!attribute data
|
|
7
|
+
# User-specific data that will be merged with message.data
|
|
7
8
|
#
|
|
8
9
|
# @return [Object, nil]
|
|
9
10
|
optional :data, Trycourier::Internal::Type::Unknown
|
|
@@ -14,26 +15,40 @@ module Trycourier
|
|
|
14
15
|
optional :preferences, -> { Trycourier::RecipientPreferences }, nil?: true
|
|
15
16
|
|
|
16
17
|
# @!attribute profile
|
|
18
|
+
# User profile information. For email-based bulk jobs, `profile.email` is required
|
|
19
|
+
# for provider routing to determine if the message can be delivered. The email
|
|
20
|
+
# address should be provided here rather than in `to.email`.
|
|
17
21
|
#
|
|
18
|
-
# @return [Object, nil]
|
|
19
|
-
optional :profile, Trycourier::Internal::Type::Unknown
|
|
22
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
23
|
+
optional :profile, Trycourier::Internal::Type::HashOf[Trycourier::Internal::Type::Unknown], nil?: true
|
|
20
24
|
|
|
21
25
|
# @!attribute recipient
|
|
26
|
+
# User ID (legacy field, use profile or to.user_id instead)
|
|
22
27
|
#
|
|
23
28
|
# @return [String, nil]
|
|
24
29
|
optional :recipient, String, nil?: true
|
|
25
30
|
|
|
26
31
|
# @!attribute to
|
|
32
|
+
# Optional recipient information. Note: For email provider routing, use
|
|
33
|
+
# `profile.email` instead of `to.email`. The `to` field is primarily used for
|
|
34
|
+
# recipient identification and data merging.
|
|
27
35
|
#
|
|
28
36
|
# @return [Trycourier::Models::UserRecipient, nil]
|
|
29
37
|
optional :to, -> { Trycourier::UserRecipient }, nil?: true
|
|
30
38
|
|
|
31
39
|
# @!method initialize(data: nil, preferences: nil, profile: nil, recipient: nil, to: nil)
|
|
32
|
-
#
|
|
40
|
+
# Some parameter documentations has been truncated, see
|
|
41
|
+
# {Trycourier::Models::InboundBulkMessageUser} for more details.
|
|
42
|
+
#
|
|
43
|
+
# @param data [Object] User-specific data that will be merged with message.data
|
|
44
|
+
#
|
|
33
45
|
# @param preferences [Trycourier::Models::RecipientPreferences, nil]
|
|
34
|
-
#
|
|
35
|
-
# @param
|
|
36
|
-
#
|
|
46
|
+
#
|
|
47
|
+
# @param profile [Hash{Symbol=>Object}, nil] User profile information. For email-based bulk jobs, `profile.email` is required
|
|
48
|
+
#
|
|
49
|
+
# @param recipient [String, nil] User ID (legacy field, use profile or to.user_id instead)
|
|
50
|
+
#
|
|
51
|
+
# @param to [Trycourier::Models::UserRecipient, nil] Optional recipient information. Note: For email provider routing, use
|
|
37
52
|
end
|
|
38
53
|
end
|
|
39
54
|
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::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
|
|
@@ -264,15 +264,28 @@ module Trycourier
|
|
|
264
264
|
# @return [Integer, nil]
|
|
265
265
|
optional :duration, Integer, nil?: true
|
|
266
266
|
|
|
267
|
+
# @!attribute timezone
|
|
268
|
+
# IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). Used when
|
|
269
|
+
# resolving opening hours expressions. Takes precedence over user profile timezone
|
|
270
|
+
# settings.
|
|
271
|
+
#
|
|
272
|
+
# @return [String, nil]
|
|
273
|
+
optional :timezone, String, nil?: true
|
|
274
|
+
|
|
267
275
|
# @!attribute until_
|
|
268
276
|
# ISO 8601 timestamp or opening_hours-like format.
|
|
269
277
|
#
|
|
270
278
|
# @return [String, nil]
|
|
271
279
|
optional :until_, String, api_name: :until, nil?: true
|
|
272
280
|
|
|
273
|
-
# @!method initialize(duration: nil, until_: nil)
|
|
281
|
+
# @!method initialize(duration: nil, timezone: nil, until_: nil)
|
|
282
|
+
# Some parameter documentations has been truncated, see
|
|
283
|
+
# {Trycourier::Models::SendMessageParams::Message::Delay} for more details.
|
|
284
|
+
#
|
|
274
285
|
# @param duration [Integer, nil] The duration of the delay in milliseconds.
|
|
275
286
|
#
|
|
287
|
+
# @param timezone [String, nil] IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). Used when resolvi
|
|
288
|
+
#
|
|
276
289
|
# @param until_ [String, nil] ISO 8601 timestamp or opening_hours-like format.
|
|
277
290
|
end
|
|
278
291
|
|
|
@@ -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
|
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
module Trycourier
|
|
4
4
|
module Resources
|
|
5
5
|
class Bulk
|
|
6
|
-
# Ingest user data into a Bulk Job
|
|
6
|
+
# Ingest user data into a Bulk Job.
|
|
7
|
+
#
|
|
8
|
+
# **Important**: For email-based bulk jobs, each user must include `profile.email`
|
|
9
|
+
# for provider routing to work correctly. The `to.email` field is not sufficient
|
|
10
|
+
# for email provider routing.
|
|
7
11
|
#
|
|
8
12
|
# @overload add_users(job_id, users:, request_options: {})
|
|
9
13
|
#
|
|
@@ -27,11 +31,21 @@ module Trycourier
|
|
|
27
31
|
)
|
|
28
32
|
end
|
|
29
33
|
|
|
30
|
-
#
|
|
34
|
+
# Some parameter documentations has been truncated, see
|
|
35
|
+
# {Trycourier::Models::BulkCreateJobParams} for more details.
|
|
36
|
+
#
|
|
37
|
+
# Creates a new bulk job for sending messages to multiple recipients.
|
|
38
|
+
#
|
|
39
|
+
# **Required**: `message.event` (event ID or notification ID)
|
|
40
|
+
#
|
|
41
|
+
# **Optional (V2 format)**: `message.template` (notification ID) or
|
|
42
|
+
# `message.content` (Elemental content) can be provided to override the
|
|
43
|
+
# notification associated with the event.
|
|
31
44
|
#
|
|
32
45
|
# @overload create_job(message:, request_options: {})
|
|
33
46
|
#
|
|
34
|
-
# @param message [Trycourier::Models::InboundBulkMessage
|
|
47
|
+
# @param message [Trycourier::Models::InboundBulkMessage] Bulk message definition. Supports two formats:
|
|
48
|
+
#
|
|
35
49
|
# @param request_options [Trycourier::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
36
50
|
#
|
|
37
51
|
# @return [Trycourier::Models::BulkCreateJobResponse]
|
|
@@ -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"
|