surge_api 0.8.0 → 0.10.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 +41 -0
- data/README.md +29 -1
- data/lib/surge_api/client.rb +4 -0
- data/lib/surge_api/internal/cursor.rb +112 -0
- data/lib/surge_api/internal/transport/pooled_net_requester.rb +1 -1
- data/lib/surge_api/internal/util.rb +1 -1
- data/lib/surge_api/models/blast.rb +2 -2
- data/lib/surge_api/models/blast_create_params.rb +4 -4
- data/lib/surge_api/models/campaign.rb +27 -1
- data/lib/surge_api/models/campaign_retrieve_params.rb +14 -0
- data/lib/surge_api/models/contact_list_params.rb +34 -0
- data/lib/surge_api/models/message.rb +4 -4
- data/lib/surge_api/models/message_delivered_webhook_event.rb +3 -3
- data/lib/surge_api/models/message_failed_webhook_event.rb +3 -3
- data/lib/surge_api/models/message_list_params.rb +34 -0
- data/lib/surge_api/models/message_received_webhook_event.rb +3 -3
- data/lib/surge_api/models/message_sent_webhook_event.rb +3 -3
- data/lib/surge_api/models/phone_number.rb +1 -1
- data/lib/surge_api/models/phone_number_list_params.rb +34 -0
- data/lib/surge_api/models/recording_completed_webhook_event.rb +136 -0
- data/lib/surge_api/models/recording_get_file_params.rb +14 -0
- data/lib/surge_api/models/recording_get_file_response.rb +19 -0
- data/lib/surge_api/models/unwrap_webhook_event.rb +5 -1
- data/lib/surge_api/models/voicemail_received_webhook_event.rb +144 -0
- data/lib/surge_api/models.rb +14 -0
- data/lib/surge_api/resources/blasts.rb +1 -1
- data/lib/surge_api/resources/campaigns.rb +20 -0
- data/lib/surge_api/resources/contacts.rb +30 -0
- data/lib/surge_api/resources/messages.rb +30 -0
- data/lib/surge_api/resources/phone_numbers.rb +30 -0
- data/lib/surge_api/resources/recordings.rb +35 -0
- data/lib/surge_api/resources/webhooks.rb +1 -1
- data/lib/surge_api/version.rb +1 -1
- data/lib/surge_api.rb +10 -0
- data/rbi/surge_api/client.rbi +3 -0
- data/rbi/surge_api/internal/cursor.rbi +52 -0
- data/rbi/surge_api/internal/util.rbi +1 -1
- data/rbi/surge_api/models/blast.rbi +3 -6
- data/rbi/surge_api/models/blast_create_params.rbi +3 -6
- data/rbi/surge_api/models/campaign.rbi +32 -0
- data/rbi/surge_api/models/campaign_retrieve_params.rbi +27 -0
- data/rbi/surge_api/models/contact_list_params.rbi +59 -0
- data/rbi/surge_api/models/message.rbi +6 -12
- data/rbi/surge_api/models/message_delivered_webhook_event.rbi +3 -3
- data/rbi/surge_api/models/message_failed_webhook_event.rbi +3 -3
- data/rbi/surge_api/models/message_list_params.rbi +59 -0
- data/rbi/surge_api/models/message_received_webhook_event.rbi +3 -3
- data/rbi/surge_api/models/message_sent_webhook_event.rbi +3 -3
- data/rbi/surge_api/models/phone_number_list_params.rbi +59 -0
- data/rbi/surge_api/models/recording_completed_webhook_event.rbi +277 -0
- data/rbi/surge_api/models/recording_get_file_params.rbi +27 -0
- data/rbi/surge_api/models/recording_get_file_response.rbi +34 -0
- data/rbi/surge_api/models/unwrap_webhook_event.rbi +3 -1
- data/rbi/surge_api/models/voicemail_received_webhook_event.rbi +283 -0
- data/rbi/surge_api/models.rbi +16 -0
- data/rbi/surge_api/resources/blasts.rbi +1 -1
- data/rbi/surge_api/resources/campaigns.rbi +14 -0
- data/rbi/surge_api/resources/contacts.rbi +21 -0
- data/rbi/surge_api/resources/messages.rbi +21 -0
- data/rbi/surge_api/resources/phone_numbers.rbi +21 -0
- data/rbi/surge_api/resources/recordings.rbi +27 -0
- data/rbi/surge_api/resources/webhooks.rbi +3 -1
- data/sig/surge_api/client.rbs +2 -0
- data/sig/surge_api/internal/cursor.rbs +28 -0
- data/sig/surge_api/models/blast.rbs +4 -6
- data/sig/surge_api/models/blast_create_params.rbs +4 -6
- data/sig/surge_api/models/campaign.rbs +28 -0
- data/sig/surge_api/models/campaign_retrieve_params.rbs +15 -0
- data/sig/surge_api/models/contact_list_params.rbs +32 -0
- data/sig/surge_api/models/message.rbs +8 -12
- data/sig/surge_api/models/message_delivered_webhook_event.rbs +4 -4
- data/sig/surge_api/models/message_failed_webhook_event.rbs +4 -4
- data/sig/surge_api/models/message_list_params.rbs +32 -0
- data/sig/surge_api/models/message_received_webhook_event.rbs +4 -4
- data/sig/surge_api/models/message_sent_webhook_event.rbs +4 -4
- data/sig/surge_api/models/phone_number_list_params.rbs +32 -0
- data/sig/surge_api/models/recording_completed_webhook_event.rbs +126 -0
- data/sig/surge_api/models/recording_get_file_params.rbs +15 -0
- data/sig/surge_api/models/recording_get_file_response.rbs +13 -0
- data/sig/surge_api/models/unwrap_webhook_event.rbs +2 -0
- data/sig/surge_api/models/voicemail_received_webhook_event.rbs +131 -0
- data/sig/surge_api/models.rbs +14 -0
- data/sig/surge_api/resources/blasts.rbs +1 -1
- data/sig/surge_api/resources/campaigns.rbs +5 -0
- data/sig/surge_api/resources/contacts.rbs +7 -0
- data/sig/surge_api/resources/messages.rbs +7 -0
- data/sig/surge_api/resources/phone_numbers.rbs +7 -0
- data/sig/surge_api/resources/recordings.rbs +12 -0
- data/sig/surge_api/resources/webhooks.rbs +3 -1
- metadata +32 -2
|
@@ -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,27 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module SurgeAPI
|
|
4
|
+
module Resources
|
|
5
|
+
class Recordings
|
|
6
|
+
# Redirects to a signed URL where the recording audio file can be downloaded. URL
|
|
7
|
+
# is short-lived, so redirect should be followed immediately.
|
|
8
|
+
sig do
|
|
9
|
+
params(
|
|
10
|
+
recording_id: String,
|
|
11
|
+
request_options: SurgeAPI::RequestOptions::OrHash
|
|
12
|
+
).returns(SurgeAPI::Models::RecordingGetFileResponse)
|
|
13
|
+
end
|
|
14
|
+
def get_file(
|
|
15
|
+
# The ID of the recording.
|
|
16
|
+
recording_id,
|
|
17
|
+
request_options: {}
|
|
18
|
+
)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# @api private
|
|
22
|
+
sig { params(client: SurgeAPI::Client).returns(T.attached_class) }
|
|
23
|
+
def self.new(client:)
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -15,7 +15,9 @@ module SurgeAPI
|
|
|
15
15
|
SurgeAPI::MessageDeliveredWebhookEvent,
|
|
16
16
|
SurgeAPI::MessageFailedWebhookEvent,
|
|
17
17
|
SurgeAPI::MessageReceivedWebhookEvent,
|
|
18
|
-
SurgeAPI::MessageSentWebhookEvent
|
|
18
|
+
SurgeAPI::MessageSentWebhookEvent,
|
|
19
|
+
SurgeAPI::RecordingCompletedWebhookEvent,
|
|
20
|
+
SurgeAPI::VoicemailReceivedWebhookEvent
|
|
19
21
|
)
|
|
20
22
|
)
|
|
21
23
|
end
|
data/sig/surge_api/client.rbs
CHANGED
|
@@ -22,6 +22,8 @@ module SurgeAPI
|
|
|
22
22
|
|
|
23
23
|
attr_reader phone_numbers: SurgeAPI::Resources::PhoneNumbers
|
|
24
24
|
|
|
25
|
+
attr_reader recordings: SurgeAPI::Resources::Recordings
|
|
26
|
+
|
|
25
27
|
attr_reader users: SurgeAPI::Resources::Users
|
|
26
28
|
|
|
27
29
|
attr_reader verifications: SurgeAPI::Resources::Verifications
|
|
@@ -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
|
-
|
|
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
|
-
|
|
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,
|
|
@@ -8,6 +8,7 @@ module SurgeAPI
|
|
|
8
8
|
includes: ::Array[SurgeAPI::Models::Campaign::include_],
|
|
9
9
|
message_samples: ::Array[String],
|
|
10
10
|
privacy_policy_url: String,
|
|
11
|
+
status: SurgeAPI::Models::Campaign::status,
|
|
11
12
|
use_cases: ::Array[SurgeAPI::Models::Campaign::use_case],
|
|
12
13
|
volume: SurgeAPI::Models::Campaign::volume,
|
|
13
14
|
link_sample: String,
|
|
@@ -27,6 +28,8 @@ module SurgeAPI
|
|
|
27
28
|
|
|
28
29
|
attr_accessor privacy_policy_url: String
|
|
29
30
|
|
|
31
|
+
attr_accessor status: SurgeAPI::Models::Campaign::status
|
|
32
|
+
|
|
30
33
|
attr_accessor use_cases: ::Array[SurgeAPI::Models::Campaign::use_case]
|
|
31
34
|
|
|
32
35
|
attr_accessor volume: SurgeAPI::Models::Campaign::volume
|
|
@@ -46,6 +49,7 @@ module SurgeAPI
|
|
|
46
49
|
includes: ::Array[SurgeAPI::Models::Campaign::include_],
|
|
47
50
|
message_samples: ::Array[String],
|
|
48
51
|
privacy_policy_url: String,
|
|
52
|
+
status: SurgeAPI::Models::Campaign::status,
|
|
49
53
|
use_cases: ::Array[SurgeAPI::Models::Campaign::use_case],
|
|
50
54
|
volume: SurgeAPI::Models::Campaign::volume,
|
|
51
55
|
?link_sample: String,
|
|
@@ -59,6 +63,7 @@ module SurgeAPI
|
|
|
59
63
|
includes: ::Array[SurgeAPI::Models::Campaign::include_],
|
|
60
64
|
message_samples: ::Array[String],
|
|
61
65
|
privacy_policy_url: String,
|
|
66
|
+
status: SurgeAPI::Models::Campaign::status,
|
|
62
67
|
use_cases: ::Array[SurgeAPI::Models::Campaign::use_case],
|
|
63
68
|
volume: SurgeAPI::Models::Campaign::volume,
|
|
64
69
|
link_sample: String,
|
|
@@ -78,6 +83,29 @@ module SurgeAPI
|
|
|
78
83
|
def self?.values: -> ::Array[SurgeAPI::Models::Campaign::include_]
|
|
79
84
|
end
|
|
80
85
|
|
|
86
|
+
type status =
|
|
87
|
+
:active
|
|
88
|
+
| :canceled
|
|
89
|
+
| :created
|
|
90
|
+
| :deactivated
|
|
91
|
+
| :in_review
|
|
92
|
+
| :pending
|
|
93
|
+
| :rejected
|
|
94
|
+
|
|
95
|
+
module Status
|
|
96
|
+
extend SurgeAPI::Internal::Type::Enum
|
|
97
|
+
|
|
98
|
+
ACTIVE: :active
|
|
99
|
+
CANCELED: :canceled
|
|
100
|
+
CREATED: :created
|
|
101
|
+
DEACTIVATED: :deactivated
|
|
102
|
+
IN_REVIEW: :in_review
|
|
103
|
+
PENDING: :pending
|
|
104
|
+
REJECTED: :rejected
|
|
105
|
+
|
|
106
|
+
def self?.values: -> ::Array[SurgeAPI::Models::Campaign::status]
|
|
107
|
+
end
|
|
108
|
+
|
|
81
109
|
type use_case =
|
|
82
110
|
:account_notification
|
|
83
111
|
| :customer_care
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module SurgeAPI
|
|
2
|
+
module Models
|
|
3
|
+
type campaign_retrieve_params =
|
|
4
|
+
{ } & SurgeAPI::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class CampaignRetrieveParams < SurgeAPI::Internal::Type::BaseModel
|
|
7
|
+
extend SurgeAPI::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include SurgeAPI::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
def initialize: (?request_options: SurgeAPI::request_opts) -> void
|
|
11
|
+
|
|
12
|
+
def to_hash: -> { request_options: SurgeAPI::RequestOptions }
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -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
|
|
@@ -4,8 +4,8 @@ module SurgeAPI
|
|
|
4
4
|
{
|
|
5
5
|
id: String,
|
|
6
6
|
attachments: ::Array[SurgeAPI::Message::Attachment],
|
|
7
|
-
blast_id: String
|
|
8
|
-
body: String
|
|
7
|
+
blast_id: String?,
|
|
8
|
+
body: String?,
|
|
9
9
|
conversation: SurgeAPI::Message::Conversation,
|
|
10
10
|
metadata: ::Hash[Symbol, String]
|
|
11
11
|
}
|
|
@@ -21,13 +21,9 @@ module SurgeAPI
|
|
|
21
21
|
::Array[SurgeAPI::Message::Attachment]
|
|
22
22
|
) -> ::Array[SurgeAPI::Message::Attachment]
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
attr_accessor blast_id: String?
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
attr_reader body: String?
|
|
29
|
-
|
|
30
|
-
def body=: (String) -> String
|
|
26
|
+
attr_accessor body: String?
|
|
31
27
|
|
|
32
28
|
attr_reader conversation: SurgeAPI::Message::Conversation?
|
|
33
29
|
|
|
@@ -42,8 +38,8 @@ module SurgeAPI
|
|
|
42
38
|
def initialize: (
|
|
43
39
|
?id: String,
|
|
44
40
|
?attachments: ::Array[SurgeAPI::Message::Attachment],
|
|
45
|
-
?blast_id: String
|
|
46
|
-
?body: String
|
|
41
|
+
?blast_id: String?,
|
|
42
|
+
?body: String?,
|
|
47
43
|
?conversation: SurgeAPI::Message::Conversation,
|
|
48
44
|
?metadata: ::Hash[Symbol, String]
|
|
49
45
|
) -> void
|
|
@@ -51,8 +47,8 @@ module SurgeAPI
|
|
|
51
47
|
def to_hash: -> {
|
|
52
48
|
id: String,
|
|
53
49
|
attachments: ::Array[SurgeAPI::Message::Attachment],
|
|
54
|
-
blast_id: String
|
|
55
|
-
body: String
|
|
50
|
+
blast_id: String?,
|
|
51
|
+
body: String?,
|
|
56
52
|
conversation: SurgeAPI::Message::Conversation,
|
|
57
53
|
metadata: ::Hash[Symbol, String]
|
|
58
54
|
}
|
|
@@ -34,7 +34,7 @@ module SurgeAPI
|
|
|
34
34
|
type data =
|
|
35
35
|
{
|
|
36
36
|
id: String,
|
|
37
|
-
body: String
|
|
37
|
+
body: String?,
|
|
38
38
|
conversation: SurgeAPI::MessageDeliveredWebhookEvent::Data::Conversation,
|
|
39
39
|
delivered_at: Time,
|
|
40
40
|
attachments: ::Array[SurgeAPI::MessageDeliveredWebhookEvent::Data::Attachment],
|
|
@@ -44,7 +44,7 @@ module SurgeAPI
|
|
|
44
44
|
class Data < SurgeAPI::Internal::Type::BaseModel
|
|
45
45
|
attr_accessor id: String
|
|
46
46
|
|
|
47
|
-
attr_accessor body: String
|
|
47
|
+
attr_accessor body: String?
|
|
48
48
|
|
|
49
49
|
attr_accessor conversation: SurgeAPI::MessageDeliveredWebhookEvent::Data::Conversation
|
|
50
50
|
|
|
@@ -62,7 +62,7 @@ module SurgeAPI
|
|
|
62
62
|
|
|
63
63
|
def initialize: (
|
|
64
64
|
id: String,
|
|
65
|
-
body: String
|
|
65
|
+
body: String?,
|
|
66
66
|
conversation: SurgeAPI::MessageDeliveredWebhookEvent::Data::Conversation,
|
|
67
67
|
delivered_at: Time,
|
|
68
68
|
?attachments: ::Array[SurgeAPI::MessageDeliveredWebhookEvent::Data::Attachment],
|
|
@@ -71,7 +71,7 @@ module SurgeAPI
|
|
|
71
71
|
|
|
72
72
|
def to_hash: -> {
|
|
73
73
|
id: String,
|
|
74
|
-
body: String
|
|
74
|
+
body: String?,
|
|
75
75
|
conversation: SurgeAPI::MessageDeliveredWebhookEvent::Data::Conversation,
|
|
76
76
|
delivered_at: Time,
|
|
77
77
|
attachments: ::Array[SurgeAPI::MessageDeliveredWebhookEvent::Data::Attachment],
|
|
@@ -34,7 +34,7 @@ module SurgeAPI
|
|
|
34
34
|
type data =
|
|
35
35
|
{
|
|
36
36
|
id: String,
|
|
37
|
-
body: String
|
|
37
|
+
body: String?,
|
|
38
38
|
conversation: SurgeAPI::MessageFailedWebhookEvent::Data::Conversation,
|
|
39
39
|
failed_at: Time,
|
|
40
40
|
failure_reason: String,
|
|
@@ -45,7 +45,7 @@ module SurgeAPI
|
|
|
45
45
|
class Data < SurgeAPI::Internal::Type::BaseModel
|
|
46
46
|
attr_accessor id: String
|
|
47
47
|
|
|
48
|
-
attr_accessor body: String
|
|
48
|
+
attr_accessor body: String?
|
|
49
49
|
|
|
50
50
|
attr_accessor conversation: SurgeAPI::MessageFailedWebhookEvent::Data::Conversation
|
|
51
51
|
|
|
@@ -65,7 +65,7 @@ module SurgeAPI
|
|
|
65
65
|
|
|
66
66
|
def initialize: (
|
|
67
67
|
id: String,
|
|
68
|
-
body: String
|
|
68
|
+
body: String?,
|
|
69
69
|
conversation: SurgeAPI::MessageFailedWebhookEvent::Data::Conversation,
|
|
70
70
|
failed_at: Time,
|
|
71
71
|
failure_reason: String,
|
|
@@ -75,7 +75,7 @@ module SurgeAPI
|
|
|
75
75
|
|
|
76
76
|
def to_hash: -> {
|
|
77
77
|
id: String,
|
|
78
|
-
body: String
|
|
78
|
+
body: String?,
|
|
79
79
|
conversation: SurgeAPI::MessageFailedWebhookEvent::Data::Conversation,
|
|
80
80
|
failed_at: Time,
|
|
81
81
|
failure_reason: String,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module SurgeAPI
|
|
2
|
+
module Models
|
|
3
|
+
type message_list_params =
|
|
4
|
+
{ after: String, before: String }
|
|
5
|
+
& SurgeAPI::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class MessageListParams < 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
|
|
@@ -34,7 +34,7 @@ module SurgeAPI
|
|
|
34
34
|
type data =
|
|
35
35
|
{
|
|
36
36
|
id: String,
|
|
37
|
-
body: String
|
|
37
|
+
body: String?,
|
|
38
38
|
conversation: SurgeAPI::MessageReceivedWebhookEvent::Data::Conversation,
|
|
39
39
|
received_at: Time,
|
|
40
40
|
attachments: ::Array[SurgeAPI::MessageReceivedWebhookEvent::Data::Attachment],
|
|
@@ -44,7 +44,7 @@ module SurgeAPI
|
|
|
44
44
|
class Data < SurgeAPI::Internal::Type::BaseModel
|
|
45
45
|
attr_accessor id: String
|
|
46
46
|
|
|
47
|
-
attr_accessor body: String
|
|
47
|
+
attr_accessor body: String?
|
|
48
48
|
|
|
49
49
|
attr_accessor conversation: SurgeAPI::MessageReceivedWebhookEvent::Data::Conversation
|
|
50
50
|
|
|
@@ -62,7 +62,7 @@ module SurgeAPI
|
|
|
62
62
|
|
|
63
63
|
def initialize: (
|
|
64
64
|
id: String,
|
|
65
|
-
body: String
|
|
65
|
+
body: String?,
|
|
66
66
|
conversation: SurgeAPI::MessageReceivedWebhookEvent::Data::Conversation,
|
|
67
67
|
received_at: Time,
|
|
68
68
|
?attachments: ::Array[SurgeAPI::MessageReceivedWebhookEvent::Data::Attachment],
|
|
@@ -71,7 +71,7 @@ module SurgeAPI
|
|
|
71
71
|
|
|
72
72
|
def to_hash: -> {
|
|
73
73
|
id: String,
|
|
74
|
-
body: String
|
|
74
|
+
body: String?,
|
|
75
75
|
conversation: SurgeAPI::MessageReceivedWebhookEvent::Data::Conversation,
|
|
76
76
|
received_at: Time,
|
|
77
77
|
attachments: ::Array[SurgeAPI::MessageReceivedWebhookEvent::Data::Attachment],
|
|
@@ -34,7 +34,7 @@ module SurgeAPI
|
|
|
34
34
|
type data =
|
|
35
35
|
{
|
|
36
36
|
id: String,
|
|
37
|
-
body: String
|
|
37
|
+
body: String?,
|
|
38
38
|
conversation: SurgeAPI::MessageSentWebhookEvent::Data::Conversation,
|
|
39
39
|
sent_at: Time,
|
|
40
40
|
attachments: ::Array[SurgeAPI::MessageSentWebhookEvent::Data::Attachment],
|
|
@@ -44,7 +44,7 @@ module SurgeAPI
|
|
|
44
44
|
class Data < SurgeAPI::Internal::Type::BaseModel
|
|
45
45
|
attr_accessor id: String
|
|
46
46
|
|
|
47
|
-
attr_accessor body: String
|
|
47
|
+
attr_accessor body: String?
|
|
48
48
|
|
|
49
49
|
attr_accessor conversation: SurgeAPI::MessageSentWebhookEvent::Data::Conversation
|
|
50
50
|
|
|
@@ -62,7 +62,7 @@ module SurgeAPI
|
|
|
62
62
|
|
|
63
63
|
def initialize: (
|
|
64
64
|
id: String,
|
|
65
|
-
body: String
|
|
65
|
+
body: String?,
|
|
66
66
|
conversation: SurgeAPI::MessageSentWebhookEvent::Data::Conversation,
|
|
67
67
|
sent_at: Time,
|
|
68
68
|
?attachments: ::Array[SurgeAPI::MessageSentWebhookEvent::Data::Attachment],
|
|
@@ -71,7 +71,7 @@ module SurgeAPI
|
|
|
71
71
|
|
|
72
72
|
def to_hash: -> {
|
|
73
73
|
id: String,
|
|
74
|
-
body: String
|
|
74
|
+
body: String?,
|
|
75
75
|
conversation: SurgeAPI::MessageSentWebhookEvent::Data::Conversation,
|
|
76
76
|
sent_at: Time,
|
|
77
77
|
attachments: ::Array[SurgeAPI::MessageSentWebhookEvent::Data::Attachment],
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module SurgeAPI
|
|
2
|
+
module Models
|
|
3
|
+
type phone_number_list_params =
|
|
4
|
+
{ after: String, before: String }
|
|
5
|
+
& SurgeAPI::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class PhoneNumberListParams < 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
|