trycourier 4.26.0 → 4.26.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +16 -19
  4. data/lib/courier/client.rb +4 -0
  5. data/lib/courier/models/bulk_add_users_params.rb +26 -0
  6. data/lib/courier/models/bulk_create_job_params.rb +29 -0
  7. data/lib/courier/models/bulk_create_job_response.rb +16 -0
  8. data/lib/courier/models/bulk_list_users_params.rb +33 -0
  9. data/lib/courier/models/bulk_list_users_response.rb +49 -0
  10. data/lib/courier/models/bulk_retrieve_job_params.rb +20 -0
  11. data/lib/courier/models/bulk_retrieve_job_response.rb +76 -0
  12. data/lib/courier/models/bulk_run_job_params.rb +20 -0
  13. data/lib/courier/models/inbound_bulk_message.rb +91 -0
  14. data/lib/courier/models/inbound_bulk_message_user.rb +54 -0
  15. data/lib/courier/models.rb +14 -0
  16. data/lib/courier/resources/bulk.rb +141 -0
  17. data/lib/courier/resources/send.rb +2 -1
  18. data/lib/courier/version.rb +1 -1
  19. data/lib/courier.rb +11 -0
  20. data/rbi/courier/client.rbi +3 -0
  21. data/rbi/courier/models/bulk_add_users_params.rbi +43 -0
  22. data/rbi/courier/models/bulk_create_job_params.rbi +54 -0
  23. data/rbi/courier/models/bulk_create_job_response.rbi +26 -0
  24. data/rbi/courier/models/bulk_list_users_params.rbi +51 -0
  25. data/rbi/courier/models/bulk_list_users_response.rbi +125 -0
  26. data/rbi/courier/models/bulk_retrieve_job_params.rbi +35 -0
  27. data/rbi/courier/models/bulk_retrieve_job_response.rbi +157 -0
  28. data/rbi/courier/models/bulk_run_job_params.rbi +35 -0
  29. data/rbi/courier/models/inbound_bulk_message.rbi +124 -0
  30. data/rbi/courier/models/inbound_bulk_message_user.rbi +88 -0
  31. data/rbi/courier/models.rbi +14 -0
  32. data/rbi/courier/resources/bulk.rbi +102 -0
  33. data/rbi/courier/resources/send.rbi +2 -1
  34. data/sig/courier/client.rbs +2 -0
  35. data/sig/courier/models/bulk_add_users_params.rbs +28 -0
  36. data/sig/courier/models/bulk_create_job_params.rbs +24 -0
  37. data/sig/courier/models/bulk_create_job_response.rbs +13 -0
  38. data/sig/courier/models/bulk_list_users_params.rbs +28 -0
  39. data/sig/courier/models/bulk_list_users_response.rbs +65 -0
  40. data/sig/courier/models/bulk_retrieve_job_params.rbs +23 -0
  41. data/sig/courier/models/bulk_retrieve_job_response.rbs +66 -0
  42. data/sig/courier/models/bulk_run_job_params.rbs +23 -0
  43. data/sig/courier/models/inbound_bulk_message.rbs +58 -0
  44. data/sig/courier/models/inbound_bulk_message_user.rbs +42 -0
  45. data/sig/courier/models.rbs +14 -0
  46. data/sig/courier/resources/bulk.rbs +34 -0
  47. metadata +35 -2
