trycourier 4.3.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 +9 -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/send_message_params.rb +14 -1
- data/lib/trycourier/resources/bulk.rb +17 -3
- data/lib/trycourier/version.rb +1 -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/send_message_params.rbi +16 -1
- data/rbi/trycourier/resources/bulk.rbi +22 -8
- 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/send_message_params.rbs +13 -3
- data/sig/trycourier/models.rbs +1 -1
- data/sig/trycourier/resources/bulk.rbs +1 -1
- metadata +2 -2
|
@@ -2,187 +2,131 @@
|
|
|
2
2
|
|
|
3
3
|
module Trycourier
|
|
4
4
|
module Models
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Variants =
|
|
5
|
+
class InboundBulkMessage < Trycourier::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
9
7
|
T.type_alias do
|
|
10
|
-
T.any(
|
|
11
|
-
Trycourier::InboundBulkMessage::InboundBulkTemplateMessage,
|
|
12
|
-
Trycourier::InboundBulkMessage::InboundBulkContentMessage
|
|
13
|
-
)
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
class InboundBulkTemplateMessage < Trycourier::Internal::Type::BaseModel
|
|
17
|
-
OrHash =
|
|
18
|
-
T.type_alias do
|
|
19
|
-
T.any(
|
|
20
|
-
Trycourier::InboundBulkMessage::InboundBulkTemplateMessage,
|
|
21
|
-
Trycourier::Internal::AnyHash
|
|
22
|
-
)
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
sig { returns(String) }
|
|
26
|
-
attr_accessor :template
|
|
27
|
-
|
|
28
|
-
sig { returns(T.nilable(String)) }
|
|
29
|
-
attr_accessor :brand
|
|
30
|
-
|
|
31
|
-
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
32
|
-
attr_accessor :data
|
|
33
|
-
|
|
34
|
-
sig { returns(T.nilable(String)) }
|
|
35
|
-
attr_accessor :event
|
|
36
|
-
|
|
37
|
-
sig { returns(T.nilable(T::Hash[Symbol, T::Hash[Symbol, T.anything]])) }
|
|
38
|
-
attr_accessor :locale
|
|
39
|
-
|
|
40
|
-
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
41
|
-
attr_accessor :override
|
|
42
|
-
|
|
43
|
-
sig do
|
|
44
|
-
params(
|
|
45
|
-
template: String,
|
|
46
|
-
brand: T.nilable(String),
|
|
47
|
-
data: T.nilable(T::Hash[Symbol, T.anything]),
|
|
48
|
-
event: T.nilable(String),
|
|
49
|
-
locale: T.nilable(T::Hash[Symbol, T::Hash[Symbol, T.anything]]),
|
|
50
|
-
override: T.nilable(T::Hash[Symbol, T.anything])
|
|
51
|
-
).returns(T.attached_class)
|
|
52
|
-
end
|
|
53
|
-
def self.new(
|
|
54
|
-
template:,
|
|
55
|
-
brand: nil,
|
|
56
|
-
data: nil,
|
|
57
|
-
event: nil,
|
|
58
|
-
locale: nil,
|
|
59
|
-
override: nil
|
|
60
|
-
)
|
|
8
|
+
T.any(Trycourier::InboundBulkMessage, Trycourier::Internal::AnyHash)
|
|
61
9
|
end
|
|
62
10
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
data: T.nilable(T::Hash[Symbol, T.anything]),
|
|
69
|
-
event: T.nilable(String),
|
|
70
|
-
locale: T.nilable(T::Hash[Symbol, T::Hash[Symbol, T.anything]]),
|
|
71
|
-
override: T.nilable(T::Hash[Symbol, T.anything])
|
|
72
|
-
}
|
|
73
|
-
)
|
|
74
|
-
end
|
|
75
|
-
def to_hash
|
|
76
|
-
end
|
|
77
|
-
end
|
|
11
|
+
# Event ID or Notification ID (required). Can be either a Notification ID (e.g.,
|
|
12
|
+
# "FRH3QXM9E34W4RKP7MRC8NZ1T8V8") or a custom Event ID (e.g., "welcome-email")
|
|
13
|
+
# mapped to a notification.
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :event
|
|
78
16
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
T.type_alias do
|
|
82
|
-
T.any(
|
|
83
|
-
Trycourier::InboundBulkMessage::InboundBulkContentMessage,
|
|
84
|
-
Trycourier::Internal::AnyHash
|
|
85
|
-
)
|
|
86
|
-
end
|
|
17
|
+
sig { returns(T.nilable(String)) }
|
|
18
|
+
attr_accessor :brand
|
|
87
19
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
20
|
+
# Elemental content (optional, for V2 format). When provided, this will be used
|
|
21
|
+
# instead of the notification associated with the `event` field.
|
|
22
|
+
sig do
|
|
23
|
+
returns(
|
|
24
|
+
T.nilable(
|
|
91
25
|
T.any(
|
|
92
26
|
Trycourier::ElementalContentSugar,
|
|
93
27
|
Trycourier::ElementalContent
|
|
94
28
|
)
|
|
95
29
|
)
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
sig { returns(T.nilable(String)) }
|
|
100
|
-
attr_accessor :brand
|
|
30
|
+
)
|
|
31
|
+
end
|
|
32
|
+
attr_accessor :content
|
|
101
33
|
|
|
102
|
-
|
|
103
|
-
|
|
34
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
35
|
+
attr_accessor :data
|
|
104
36
|
|
|
105
|
-
|
|
106
|
-
|
|
37
|
+
sig { returns(T.nilable(T::Hash[Symbol, T::Hash[Symbol, T.anything]])) }
|
|
38
|
+
attr_accessor :locale
|
|
107
39
|
|
|
108
|
-
|
|
109
|
-
|
|
40
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
41
|
+
attr_accessor :override
|
|
110
42
|
|
|
111
|
-
|
|
112
|
-
|
|
43
|
+
# Notification ID or template ID (optional, for V2 format). When provided, this
|
|
44
|
+
# will be used instead of the notification associated with the `event` field.
|
|
45
|
+
sig { returns(T.nilable(String)) }
|
|
46
|
+
attr_accessor :template
|
|
113
47
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
48
|
+
# Bulk message definition. Supports two formats:
|
|
49
|
+
#
|
|
50
|
+
# - V1 format: Requires `event` field (event ID or notification ID)
|
|
51
|
+
# - V2 format: Optionally use `template` (notification ID) or `content` (Elemental
|
|
52
|
+
# content) in addition to `event`
|
|
53
|
+
sig do
|
|
54
|
+
params(
|
|
55
|
+
event: String,
|
|
56
|
+
brand: T.nilable(String),
|
|
57
|
+
content:
|
|
58
|
+
T.nilable(
|
|
117
59
|
T.any(
|
|
118
60
|
Trycourier::ElementalContentSugar::OrHash,
|
|
119
61
|
Trycourier::ElementalContent::OrHash
|
|
120
|
-
)
|
|
62
|
+
)
|
|
63
|
+
),
|
|
64
|
+
data: T.nilable(T::Hash[Symbol, T.anything]),
|
|
65
|
+
locale: T.nilable(T::Hash[Symbol, T::Hash[Symbol, T.anything]]),
|
|
66
|
+
override: T.nilable(T::Hash[Symbol, T.anything]),
|
|
67
|
+
template: T.nilable(String)
|
|
68
|
+
).returns(T.attached_class)
|
|
69
|
+
end
|
|
70
|
+
def self.new(
|
|
71
|
+
# Event ID or Notification ID (required). Can be either a Notification ID (e.g.,
|
|
72
|
+
# "FRH3QXM9E34W4RKP7MRC8NZ1T8V8") or a custom Event ID (e.g., "welcome-email")
|
|
73
|
+
# mapped to a notification.
|
|
74
|
+
event:,
|
|
75
|
+
brand: nil,
|
|
76
|
+
# Elemental content (optional, for V2 format). When provided, this will be used
|
|
77
|
+
# instead of the notification associated with the `event` field.
|
|
78
|
+
content: nil,
|
|
79
|
+
data: nil,
|
|
80
|
+
locale: nil,
|
|
81
|
+
override: nil,
|
|
82
|
+
# Notification ID or template ID (optional, for V2 format). When provided, this
|
|
83
|
+
# will be used instead of the notification associated with the `event` field.
|
|
84
|
+
template: nil
|
|
85
|
+
)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
sig do
|
|
89
|
+
override.returns(
|
|
90
|
+
{
|
|
91
|
+
event: String,
|
|
121
92
|
brand: T.nilable(String),
|
|
93
|
+
content:
|
|
94
|
+
T.nilable(
|
|
95
|
+
T.any(
|
|
96
|
+
Trycourier::ElementalContentSugar,
|
|
97
|
+
Trycourier::ElementalContent
|
|
98
|
+
)
|
|
99
|
+
),
|
|
122
100
|
data: T.nilable(T::Hash[Symbol, T.anything]),
|
|
123
|
-
event: T.nilable(String),
|
|
124
101
|
locale: T.nilable(T::Hash[Symbol, T::Hash[Symbol, T.anything]]),
|
|
125
|
-
override: T.nilable(T::Hash[Symbol, T.anything])
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
def self.new(
|
|
129
|
-
# Syntactic sugar to provide a fast shorthand for Courier Elemental Blocks.
|
|
130
|
-
content:,
|
|
131
|
-
brand: nil,
|
|
132
|
-
data: nil,
|
|
133
|
-
event: nil,
|
|
134
|
-
locale: nil,
|
|
135
|
-
override: nil
|
|
102
|
+
override: T.nilable(T::Hash[Symbol, T.anything]),
|
|
103
|
+
template: T.nilable(String)
|
|
104
|
+
}
|
|
136
105
|
)
|
|
137
|
-
|
|
106
|
+
end
|
|
107
|
+
def to_hash
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Elemental content (optional, for V2 format). When provided, this will be used
|
|
111
|
+
# instead of the notification associated with the `event` field.
|
|
112
|
+
module Content
|
|
113
|
+
extend Trycourier::Internal::Type::Union
|
|
114
|
+
|
|
115
|
+
Variants =
|
|
116
|
+
T.type_alias do
|
|
117
|
+
T.any(
|
|
118
|
+
Trycourier::ElementalContentSugar,
|
|
119
|
+
Trycourier::ElementalContent
|
|
120
|
+
)
|
|
121
|
+
end
|
|
138
122
|
|
|
139
123
|
sig do
|
|
140
124
|
override.returns(
|
|
141
|
-
|
|
142
|
-
content:
|
|
143
|
-
T.any(
|
|
144
|
-
Trycourier::ElementalContentSugar,
|
|
145
|
-
Trycourier::ElementalContent
|
|
146
|
-
),
|
|
147
|
-
brand: T.nilable(String),
|
|
148
|
-
data: T.nilable(T::Hash[Symbol, T.anything]),
|
|
149
|
-
event: T.nilable(String),
|
|
150
|
-
locale: T.nilable(T::Hash[Symbol, T::Hash[Symbol, T.anything]]),
|
|
151
|
-
override: T.nilable(T::Hash[Symbol, T.anything])
|
|
152
|
-
}
|
|
125
|
+
T::Array[Trycourier::InboundBulkMessage::Content::Variants]
|
|
153
126
|
)
|
|
154
127
|
end
|
|
155
|
-
def
|
|
128
|
+
def self.variants
|
|
156
129
|
end
|
|
157
|
-
|
|
158
|
-
# Syntactic sugar to provide a fast shorthand for Courier Elemental Blocks.
|
|
159
|
-
module Content
|
|
160
|
-
extend Trycourier::Internal::Type::Union
|
|
161
|
-
|
|
162
|
-
Variants =
|
|
163
|
-
T.type_alias do
|
|
164
|
-
T.any(
|
|
165
|
-
Trycourier::ElementalContentSugar,
|
|
166
|
-
Trycourier::ElementalContent
|
|
167
|
-
)
|
|
168
|
-
end
|
|
169
|
-
|
|
170
|
-
sig do
|
|
171
|
-
override.returns(
|
|
172
|
-
T::Array[
|
|
173
|
-
Trycourier::InboundBulkMessage::InboundBulkContentMessage::Content::Variants
|
|
174
|
-
]
|
|
175
|
-
)
|
|
176
|
-
end
|
|
177
|
-
def self.variants
|
|
178
|
-
end
|
|
179
|
-
end
|
|
180
|
-
end
|
|
181
|
-
|
|
182
|
-
sig do
|
|
183
|
-
override.returns(T::Array[Trycourier::InboundBulkMessage::Variants])
|
|
184
|
-
end
|
|
185
|
-
def self.variants
|
|
186
130
|
end
|
|
187
131
|
end
|
|
188
132
|
end
|
|
@@ -11,6 +11,7 @@ module Trycourier
|
|
|
11
11
|
)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
# User-specific data that will be merged with message.data
|
|
14
15
|
sig { returns(T.nilable(T.anything)) }
|
|
15
16
|
attr_reader :data
|
|
16
17
|
|
|
@@ -27,15 +28,19 @@ module Trycourier
|
|
|
27
28
|
end
|
|
28
29
|
attr_writer :preferences
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
sig {
|
|
34
|
-
|
|
31
|
+
# User profile information. For email-based bulk jobs, `profile.email` is required
|
|
32
|
+
# for provider routing to determine if the message can be delivered. The email
|
|
33
|
+
# address should be provided here rather than in `to.email`.
|
|
34
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
|
|
35
|
+
attr_accessor :profile
|
|
35
36
|
|
|
37
|
+
# User ID (legacy field, use profile or to.user_id instead)
|
|
36
38
|
sig { returns(T.nilable(String)) }
|
|
37
39
|
attr_accessor :recipient
|
|
38
40
|
|
|
41
|
+
# Optional recipient information. Note: For email provider routing, use
|
|
42
|
+
# `profile.email` instead of `to.email`. The `to` field is primarily used for
|
|
43
|
+
# recipient identification and data merging.
|
|
39
44
|
sig { returns(T.nilable(Trycourier::UserRecipient)) }
|
|
40
45
|
attr_reader :to
|
|
41
46
|
|
|
@@ -46,16 +51,24 @@ module Trycourier
|
|
|
46
51
|
params(
|
|
47
52
|
data: T.anything,
|
|
48
53
|
preferences: T.nilable(Trycourier::RecipientPreferences::OrHash),
|
|
49
|
-
profile: T.anything,
|
|
54
|
+
profile: T.nilable(T::Hash[Symbol, T.anything]),
|
|
50
55
|
recipient: T.nilable(String),
|
|
51
56
|
to: T.nilable(Trycourier::UserRecipient::OrHash)
|
|
52
57
|
).returns(T.attached_class)
|
|
53
58
|
end
|
|
54
59
|
def self.new(
|
|
60
|
+
# User-specific data that will be merged with message.data
|
|
55
61
|
data: nil,
|
|
56
62
|
preferences: nil,
|
|
63
|
+
# User profile information. For email-based bulk jobs, `profile.email` is required
|
|
64
|
+
# for provider routing to determine if the message can be delivered. The email
|
|
65
|
+
# address should be provided here rather than in `to.email`.
|
|
57
66
|
profile: nil,
|
|
67
|
+
# User ID (legacy field, use profile or to.user_id instead)
|
|
58
68
|
recipient: nil,
|
|
69
|
+
# Optional recipient information. Note: For email provider routing, use
|
|
70
|
+
# `profile.email` instead of `to.email`. The `to` field is primarily used for
|
|
71
|
+
# recipient identification and data merging.
|
|
59
72
|
to: nil
|
|
60
73
|
)
|
|
61
74
|
end
|
|
@@ -65,7 +78,7 @@ module Trycourier
|
|
|
65
78
|
{
|
|
66
79
|
data: T.anything,
|
|
67
80
|
preferences: T.nilable(Trycourier::RecipientPreferences),
|
|
68
|
-
profile: T.anything,
|
|
81
|
+
profile: T.nilable(T::Hash[Symbol, T.anything]),
|
|
69
82
|
recipient: T.nilable(String),
|
|
70
83
|
to: T.nilable(Trycourier::UserRecipient)
|
|
71
84
|
}
|
|
@@ -609,6 +609,12 @@ module Trycourier
|
|
|
609
609
|
sig { returns(T.nilable(Integer)) }
|
|
610
610
|
attr_accessor :duration
|
|
611
611
|
|
|
612
|
+
# IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). Used when
|
|
613
|
+
# resolving opening hours expressions. Takes precedence over user profile timezone
|
|
614
|
+
# settings.
|
|
615
|
+
sig { returns(T.nilable(String)) }
|
|
616
|
+
attr_accessor :timezone
|
|
617
|
+
|
|
612
618
|
# ISO 8601 timestamp or opening_hours-like format.
|
|
613
619
|
sig { returns(T.nilable(String)) }
|
|
614
620
|
attr_accessor :until_
|
|
@@ -616,12 +622,17 @@ module Trycourier
|
|
|
616
622
|
sig do
|
|
617
623
|
params(
|
|
618
624
|
duration: T.nilable(Integer),
|
|
625
|
+
timezone: T.nilable(String),
|
|
619
626
|
until_: T.nilable(String)
|
|
620
627
|
).returns(T.attached_class)
|
|
621
628
|
end
|
|
622
629
|
def self.new(
|
|
623
630
|
# The duration of the delay in milliseconds.
|
|
624
631
|
duration: nil,
|
|
632
|
+
# IANA timezone identifier (e.g., "America/Los_Angeles", "UTC"). Used when
|
|
633
|
+
# resolving opening hours expressions. Takes precedence over user profile timezone
|
|
634
|
+
# settings.
|
|
635
|
+
timezone: nil,
|
|
625
636
|
# ISO 8601 timestamp or opening_hours-like format.
|
|
626
637
|
until_: nil
|
|
627
638
|
)
|
|
@@ -629,7 +640,11 @@ module Trycourier
|
|
|
629
640
|
|
|
630
641
|
sig do
|
|
631
642
|
override.returns(
|
|
632
|
-
{
|
|
643
|
+
{
|
|
644
|
+
duration: T.nilable(Integer),
|
|
645
|
+
timezone: T.nilable(String),
|
|
646
|
+
until_: T.nilable(String)
|
|
647
|
+
}
|
|
633
648
|
)
|
|
634
649
|
end
|
|
635
650
|
def to_hash
|
|
@@ -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
|
sig do
|
|
8
12
|
params(
|
|
9
13
|
job_id: String,
|
|
@@ -19,18 +23,28 @@ module Trycourier
|
|
|
19
23
|
)
|
|
20
24
|
end
|
|
21
25
|
|
|
22
|
-
#
|
|
26
|
+
# Creates a new bulk job for sending messages to multiple recipients.
|
|
27
|
+
#
|
|
28
|
+
# **Required**: `message.event` (event ID or notification ID)
|
|
29
|
+
#
|
|
30
|
+
# **Optional (V2 format)**: `message.template` (notification ID) or
|
|
31
|
+
# `message.content` (Elemental content) can be provided to override the
|
|
32
|
+
# notification associated with the event.
|
|
23
33
|
sig do
|
|
24
34
|
params(
|
|
25
|
-
message:
|
|
26
|
-
T.any(
|
|
27
|
-
Trycourier::InboundBulkMessage::InboundBulkTemplateMessage::OrHash,
|
|
28
|
-
Trycourier::InboundBulkMessage::InboundBulkContentMessage::OrHash
|
|
29
|
-
),
|
|
35
|
+
message: Trycourier::InboundBulkMessage::OrHash,
|
|
30
36
|
request_options: Trycourier::RequestOptions::OrHash
|
|
31
37
|
).returns(Trycourier::Models::BulkCreateJobResponse)
|
|
32
38
|
end
|
|
33
|
-
def create_job(
|
|
39
|
+
def create_job(
|
|
40
|
+
# Bulk message definition. Supports two formats:
|
|
41
|
+
#
|
|
42
|
+
# - V1 format: Requires `event` field (event ID or notification ID)
|
|
43
|
+
# - V2 format: Optionally use `template` (notification ID) or `content` (Elemental
|
|
44
|
+
# content) in addition to `event`
|
|
45
|
+
message:,
|
|
46
|
+
request_options: {}
|
|
47
|
+
)
|
|
34
48
|
end
|
|
35
49
|
|
|
36
50
|
# Get Bulk Job Users
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
module Trycourier
|
|
2
2
|
module Models
|
|
3
3
|
type bulk_create_job_params =
|
|
4
|
-
{ message: Trycourier::
|
|
4
|
+
{ message: Trycourier::InboundBulkMessage }
|
|
5
5
|
& Trycourier::Internal::Type::request_parameters
|
|
6
6
|
|
|
7
7
|
class BulkCreateJobParams < Trycourier::Internal::Type::BaseModel
|
|
8
8
|
extend Trycourier::Internal::Type::RequestParameters::Converter
|
|
9
9
|
include Trycourier::Internal::Type::RequestParameters
|
|
10
10
|
|
|
11
|
-
attr_accessor message: Trycourier::
|
|
11
|
+
attr_accessor message: Trycourier::InboundBulkMessage
|
|
12
12
|
|
|
13
13
|
def initialize: (
|
|
14
|
-
message: Trycourier::
|
|
14
|
+
message: Trycourier::InboundBulkMessage,
|
|
15
15
|
?request_options: Trycourier::request_opts
|
|
16
16
|
) -> void
|
|
17
17
|
|
|
18
18
|
def to_hash: -> {
|
|
19
|
-
message: Trycourier::
|
|
19
|
+
message: Trycourier::InboundBulkMessage,
|
|
20
20
|
request_options: Trycourier::RequestOptions
|
|
21
21
|
}
|
|
22
22
|
end
|
|
@@ -14,7 +14,7 @@ module Trycourier
|
|
|
14
14
|
|
|
15
15
|
type job =
|
|
16
16
|
{
|
|
17
|
-
definition: Trycourier::
|
|
17
|
+
definition: Trycourier::InboundBulkMessage,
|
|
18
18
|
enqueued: Integer,
|
|
19
19
|
failures: Integer,
|
|
20
20
|
received: Integer,
|
|
@@ -22,7 +22,7 @@ module Trycourier
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
class Job < Trycourier::Internal::Type::BaseModel
|
|
25
|
-
attr_accessor definition: Trycourier::
|
|
25
|
+
attr_accessor definition: Trycourier::InboundBulkMessage
|
|
26
26
|
|
|
27
27
|
attr_accessor enqueued: Integer
|
|
28
28
|
|
|
@@ -33,7 +33,7 @@ module Trycourier
|
|
|
33
33
|
attr_accessor status: Trycourier::Models::BulkRetrieveJobResponse::Job::status
|
|
34
34
|
|
|
35
35
|
def initialize: (
|
|
36
|
-
definition: Trycourier::
|
|
36
|
+
definition: Trycourier::InboundBulkMessage,
|
|
37
37
|
enqueued: Integer,
|
|
38
38
|
failures: Integer,
|
|
39
39
|
received: Integer,
|
|
@@ -41,7 +41,7 @@ module Trycourier
|
|
|
41
41
|
) -> void
|
|
42
42
|
|
|
43
43
|
def to_hash: -> {
|
|
44
|
-
definition: Trycourier::
|
|
44
|
+
definition: Trycourier::InboundBulkMessage,
|
|
45
45
|
enqueued: Integer,
|
|
46
46
|
failures: Integer,
|
|
47
47
|
received: Integer,
|
|
@@ -1,106 +1,59 @@
|
|
|
1
1
|
module Trycourier
|
|
2
2
|
module Models
|
|
3
3
|
type inbound_bulk_message =
|
|
4
|
-
|
|
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
|
-
data: ::Hash[Symbol, top]?,
|
|
57
|
-
event: String?,
|
|
58
|
-
locale: ::Hash[Symbol, ::Hash[Symbol, top]]?,
|
|
59
|
-
override: ::Hash[Symbol, top]?
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
class InboundBulkContentMessage < Trycourier::Internal::Type::BaseModel
|
|
63
|
-
attr_accessor content: Trycourier::Models::InboundBulkMessage::InboundBulkContentMessage::content
|
|
64
|
-
|
|
65
|
-
attr_accessor brand: String?
|
|
66
|
-
|
|
67
|
-
attr_accessor data: ::Hash[Symbol, top]?
|
|
68
|
-
|
|
69
|
-
attr_accessor event: String?
|
|
70
|
-
|
|
71
|
-
attr_accessor locale: ::Hash[Symbol, ::Hash[Symbol, top]]?
|
|
72
|
-
|
|
73
|
-
attr_accessor override: ::Hash[Symbol, top]?
|
|
74
|
-
|
|
75
|
-
def initialize: (
|
|
76
|
-
content: Trycourier::Models::InboundBulkMessage::InboundBulkContentMessage::content,
|
|
77
|
-
?brand: String?,
|
|
78
|
-
?data: ::Hash[Symbol, top]?,
|
|
79
|
-
?event: String?,
|
|
80
|
-
?locale: ::Hash[Symbol, ::Hash[Symbol, top]]?,
|
|
81
|
-
?override: ::Hash[Symbol, top]?
|
|
82
|
-
) -> void
|
|
83
|
-
|
|
84
|
-
def to_hash: -> {
|
|
85
|
-
content: Trycourier::Models::InboundBulkMessage::InboundBulkContentMessage::content,
|
|
86
|
-
brand: String?,
|
|
87
|
-
data: ::Hash[Symbol, top]?,
|
|
88
|
-
event: String?,
|
|
89
|
-
locale: ::Hash[Symbol, ::Hash[Symbol, top]]?,
|
|
90
|
-
override: ::Hash[Symbol, top]?
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
type content =
|
|
94
|
-
Trycourier::ElementalContentSugar | Trycourier::ElementalContent
|
|
95
|
-
|
|
96
|
-
module Content
|
|
97
|
-
extend Trycourier::Internal::Type::Union
|
|
98
|
-
|
|
99
|
-
def self?.variants: -> ::Array[Trycourier::Models::InboundBulkMessage::InboundBulkContentMessage::content]
|
|
100
|
-
end
|
|
4
|
+
{
|
|
5
|
+
event: String,
|
|
6
|
+
brand: String?,
|
|
7
|
+
content: Trycourier::Models::InboundBulkMessage::content?,
|
|
8
|
+
data: ::Hash[Symbol, top]?,
|
|
9
|
+
locale: ::Hash[Symbol, ::Hash[Symbol, top]]?,
|
|
10
|
+
override: ::Hash[Symbol, top]?,
|
|
11
|
+
template: String?
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
class InboundBulkMessage < Trycourier::Internal::Type::BaseModel
|
|
15
|
+
attr_accessor event: String
|
|
16
|
+
|
|
17
|
+
attr_accessor brand: String?
|
|
18
|
+
|
|
19
|
+
attr_accessor content: Trycourier::Models::InboundBulkMessage::content?
|
|
20
|
+
|
|
21
|
+
attr_accessor data: ::Hash[Symbol, top]?
|
|
22
|
+
|
|
23
|
+
attr_accessor locale: ::Hash[Symbol, ::Hash[Symbol, top]]?
|
|
24
|
+
|
|
25
|
+
attr_accessor override: ::Hash[Symbol, top]?
|
|
26
|
+
|
|
27
|
+
attr_accessor template: String?
|
|
28
|
+
|
|
29
|
+
def initialize: (
|
|
30
|
+
event: String,
|
|
31
|
+
?brand: String?,
|
|
32
|
+
?content: Trycourier::Models::InboundBulkMessage::content?,
|
|
33
|
+
?data: ::Hash[Symbol, top]?,
|
|
34
|
+
?locale: ::Hash[Symbol, ::Hash[Symbol, top]]?,
|
|
35
|
+
?override: ::Hash[Symbol, top]?,
|
|
36
|
+
?template: String?
|
|
37
|
+
) -> void
|
|
38
|
+
|
|
39
|
+
def to_hash: -> {
|
|
40
|
+
event: String,
|
|
41
|
+
brand: String?,
|
|
42
|
+
content: Trycourier::Models::InboundBulkMessage::content?,
|
|
43
|
+
data: ::Hash[Symbol, top]?,
|
|
44
|
+
locale: ::Hash[Symbol, ::Hash[Symbol, top]]?,
|
|
45
|
+
override: ::Hash[Symbol, top]?,
|
|
46
|
+
template: String?
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
type content =
|
|
50
|
+
Trycourier::ElementalContentSugar | Trycourier::ElementalContent
|
|
51
|
+
|
|
52
|
+
module Content
|
|
53
|
+
extend Trycourier::Internal::Type::Union
|
|
54
|
+
|
|
55
|
+
def self?.variants: -> ::Array[Trycourier::Models::InboundBulkMessage::content]
|
|
101
56
|
end
|
|
102
|
-
|
|
103
|
-
def self?.variants: -> ::Array[Trycourier::Models::inbound_bulk_message]
|
|
104
57
|
end
|
|
105
58
|
end
|
|
106
59
|
end
|