surge_api 0.8.0 → 0.9.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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +23 -0
  3. data/README.md +29 -1
  4. data/lib/surge_api/internal/cursor.rb +112 -0
  5. data/lib/surge_api/internal/transport/pooled_net_requester.rb +1 -1
  6. data/lib/surge_api/models/blast.rb +2 -2
  7. data/lib/surge_api/models/blast_create_params.rb +4 -4
  8. data/lib/surge_api/models/contact_list_params.rb +34 -0
  9. data/lib/surge_api/models/message.rb +2 -2
  10. data/lib/surge_api/models/message_delivered_webhook_event.rb +3 -3
  11. data/lib/surge_api/models/message_failed_webhook_event.rb +3 -3
  12. data/lib/surge_api/models/message_list_params.rb +34 -0
  13. data/lib/surge_api/models/message_received_webhook_event.rb +3 -3
  14. data/lib/surge_api/models/message_sent_webhook_event.rb +3 -3
  15. data/lib/surge_api/models/phone_number.rb +1 -1
  16. data/lib/surge_api/models/phone_number_list_params.rb +34 -0
  17. data/lib/surge_api/models.rb +6 -0
  18. data/lib/surge_api/resources/blasts.rb +1 -1
  19. data/lib/surge_api/resources/contacts.rb +30 -0
  20. data/lib/surge_api/resources/messages.rb +30 -0
  21. data/lib/surge_api/resources/phone_numbers.rb +30 -0
  22. data/lib/surge_api/version.rb +1 -1
  23. data/lib/surge_api.rb +4 -0
  24. data/rbi/surge_api/internal/cursor.rbi +52 -0
  25. data/rbi/surge_api/models/blast.rbi +3 -6
  26. data/rbi/surge_api/models/blast_create_params.rbi +3 -6
  27. data/rbi/surge_api/models/contact_list_params.rbi +59 -0
  28. data/rbi/surge_api/models/message.rbi +3 -6
  29. data/rbi/surge_api/models/message_delivered_webhook_event.rbi +3 -3
  30. data/rbi/surge_api/models/message_failed_webhook_event.rbi +3 -3
  31. data/rbi/surge_api/models/message_list_params.rbi +59 -0
  32. data/rbi/surge_api/models/message_received_webhook_event.rbi +3 -3
  33. data/rbi/surge_api/models/message_sent_webhook_event.rbi +3 -3
  34. data/rbi/surge_api/models/phone_number_list_params.rbi +59 -0
  35. data/rbi/surge_api/models.rbi +6 -0
  36. data/rbi/surge_api/resources/blasts.rbi +1 -1
  37. data/rbi/surge_api/resources/contacts.rbi +21 -0
  38. data/rbi/surge_api/resources/messages.rbi +21 -0
  39. data/rbi/surge_api/resources/phone_numbers.rbi +21 -0
  40. data/sig/surge_api/internal/cursor.rbs +28 -0
  41. data/sig/surge_api/models/blast.rbs +4 -6
  42. data/sig/surge_api/models/blast_create_params.rbs +4 -6
  43. data/sig/surge_api/models/contact_list_params.rbs +32 -0
  44. data/sig/surge_api/models/message.rbs +4 -6
  45. data/sig/surge_api/models/message_delivered_webhook_event.rbs +4 -4
  46. data/sig/surge_api/models/message_failed_webhook_event.rbs +4 -4
  47. data/sig/surge_api/models/message_list_params.rbs +32 -0
  48. data/sig/surge_api/models/message_received_webhook_event.rbs +4 -4
  49. data/sig/surge_api/models/message_sent_webhook_event.rbs +4 -4
  50. data/sig/surge_api/models/phone_number_list_params.rbs +32 -0
  51. data/sig/surge_api/models.rbs +6 -0
  52. data/sig/surge_api/resources/blasts.rbs +1 -1
  53. data/sig/surge_api/resources/contacts.rbs +7 -0
  54. data/sig/surge_api/resources/messages.rbs +7 -0
  55. data/sig/surge_api/resources/phone_numbers.rbs +7 -0
  56. metadata +14 -2