@@ -0,0 +1,35 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ class BulkRunJobParams < Courier::Internal::Type::BaseModel
6
+ extend Courier::Internal::Type::RequestParameters::Converter
7
+ include Courier::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(Courier::BulkRunJobParams, Courier::Internal::AnyHash)
12
+ end
13
+
14
+ sig { returns(String) }
15
+ attr_accessor :job_id
16
+
17
+ sig do
18
+ params(
19
+ job_id: String,
20
+ request_options: Courier::RequestOptions::OrHash
21
+ ).returns(T.attached_class)
22
+ end
23
+ def self.new(job_id:, request_options: {})
24
+ end
25
+
26
+ sig do
27
+ override.returns(
28
+ { job_id: String, request_options: Courier::RequestOptions }
29
+ )
30
+ end
31
+ def to_hash
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,124 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ class InboundBulkMessage < Courier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Courier::InboundBulkMessage, Courier::Internal::AnyHash)
9
+ end
10
+
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
16
+
17
+ sig { returns(T.nilable(String)) }
18
+ attr_accessor :brand
19
+
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(
25
+ T.any(Courier::ElementalContentSugar, Courier::ElementalContent)
26
+ )
27
+ )
28
+ end
29
+ attr_accessor :content
30
+
31
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
32
+ attr_accessor :data
33
+
34
+ sig { returns(T.nilable(T::Hash[Symbol, T::Hash[Symbol, T.anything]])) }
35
+ attr_accessor :locale
36
+
37
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
38
+ attr_accessor :override
39
+
40
+ # Notification ID or template ID (optional, for V2 format). When provided, this
41
+ # will be used instead of the notification associated with the `event` field.
42
+ sig { returns(T.nilable(String)) }
43
+ attr_accessor :template
44
+
45
+ # Bulk message definition. Supports two formats:
46
+ #
47
+ # - V1 format: Requires `event` field (event ID or notification ID)
48
+ # - V2 format: Optionally use `template` (notification ID) or `content` (Elemental
49
+ # content) in addition to `event`
50
+ sig do
51
+ params(
52
+ event: String,
53
+ brand: T.nilable(String),
54
+ content:
55
+ T.nilable(
56
+ T.any(
57
+ Courier::ElementalContentSugar::OrHash,
58
+ Courier::ElementalContent::OrHash
59
+ )
60
+ ),
61
+ data: T.nilable(T::Hash[Symbol, T.anything]),
62
+ locale: T.nilable(T::Hash[Symbol, T::Hash[Symbol, T.anything]]),
63
+ override: T.nilable(T::Hash[Symbol, T.anything]),
64
+ template: T.nilable(String)
65
+ ).returns(T.attached_class)
66
+ end
67
+ def self.new(
68
+ # Event ID or Notification ID (required). Can be either a Notification ID (e.g.,
69
+ # "FRH3QXM9E34W4RKP7MRC8NZ1T8V8") or a custom Event ID (e.g., "welcome-email")
70
+ # mapped to a notification.
71
+ event:,
72
+ brand: nil,
73
+ # Elemental content (optional, for V2 format). When provided, this will be used
74
+ # instead of the notification associated with the `event` field.
75
+ content: nil,
76
+ data: nil,
77
+ locale: nil,
78
+ override: nil,
79
+ # Notification ID or template ID (optional, for V2 format). When provided, this
80
+ # will be used instead of the notification associated with the `event` field.
81
+ template: nil
82
+ )
83
+ end
84
+
85
+ sig do
86
+ override.returns(
87
+ {
88
+ event: String,
89
+ brand: T.nilable(String),
90
+ content:
91
+ T.nilable(
92
+ T.any(Courier::ElementalContentSugar, Courier::ElementalContent)
93
+ ),
94
+ data: T.nilable(T::Hash[Symbol, T.anything]),
95
+ locale: T.nilable(T::Hash[Symbol, T::Hash[Symbol, T.anything]]),
96
+ override: T.nilable(T::Hash[Symbol, T.anything]),
97
+ template: T.nilable(String)
98
+ }
99
+ )
100
+ end
101
+ def to_hash
102
+ end
103
+
104
+ # Elemental content (optional, for V2 format). When provided, this will be used
105
+ # instead of the notification associated with the `event` field.
106
+ module Content
107
+ extend Courier::Internal::Type::Union
108
+
109
+ Variants =
110
+ T.type_alias do
111
+ T.any(Courier::ElementalContentSugar, Courier::ElementalContent)
112
+ end
113
+
114
+ sig do
115
+ override.returns(
116
+ T::Array[Courier::InboundBulkMessage::Content::Variants]
117
+ )
118
+ end
119
+ def self.variants
120
+ end
121
+ end
122
+ end
123
+ end
124
+ end
@@ -0,0 +1,88 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Models
5
+ class InboundBulkMessageUser < Courier::Internal::Type::BaseModel
6
+ OrHash =
7
+ T.type_alias do
8
+ T.any(Courier::InboundBulkMessageUser, Courier::Internal::AnyHash)
9
+ end
10
+
11
+ # User-specific data that will be merged with message.data
12
+ sig { returns(T.nilable(T.anything)) }
13
+ attr_reader :data
14
+
15
+ sig { params(data: T.anything).void }
16
+ attr_writer :data
17
+
18
+ sig { returns(T.nilable(Courier::RecipientPreferences)) }
19
+ attr_reader :preferences
20
+
21
+ sig do
22
+ params(
23
+ preferences: T.nilable(Courier::RecipientPreferences::OrHash)
24
+ ).void
25
+ end
26
+ attr_writer :preferences
27
+
28
+ # User profile information. For email-based bulk jobs, `profile.email` is required
29
+ # for provider routing to determine if the message can be delivered. The email
30
+ # address should be provided here rather than in `to.email`.
31
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
32
+ attr_accessor :profile
33
+
34
+ # User ID (legacy field, use profile or to.user_id instead)
35
+ sig { returns(T.nilable(String)) }
36
+ attr_accessor :recipient
37
+
38
+ # Optional recipient information. Note: For email provider routing, use
39
+ # `profile.email` instead of `to.email`. The `to` field is primarily used for
40
+ # recipient identification and data merging.
41
+ sig { returns(T.nilable(Courier::UserRecipient)) }
42
+ attr_reader :to
43
+
44
+ sig { params(to: T.nilable(Courier::UserRecipient::OrHash)).void }
45
+ attr_writer :to
46
+
47
+ sig do
48
+ params(
49
+ data: T.anything,
50
+ preferences: T.nilable(Courier::RecipientPreferences::OrHash),
51
+ profile: T.nilable(T::Hash[Symbol, T.anything]),
52
+ recipient: T.nilable(String),
53
+ to: T.nilable(Courier::UserRecipient::OrHash)
54
+ ).returns(T.attached_class)
55
+ end
56
+ def self.new(
57
+ # User-specific data that will be merged with message.data
58
+ data: nil,
59
+ preferences: nil,
60
+ # User profile information. For email-based bulk jobs, `profile.email` is required
61
+ # for provider routing to determine if the message can be delivered. The email
62
+ # address should be provided here rather than in `to.email`.
63
+ profile: nil,
64
+ # User ID (legacy field, use profile or to.user_id instead)
65
+ recipient: nil,
66
+ # Optional recipient information. Note: For email provider routing, use
67
+ # `profile.email` instead of `to.email`. The `to` field is primarily used for
68
+ # recipient identification and data merging.
69
+ to: nil
70
+ )
71
+ end
72
+
73
+ sig do
74
+ override.returns(
75
+ {
76
+ data: T.anything,
77
+ preferences: T.nilable(Courier::RecipientPreferences),
78
+ profile: T.nilable(T::Hash[Symbol, T.anything]),
79
+ recipient: T.nilable(String),
80
+ to: T.nilable(Courier::UserRecipient)
81
+ }
82
+ )
83
+ end
84
+ def to_hash
85
+ end
86
+ end
87
+ end
88
+ end
@@ -106,6 +106,16 @@ module Courier
106
106
 
107
107
  BroadcastUpdateParams = Courier::Models::BroadcastUpdateParams
108
108
 
109
+ BulkAddUsersParams = Courier::Models::BulkAddUsersParams
110
+
111
+ BulkCreateJobParams = Courier::Models::BulkCreateJobParams
112
+
113
+ BulkListUsersParams = Courier::Models::BulkListUsersParams
114
+
115
+ BulkRetrieveJobParams = Courier::Models::BulkRetrieveJobParams
116
+
117
+ BulkRunJobParams = Courier::Models::BulkRunJobParams
118
+
109
119
  CancelJourneyRequest = Courier::Models::CancelJourneyRequest
110
120
 
111
121
  CancelJourneyResponse = Courier::Models::CancelJourneyResponse
@@ -178,6 +188,10 @@ module Courier
178
188
 
179
189
  Icons = Courier::Models::Icons
180
190
 
191
+ InboundBulkMessage = Courier::Models::InboundBulkMessage
192
+
193
+ InboundBulkMessageUser = Courier::Models::InboundBulkMessageUser
194
+
181
195
  InboundTrackEventParams = Courier::Models::InboundTrackEventParams
182
196
 
183
197
  Intercom = Courier::Models::Intercom
@@ -0,0 +1,102 @@
1
+ # typed: strong
2
+
3
+ module Courier
4
+ module Resources
5
+ class Bulk
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.
11
+ sig do
12
+ params(
13
+ job_id: String,
14
+ users: T::Array[Courier::InboundBulkMessageUser::OrHash],
15
+ request_options: Courier::RequestOptions::OrHash
16
+ ).void
17
+ end
18
+ def add_users(
19
+ # A unique identifier representing the bulk job
20
+ job_id,
21
+ users:,
22
+ request_options: {}
23
+ )
24
+ end
25
+
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.
33
+ sig do
34
+ params(
35
+ message: Courier::InboundBulkMessage::OrHash,
36
+ request_options: Courier::RequestOptions::OrHash
37
+ ).returns(Courier::Models::BulkCreateJobResponse)
38
+ end
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
+ )
48
+ end
49
+
50
+ # Get Bulk Job Users
51
+ sig do
52
+ params(
53
+ job_id: String,
54
+ cursor: T.nilable(String),
55
+ request_options: Courier::RequestOptions::OrHash
56
+ ).returns(Courier::Models::BulkListUsersResponse)
57
+ end
58
+ def list_users(
59
+ # A unique identifier representing the bulk job
60
+ job_id,
61
+ # A unique identifier that allows for fetching the next set of users added to the
62
+ # bulk job
63
+ cursor: nil,
64
+ request_options: {}
65
+ )
66
+ end
67
+
68
+ # Get a bulk job
69
+ sig do
70
+ params(
71
+ job_id: String,
72
+ request_options: Courier::RequestOptions::OrHash
73
+ ).returns(Courier::Models::BulkRetrieveJobResponse)
74
+ end
75
+ def retrieve_job(
76
+ # A unique identifier representing the bulk job
77
+ job_id,
78
+ request_options: {}
79
+ )
80
+ end
81
+
82
+ # Run a bulk job
83
+ sig do
84
+ params(
85
+ job_id: String,
86
+ request_options: Courier::RequestOptions::OrHash
87
+ ).void
88
+ end
89
+ def run_job(
90
+ # A unique identifier representing the bulk job
91
+ job_id,
92
+ request_options: {}
93
+ )
94
+ end
95
+
96
+ # @api private
97
+ sig { params(client: Courier::Client).returns(T.attached_class) }
98
+ def self.new(client:)
99
+ end
100
+ end
101
+ end
102
+ end
@@ -6,7 +6,8 @@ module Courier
6
6
  # across every channel you have configured.