@@ -0,0 +1,52 @@
1
+ # typed: strong
2
+
3
+ module SurgeAPI
4
+ module Internal
5
+ class Cursor
6
+ include SurgeAPI::Internal::Type::BasePage
7
+
8
+ Elem = type_member
9
+
10
+ sig { returns(T.nilable(T::Array[Elem])) }
11
+ attr_accessor :data
12
+
13
+ sig { returns(Pagination) }
14
+ attr_accessor :pagination
15
+
16
+ # @api private
17
+ sig { returns(String) }
18
+ def inspect
19
+ end
20
+
21
+ class Pagination < SurgeAPI::Internal::Type::BaseModel
22
+ OrHash = T.type_alias { T.any(Pagination, SurgeAPI::Internal::AnyHash) }
23
+
24
+ sig { returns(T.nilable(String)) }
25
+ attr_reader :next_cursor
26
+
27
+ sig { params(next_cursor: String).void }
28
+ attr_writer :next_cursor
29
+
30
+ sig { returns(T.nilable(String)) }
31
+ attr_reader :previous_cursor
32
+
33
+ sig { params(previous_cursor: String).void }
34
+ attr_writer :previous_cursor
35
+
36
+ sig do
37
+ params(next_cursor: String, previous_cursor: String).returns(
38
+ T.attached_class
39
+ )
40
+ end
41
+ def self.new(next_cursor: nil, previous_cursor: nil)
42
+ end
43
+
44
+ sig do
45
+ override.returns({ next_cursor: String, previous_cursor: String })
46
+ end
47
+ def to_hash
48
+ end
49
+ end
50
+ end
51
+ end
52
+ end
@@ -23,10 +23,7 @@ module SurgeAPI
23
23
 
24
24
  # The message body.
25
25
  sig { returns(T.nilable(String)) }
26
- attr_reader :body
27
-
28
- sig { params(body: String).void }
29
- attr_writer :body
26
+ attr_accessor :body
30
27
 
31
28
  # Optional name for the blast.
32
29
  sig { returns(T.nilable(String)) }
@@ -47,7 +44,7 @@ module SurgeAPI
47
44
  params(
48
45
  id: String,
49
46
  attachments: T::Array[SurgeAPI::Blast::Attachment::OrHash],
50
- body: String,
47
+ body: T.nilable(String),
51
48
  name: String,
52
49
  send_at: Time
53
50
  ).returns(T.attached_class)
@@ -70,7 +67,7 @@ module SurgeAPI
70
67
  {
71
68
  id: String,
72
69
  attachments: T::Array[SurgeAPI::Blast::Attachment],
73
- body: String,
70
+ body: T.nilable(String),
74
71
  name: String,
75
72
  send_at: Time
76
73
  }
@@ -25,10 +25,7 @@ module SurgeAPI
25
25
 
26
26
  # The message body.
27
27
  sig { returns(T.nilable(String)) }
28
- attr_reader :body
29
-
30
- sig { params(body: String).void }
31
- attr_writer :body
28
+ attr_accessor :body
32
29
 
33
30
  # Deprecated. Use `to` instead.
34
31
  sig { returns(T.nilable(T::Array[String])) }