7
7
  class Send
8
8
  # Sends a message to one or more recipients and returns a requestId. Courier
9
- # routes it to email, SMS, push, chat, or in-app based on your rules.
9
+ # routes it to email, SMS, push, chat, or in-app based on your rules. Use the
10
+ # returned requestId to look up delivery status via the Messages API.
10
11
  sig do
11
12
  params(
12
13
  message: Courier::SendMessageParams::Message::OrHash,
@@ -26,6 +26,8 @@ module Courier
26
26
 
27
27
  attr_reader broadcasts: Courier::Resources::Broadcasts
28
28
 
29
+ attr_reader bulk: Courier::Resources::Bulk
30
+
29
31
  attr_reader brands: Courier::Resources::Brands
30
32
 
31
33
  attr_reader digests: Courier::Resources::Digests
@@ -0,0 +1,28 @@
1
+ module Courier
2
+ module Models
3
+ type bulk_add_users_params =
4
+ { job_id: String, users: ::Array[Courier::InboundBulkMessageUser] }
5
+ & Courier::Internal::Type::request_parameters
6
+
7
+ class BulkAddUsersParams < Courier::Internal::Type::BaseModel
8
+ extend Courier::Internal::Type::RequestParameters::Converter
9
+ include Courier::Internal::Type::RequestParameters
10
+
11
+ attr_accessor job_id: String
12
+
13
+ attr_accessor users: ::Array[Courier::InboundBulkMessageUser]
14
+
15
+ def initialize: (
16
+ job_id: String,
17
+ users: ::Array[Courier::InboundBulkMessageUser],
18
+ ?request_options: Courier::request_opts
19
+ ) -> void
20
+
21
+ def to_hash: -> {
22
+ job_id: String,
23
+ users: ::Array[Courier::InboundBulkMessageUser],
24
+ request_options: Courier::RequestOptions
25
+ }
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,24 @@
1
+ module Courier
2
+ module Models
3
+ type bulk_create_job_params =
4
+ { message: Courier::InboundBulkMessage }
5
+ & Courier::Internal::Type::request_parameters
6
+
7
+ class BulkCreateJobParams < Courier::Internal::Type::BaseModel
8
+ extend Courier::Internal::Type::RequestParameters::Converter
9
+ include Courier::Internal::Type::RequestParameters
10
+
11
+ attr_accessor message: Courier::InboundBulkMessage
12
+
13
+ def initialize: (
14
+ message: Courier::InboundBulkMessage,
15
+ ?request_options: Courier::request_opts
16
+ ) -> void
17
+
18
+ def to_hash: -> {
19
+ message: Courier::InboundBulkMessage,
20
+ request_options: Courier::RequestOptions
21
+ }
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,13 @@
1
+ module Courier
2
+ module Models
3
+ type bulk_create_job_response = { job_id: String }
4
+
5
+ class BulkCreateJobResponse < Courier::Internal::Type::BaseModel
6
+ attr_accessor job_id: String
7
+
8
+ def initialize: (job_id: String) -> void
9
+
10
+ def to_hash: -> { job_id: String }
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,28 @@
1
+ module Courier
2
+ module Models
3
+ type bulk_list_users_params =
4
+ { job_id: String, cursor: String? }
5
+ & Courier::Internal::Type::request_parameters
6
+
7
+ class BulkListUsersParams < Courier::Internal::Type::BaseModel
8
+ extend Courier::Internal::Type::RequestParameters::Converter
9
+ include Courier::Internal::Type::RequestParameters
10
+
11
+ attr_accessor job_id: String
12
+
13
+ attr_accessor cursor: String?
14
+
15
+ def initialize: (
16
+ job_id: String,
17
+ ?cursor: String?,
18
+ ?request_options: Courier::request_opts
19
+ ) -> void
20
+
21
+ def to_hash: -> {
22
+ job_id: String,
23
+ cursor: String?,
24
+ request_options: Courier::RequestOptions
25
+ }
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,65 @@
1
+ module Courier
2
+ module Models
3
+ type bulk_list_users_response =
4
+ {
5
+ items: ::Array[Courier::Models::BulkListUsersResponse::Item],
6
+ paging: Courier::Paging
7
+ }
8
+
9
+ class BulkListUsersResponse < Courier::Internal::Type::BaseModel
10
+ attr_accessor items: ::Array[Courier::Models::BulkListUsersResponse::Item]
11
+
12
+ attr_accessor paging: Courier::Paging
13
+
14
+ def initialize: (
15
+ items: ::Array[Courier::Models::BulkListUsersResponse::Item],
16
+ paging: Courier::Paging
17
+ ) -> void
18
+
19
+ def to_hash: -> {
20
+ items: ::Array[Courier::Models::BulkListUsersResponse::Item],
21
+ paging: Courier::Paging
22
+ }
23
+
24
+ type item =
25
+ {
26
+ status: Courier::Models::BulkListUsersResponse::Item::status,
27
+ message_id: String?
28
+ }
29
+
30
+ class Item < Courier::Models::InboundBulkMessageUser
31
+ def status: -> Courier::Models::BulkListUsersResponse::Item::status
32
+
33
+ def status=: (
34
+ Courier::Models::BulkListUsersResponse::Item::status _
35
+ ) -> Courier::Models::BulkListUsersResponse::Item::status
36
+
37
+ def message_id: -> String?
38
+
39
+ def message_id=: (String? _) -> String?
40
+
41
+ def initialize: (
42
+ status: Courier::Models::BulkListUsersResponse::Item::status,
43
+ ?message_id: String?
44
+ ) -> void
45
+
46
+ def to_hash: -> {
47
+ status: Courier::Models::BulkListUsersResponse::Item::status,
48
+ message_id: String?
49
+ }
50
+
51
+ type status = :PENDING | :ENQUEUED | :ERROR
52
+
53
+ module Status
54
+ extend Courier::Internal::Type::Enum
55
+
56
+ PENDING: :PENDING
57
+ ENQUEUED: :ENQUEUED
58
+ ERROR: :ERROR
59
+
60
+ def self?.values: -> ::Array[Courier::Models::BulkListUsersResponse::Item::status]
61
+ end
62
+ end
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,23 @@
1
+ module Courier
2
+ module Models
3
+ type bulk_retrieve_job_params =
4
+ { job_id: String } & Courier::Internal::Type::request_parameters
5
+
6
+ class BulkRetrieveJobParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ attr_accessor job_id: String
11
+
12
+ def initialize: (
13
+ job_id: String,
14
+ ?request_options: Courier::request_opts
15
+ ) -> void
16
+
17
+ def to_hash: -> {
18
+ job_id: String,
19
+ request_options: Courier::RequestOptions
20
+ }
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,66 @@
1
+ module Courier
2
+ module Models
3
+ type bulk_retrieve_job_response =
4
+ { job: Courier::Models::BulkRetrieveJobResponse::Job }
5
+
6
+ class BulkRetrieveJobResponse < Courier::Internal::Type::BaseModel
7
+ attr_accessor job: Courier::Models::BulkRetrieveJobResponse::Job
8
+
9
+ def initialize: (
10
+ job: Courier::Models::BulkRetrieveJobResponse::Job
11
+ ) -> void
12
+
13
+ def to_hash: -> { job: Courier::Models::BulkRetrieveJobResponse::Job }
14
+
15
+ type job =
16
+ {
17
+ definition: Courier::InboundBulkMessage,
18
+ enqueued: Integer,
19
+ failures: Integer,
20
+ received: Integer,
21
+ status: Courier::Models::BulkRetrieveJobResponse::Job::status
22
+ }
23
+
24
+ class Job < Courier::Internal::Type::BaseModel
25
+ attr_accessor definition: Courier::InboundBulkMessage
26
+
27
+ attr_accessor enqueued: Integer
28
+
29
+ attr_accessor failures: Integer
30
+
31
+ attr_accessor received: Integer
32
+
33
+ attr_accessor status: Courier::Models::BulkRetrieveJobResponse::Job::status
34
+
35
+ def initialize: (
36
+ definition: Courier::InboundBulkMessage,
37
+ enqueued: Integer,
38
+ failures: Integer,
39
+ received: Integer,
40
+ status: Courier::Models::BulkRetrieveJobResponse::Job::status
41
+ ) -> void
42
+
43
+ def to_hash: -> {
44
+ definition: Courier::InboundBulkMessage,
45
+ enqueued: Integer,
46
+ failures: Integer,
47
+ received: Integer,
48
+ status: Courier::Models::BulkRetrieveJobResponse::Job::status
49
+ }
50
+
51
+ type status = :CREATED | :PROCESSING | :COMPLETED | :ERROR
52
+
53
+ module Status
54
+ extend Courier::Internal::Type::Enum
55
+
56
+ CREATED: :CREATED
57
+ PROCESSING: :PROCESSING
58
+ COMPLETED: :COMPLETED
59
+ ERROR: :ERROR
60
+
61
+ def self?.values: -> ::Array[Courier::Models::BulkRetrieveJobResponse::Job::status]
62
+ end
63
+ end
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,23 @@
1
+ module Courier
2
+ module Models
3
+ type bulk_run_job_params =
4
+ { job_id: String } & Courier::Internal::Type::request_parameters
5
+
6
+ class BulkRunJobParams < Courier::Internal::Type::BaseModel
7
+ extend Courier::Internal::Type::RequestParameters::Converter
8
+ include Courier::Internal::Type::RequestParameters
9
+
10
+ attr_accessor job_id: String
11
+
12
+ def initialize: (
13
+ job_id: String,
14
+ ?request_options: Courier::request_opts
15
+ ) -> void
16
+
17
+ def to_hash: -> {
18
+ job_id: String,
19
+ request_options: Courier::RequestOptions
20
+ }
21
+ end
22
+ end
23
+ end