@@ -79,7 +76,7 @@ module SurgeAPI
79
76
  params(
80
77
  attachments:
81
78
  T::Array[SurgeAPI::BlastCreateParams::Attachment::OrHash],
82
- body: String,
79
+ body: T.nilable(String),
83
80
  contacts: T::Array[String],
84
81
  from: String,
85
82
  name: String,
@@ -116,7 +113,7 @@ module SurgeAPI
116
113
  override.returns(
117
114
  {
118
115
  attachments: T::Array[SurgeAPI::BlastCreateParams::Attachment],
119
- body: String,
116
+ body: T.nilable(String),
120
117
  contacts: T::Array[String],
121
118
  from: String,
122
119
  name: String,
@@ -0,0 +1,59 @@
1
+ # typed: strong
2
+
3
+ module SurgeAPI
4
+ module Models
5
+ class ContactListParams < SurgeAPI::Internal::Type::BaseModel
6
+ extend SurgeAPI::Internal::Type::RequestParameters::Converter
7
+ include SurgeAPI::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(SurgeAPI::ContactListParams, SurgeAPI::Internal::AnyHash)
12
+ end
13
+
14
+ # Cursor for forward pagination. Use the next_cursor from a previous response.
15
+ sig { returns(T.nilable(String)) }
16
+ attr_reader :after
17
+
18
+ sig { params(after: String).void }
19
+ attr_writer :after
20
+
21
+ # Cursor for backward pagination. Use the previous_cursor from a previous
22
+ # response.
23
+ sig { returns(T.nilable(String)) }
24
+ attr_reader :before
25
+
26
+ sig { params(before: String).void }
27
+ attr_writer :before
28
+
29
+ sig do
30
+ params(
31
+ after: String,
32
+ before: String,
33
+ request_options: SurgeAPI::RequestOptions::OrHash
34
+ ).returns(T.attached_class)
35
+ end
36
+ def self.new(
37
+ # Cursor for forward pagination. Use the next_cursor from a previous response.
38
+ after: nil,
39
+ # Cursor for backward pagination. Use the previous_cursor from a previous
40
+ # response.
41
+ before: nil,
42
+ request_options: {}
43
+ )
44
+ end
45
+
46
+ sig do
47
+ override.returns(
48
+ {
49
+ after: String,
50
+ before: String,
51
+ request_options: SurgeAPI::RequestOptions
52
+ }
53
+ )
54
+ end
55
+ def to_hash
56
+ end
57
+ end
58
+ end
59
+ end
@@ -33,10 +33,7 @@ module SurgeAPI
33
33
 
34
34
  # The message body.
35
35
  sig { returns(T.nilable(String)) }
36
- attr_reader :body
37
-
38
- sig { params(body: String).void }
39
- attr_writer :body
36
+ attr_accessor :body
40
37
 
41
38
  # A conversation with a Contact
42
39
  sig { returns(T.nilable(SurgeAPI::Message::Conversation)) }
@@ -58,7 +55,7 @@ module SurgeAPI
58
55
  id: String,
59
56
  attachments: T::Array[SurgeAPI::Message::Attachment::OrHash],
60
57
  blast_id: String,
61
- body: String,
58
+ body: T.nilable(String),
62
59
  conversation: SurgeAPI::Message::Conversation::OrHash,
63
60
  metadata: T::Hash[Symbol, String]
64
61
  ).returns(T.attached_class)
@@ -85,7 +82,7 @@ module SurgeAPI
85
82
  id: String,
86
83
  attachments: T::Array[SurgeAPI::Message::Attachment],
87
84
  blast_id: String,
88
- body: String,
85
+ body: T.nilable(String),
89
86
  conversation: SurgeAPI::Message::Conversation,
90
87
  metadata: T::Hash[Symbol, String]
91
88
  }
@@ -79,7 +79,7 @@ module SurgeAPI
79
79
  attr_accessor :id
80
80
 
81
81
  # The content of the message
82
- sig { returns(String) }
82
+ sig { returns(T.nilable(String)) }
83
83
  attr_accessor :body
84
84
 
85
85
  # The conversation this message belongs to
@@ -132,7 +132,7 @@ module SurgeAPI
132
132
  sig do
133
133
  params(
134
134
  id: String,
135
- body: String,
135
+ body: T.nilable(String),
136
136
  conversation:
137
137
  SurgeAPI::MessageDeliveredWebhookEvent::Data::Conversation::OrHash,
138
138
  delivered_at: Time,
@@ -164,7 +164,7 @@ module SurgeAPI
164
164
  override.returns(
165
165
  {
166
166
  id: String,
167
- body: String,
167
+ body: T.nilable(String),
168
168
  conversation:
169
169
  SurgeAPI::MessageDeliveredWebhookEvent::Data::Conversation,
170
170
  delivered_at: Time,
@@ -79,7 +79,7 @@ module SurgeAPI
79
79
  attr_accessor :id
80
80
 
81
81
  # The content of the message
82
- sig { returns(String) }
82
+ sig { returns(T.nilable(String)) }
83
83
  attr_accessor :body
84
84
 
85
85
  # The conversation this message belongs to
@@ -134,7 +134,7 @@ module SurgeAPI
134
134
  sig do
135
135
  params(
136
136
  id: String,
137
- body: String,
137
+ body: T.nilable(String),
138
138
  conversation:
139
139
  SurgeAPI::MessageFailedWebhookEvent::Data::Conversation::OrHash,
140
140
  failed_at: Time,
@@ -169,7 +169,7 @@ module SurgeAPI
169
169
  override.returns(
170
170
  {
171
171
  id: String,
172
- body: String,
172
+ body: T.nilable(String),
173
173
  conversation:
174
174
  SurgeAPI::MessageFailedWebhookEvent::Data::Conversation,
175
175
  failed_at: Time,
@@ -0,0 +1,59 @@
1
+ # typed: strong
2
+
3
+ module SurgeAPI
4
+ module Models
5
+ class MessageListParams < SurgeAPI::Internal::Type::BaseModel
6
+ extend SurgeAPI::Internal::Type::RequestParameters::Converter
7
+ include SurgeAPI::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(SurgeAPI::MessageListParams, SurgeAPI::Internal::AnyHash)
12
+ end
13
+
14
+ # Cursor for forward pagination. Use the next_cursor from a previous response.
15
+ sig { returns(T.nilable(String)) }
16
+ attr_reader :after
17
+
18
+ sig { params(after: String).void }
19
+ attr_writer :after
20
+
21
+ # Cursor for backward pagination. Use the previous_cursor from a previous
22
+ # response.
23
+ sig { returns(T.nilable(String)) }
24
+ attr_reader :before
25
+
26
+ sig { params(before: String).void }
27
+ attr_writer :before
28
+
29
+ sig do
30
+ params(
31
+ after: String,
32
+ before: String,
33
+ request_options: SurgeAPI::RequestOptions::OrHash
34
+ ).returns(T.attached_class)
35
+ end
36
+ def self.new(
37
+ # Cursor for forward pagination. Use the next_cursor from a previous response.
38
+ after: nil,
39
+ # Cursor for backward pagination. Use the previous_cursor from a previous
40
+ # response.
41
+ before: nil,
42
+ request_options: {}
43
+ )
44
+ end
45
+
46
+ sig do
47
+ override.returns(
48
+ {
49
+ after: String,
50
+ before: String,
51
+ request_options: SurgeAPI::RequestOptions
52
+ }
53
+ )
54
+ end
55
+ def to_hash
56
+ end
57
+ end
58
+ end
59
+ end
@@ -79,7 +79,7 @@ module SurgeAPI
79
79
  attr_accessor :id
80
80
 
81
81
  # The content of the message
82
- sig { returns(String) }
82
+ sig { returns(T.nilable(String)) }
83
83
  attr_accessor :body
84
84
 
85
85
  # The conversation this message belongs to
@@ -132,7 +132,7 @@ module SurgeAPI
132
132
  sig do
133
133
  params(
134
134
  id: String,
135
- body: String,
135
+ body: T.nilable(String),
136
136
  conversation:
137
137
  SurgeAPI::MessageReceivedWebhookEvent::Data::Conversation::OrHash,
138
138
  received_at: Time,
@@ -164,7 +164,7 @@ module SurgeAPI
164
164
  override.returns(
165
165
  {
166
166
  id: String,
167
- body: String,
167
+ body: T.nilable(String),
168
168
  conversation:
169
169
  SurgeAPI::MessageReceivedWebhookEvent::Data::Conversation,
170
170
  received_at: Time,
@@ -74,7 +74,7 @@ module SurgeAPI
74
74
  attr_accessor :id
75
75
 
76
76
  # The content of the message
77
- sig { returns(String) }
77
+ sig { returns(T.nilable(String)) }
78
78
  attr_accessor :body
79
79
 
80
80
  # The conversation this message belongs to
@@ -125,7 +125,7 @@ module SurgeAPI
125
125
  sig do
126
126
  params(
127
127
  id: String,
128
- body: String,
128
+ body: T.nilable(String),
129
129
  conversation:
130
130
  SurgeAPI::MessageSentWebhookEvent::Data::Conversation::OrHash,
131
131
  sent_at: Time,
@@ -157,7 +157,7 @@ module SurgeAPI
157
157
  override.returns(
158
158
  {
159
159
  id: String,
160
- body: String,
160
+ body: T.nilable(String),
161
161
  conversation:
162
162
  SurgeAPI::MessageSentWebhookEvent::Data::Conversation,
163
163
  sent_at: Time,
@@ -0,0 +1,59 @@
1
+ # typed: strong
2
+
3
+ module SurgeAPI
4
+ module Models
5
+ class PhoneNumberListParams < SurgeAPI::Internal::Type::BaseModel
6
+ extend SurgeAPI::Internal::Type::RequestParameters::Converter
7
+ include SurgeAPI::Internal::Type::RequestParameters
8
+
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(SurgeAPI::PhoneNumberListParams, SurgeAPI::Internal::AnyHash)
12
+ end
13
+
14
+ # Cursor for forward pagination. Use the next_cursor from a previous response.
15
+ sig { returns(T.nilable(String)) }
16
+ attr_reader :after
17
+
18
+ sig { params(after: String).void }
19
+ attr_writer :after
20
+
21
+ # Cursor for backward pagination. Use the previous_cursor from a previous
22
+ # response.
23
+ sig { returns(T.nilable(String)) }
24
+ attr_reader :before
25
+
26
+ sig { params(before: String).void }
27
+ attr_writer :before
28
+
29
+ sig do
30
+ params(
31
+ after: String,
32
+ before: String,
33
+ request_options: SurgeAPI::RequestOptions::OrHash
34
+ ).returns(T.attached_class)
35
+ end
36
+ def self.new(
37
+ # Cursor for forward pagination. Use the next_cursor from a previous response.
38
+ after: nil,
39
+ # Cursor for backward pagination. Use the previous_cursor from a previous
40
+ # response.
41
+ before: nil,
42
+ request_options: {}
43
+ )
44
+ end
45
+
46
+ sig do
47
+ override.returns(
48
+ {
49
+ after: String,
50
+ before: String,
51
+ request_options: SurgeAPI::RequestOptions
52
+ }
53
+ )
54
+ end
55
+ def to_hash
56
+ end
57
+ end
58
+ end
59
+ end
@@ -31,6 +31,8 @@ module SurgeAPI
31
31
 
32
32
  ContactCreateParams = SurgeAPI::Models::ContactCreateParams
33
33
 
34
+ ContactListParams = SurgeAPI::Models::ContactListParams
35
+
34
36
  ContactOptedInWebhookEvent = SurgeAPI::Models::ContactOptedInWebhookEvent
35
37
 
36
38
  ContactOptedOutWebhookEvent = SurgeAPI::Models::ContactOptedOutWebhookEvent
@@ -54,6 +56,8 @@ module SurgeAPI
54
56
 
55
57
  MessageFailedWebhookEvent = SurgeAPI::Models::MessageFailedWebhookEvent
56
58
 
59
+ MessageListParams = SurgeAPI::Models::MessageListParams
60
+
57
61
  MessageParams = SurgeAPI::Models::MessageParams
58
62
 
59
63
  MessageReceivedWebhookEvent = SurgeAPI::Models::MessageReceivedWebhookEvent
@@ -66,6 +70,8 @@ module SurgeAPI
66
70
 
67
71
  PhoneNumber = SurgeAPI::Models::PhoneNumber
68
72
 
73
+ PhoneNumberListParams = SurgeAPI::Models::PhoneNumberListParams
74
+
69
75
  PhoneNumberPurchaseParams = SurgeAPI::Models::PhoneNumberPurchaseParams
70
76
 
71
77
  UnwrapWebhookEvent = SurgeAPI::Models::UnwrapWebhookEvent
@@ -9,7 +9,7 @@ module SurgeAPI
9
9
  account_id: String,
10
10
  attachments:
11
11
  T::Array[SurgeAPI::BlastCreateParams::Attachment::OrHash],
12
- body: String,
12
+ body: T.nilable(String),
13
13
  contacts: T::Array[String],
14
14
  from: String,
15
15
  name: String,
@@ -76,6 +76,27 @@ module SurgeAPI
76
76
  )
77
77
  end
78
78
 
79
+ # List all contacts for an account with cursor-based pagination.
80
+ sig do
81
+ params(
82
+ account_id: String,
83
+ after: String,
84
+ before: String,
85
+ request_options: SurgeAPI::RequestOptions::OrHash
86
+ ).returns(SurgeAPI::Internal::Cursor[SurgeAPI::Contact])
87
+ end
88
+ def list(
89
+ # The account ID to list contacts for.
90
+ account_id,
91
+ # Cursor for forward pagination. Use the next_cursor from a previous response.
92
+ after: nil,
93
+ # Cursor for backward pagination. Use the previous_cursor from a previous
94
+ # response.
95
+ before: nil,
96
+ request_options: {}
97
+ )
98
+ end
99
+
79
100
  # @api private
80
101
  sig { params(client: SurgeAPI::Client).returns(T.attached_class) }
81
102
  def self.new(client:)
@@ -60,6 +60,27 @@ module SurgeAPI
60
60
  )
61
61
  end
62
62
 
63
+ # List all messages for an account with cursor-based pagination.
64
+ sig do
65
+ params(
66
+ account_id: String,
67
+ after: String,
68
+ before: String,
69
+ request_options: SurgeAPI::RequestOptions::OrHash
70
+ ).returns(SurgeAPI::Internal::Cursor[SurgeAPI::Message])
71
+ end
72
+ def list(
73
+ # The account ID to list messages for.
74
+ account_id,
75
+ # Cursor for forward pagination. Use the next_cursor from a previous response.
76
+ after: nil,
77
+ # Cursor for backward pagination. Use the previous_cursor from a previous
78
+ # response.
79
+ before: nil,
80
+ request_options: {}
81
+ )
82
+ end
83
+
63
84
  # @api private
64
85
  sig { params(client: SurgeAPI::Client).returns(T.attached_class) }
65
86
  def self.new(client:)
@@ -3,6 +3,27 @@
3
3
  module SurgeAPI
4
4
  module Resources
5
5
  class PhoneNumbers
6
+ # List all phone numbers for an account with cursor-based pagination.
7
+ sig do
8
+ params(
9
+ account_id: String,
10
+ after: String,
11
+ before: String,
12
+ request_options: SurgeAPI::RequestOptions::OrHash
13
+ ).returns(SurgeAPI::Internal::Cursor[SurgeAPI::PhoneNumber])
14
+ end
15
+ def list(
16
+ # The account ID to list phone numbers for.
17
+ account_id,
18
+ # Cursor for forward pagination. Use the next_cursor from a previous response.
19
+ after: nil,
20
+ # Cursor for backward pagination. Use the previous_cursor from a previous
21
+ # response.
22
+ before: nil,
23
+ request_options: {}
24
+ )
25
+ end
26
+
6
27
  # Purchase a new phone number for the account. You can specify search criteria or
7
28
  # let the system select a random number.
8
29
  sig do
@@ -0,0 +1,28 @@
1
+ module SurgeAPI
2
+ module Internal
3
+ class Cursor[Elem]
4
+ include SurgeAPI::Internal::Type::BasePage[Elem]
5
+
6
+ attr_accessor data: ::Array[Elem]?
7
+
8
+ attr_accessor pagination: Pagination
9
+
10
+ def inspect: -> String
11
+
12
+ type pagination = { next_cursor: String, previous_cursor: String }
13
+ class Pagination < SurgeAPI::Internal::Type::BaseModel
14
+ attr_reader next_cursor: String?
15
+
16
+ def next_cursor=: (String) -> String
17
+
18
+ attr_reader previous_cursor: String?
19
+
20
+ def previous_cursor=: (String) -> String
21
+
22
+ def initialize: (?next_cursor: String, ?previous_cursor: String) -> void
23
+
24
+ def to_hash: -> { next_cursor: String, previous_cursor: String }
25
+ end
26
+ end
27
+ end
28
+ end
@@ -4,7 +4,7 @@ module SurgeAPI
4
4
  {
5
5
  id: String,
6
6
  attachments: ::Array[SurgeAPI::Blast::Attachment],
7
- body: String,
7
+ body: String?,
8
8
  name: String,
9
9
  send_at: Time
10
10
  }
@@ -20,9 +20,7 @@ module SurgeAPI
20
20
  ::Array[SurgeAPI::Blast::Attachment]
21
21
  ) -> ::Array[SurgeAPI::Blast::Attachment]
22
22
 
23
- attr_reader body: String?
24
-
25
- def body=: (String) -> String
23
+ attr_accessor body: String?
26
24
 
27
25
  attr_reader name: String?
28
26
 
@@ -35,7 +33,7 @@ module SurgeAPI
35
33
  def initialize: (
36
34
  ?id: String,
37
35
  ?attachments: ::Array[SurgeAPI::Blast::Attachment],
38
- ?body: String,
36
+ ?body: String?,
39
37
  ?name: String,
40
38
  ?send_at: Time
41
39
  ) -> void
@@ -43,7 +41,7 @@ module SurgeAPI
43
41
  def to_hash: -> {
44
42
  id: String,
45
43
  attachments: ::Array[SurgeAPI::Blast::Attachment],
46
- body: String,
44
+ body: String?,
47
45
  name: String,
48
46
  send_at: Time
49
47
  }
@@ -3,7 +3,7 @@ module SurgeAPI
3
3
  type blast_create_params =
4
4
  {
5
5
  attachments: ::Array[SurgeAPI::BlastCreateParams::Attachment],
6
- body: String,
6
+ body: String?,
7
7
  contacts: ::Array[String],
8
8
  from: String,
9
9
  name: String,
@@ -23,9 +23,7 @@ module SurgeAPI
23
23
  ::Array[SurgeAPI::BlastCreateParams::Attachment]
24
24
  ) -> ::Array[SurgeAPI::BlastCreateParams::Attachment]
25
25
 
26
- attr_reader body: String?
27
-
28
- def body=: (String) -> String
26
+ attr_accessor body: String?
29
27
 
30
28
  attr_reader contacts: ::Array[String]?
31
29
 
@@ -53,7 +51,7 @@ module SurgeAPI
53
51
 
54
52
  def initialize: (
55
53
  ?attachments: ::Array[SurgeAPI::BlastCreateParams::Attachment],
56
- ?body: String,
54
+ ?body: String?,
57
55
  ?contacts: ::Array[String],
58
56
  ?from: String,
59
57
  ?name: String,
@@ -65,7 +63,7 @@ module SurgeAPI
65
63
 
66
64
  def to_hash: -> {
67
65
  attachments: ::Array[SurgeAPI::BlastCreateParams::Attachment],
68
- body: String,
66
+ body: String?,
69
67
  contacts: ::Array[String],
70
68
  from: String,
71
69
  name: String,
@@ -0,0 +1,32 @@
1
+ module SurgeAPI
2
+ module Models
3
+ type contact_list_params =
4
+ { after: String, before: String }
5
+ & SurgeAPI::Internal::Type::request_parameters
6
+
7
+ class ContactListParams < SurgeAPI::Internal::Type::BaseModel
8
+ extend SurgeAPI::Internal::Type::RequestParameters::Converter
9
+ include SurgeAPI::Internal::Type::RequestParameters
10
+
11
+ attr_reader after: String?
12
+
13
+ def after=: (String) -> String
14
+
15
+ attr_reader before: String?
16
+
17
+ def before=: (String) -> String
18
+
19
+ def initialize: (
20
+ ?after: String,
21
+ ?before: String,
22
+ ?request_options: SurgeAPI::request_opts
23
+ ) -> void
24
+
25
+ def to_hash: -> {
26
+ after: String,
27
+ before: String,
28
+ request_options: SurgeAPI::RequestOptions
29
+ }
30
+ end
31
+ end
32
+ end