surge_api 0.15.0 → 0.17.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 +18 -0
- data/README.md +6 -6
- data/lib/surge_api/client.rb +4 -0
- data/lib/surge_api/internal/cursor.rb +2 -2
- data/lib/surge_api/models/account_list_params.rb +34 -0
- data/lib/surge_api/models/attachment_get_file_params.rb +14 -0
- data/lib/surge_api/models/attachment_get_file_response.rb +19 -0
- data/lib/surge_api/models/link_followed_webhook_event.rb +15 -5
- data/lib/surge_api/models/message.rb +9 -1
- data/lib/surge_api/models/phone_number.rb +9 -1
- data/lib/surge_api/models/phone_number_attached_to_campaign_webhook_event.rb +9 -1
- data/lib/surge_api/models/phone_number_purchase_params.rb +10 -1
- data/lib/surge_api/models.rb +4 -0
- data/lib/surge_api/resources/accounts.rb +29 -0
- data/lib/surge_api/resources/attachments.rb +35 -0
- data/lib/surge_api/resources/phone_numbers.rb +3 -1
- data/lib/surge_api/version.rb +1 -1
- data/lib/surge_api.rb +4 -0
- data/rbi/surge_api/client.rbi +3 -0
- data/rbi/surge_api/models/account_list_params.rbi +59 -0
- data/rbi/surge_api/models/attachment_get_file_params.rbi +27 -0
- data/rbi/surge_api/models/attachment_get_file_response.rbi +34 -0
- data/rbi/surge_api/models/link_followed_webhook_event.rbi +26 -7
- data/rbi/surge_api/models/message.rbi +8 -0
- data/rbi/surge_api/models/phone_number.rbi +8 -0
- data/rbi/surge_api/models/phone_number_attached_to_campaign_webhook_event.rbi +8 -0
- data/rbi/surge_api/models/phone_number_purchase_params.rbi +13 -0
- data/rbi/surge_api/models.rbi +4 -0
- data/rbi/surge_api/resources/accounts.rbi +18 -0
- data/rbi/surge_api/resources/attachments.rbi +27 -0
- data/rbi/surge_api/resources/phone_numbers.rbi +4 -0
- data/sig/surge_api/client.rbs +2 -0
- data/sig/surge_api/models/account_list_params.rbs +32 -0
- data/sig/surge_api/models/attachment_get_file_params.rbs +15 -0
- data/sig/surge_api/models/attachment_get_file_response.rbs +13 -0
- data/sig/surge_api/models/link_followed_webhook_event.rbs +22 -4
- data/sig/surge_api/models/message.rbs +5 -0
- data/sig/surge_api/models/phone_number.rbs +5 -0
- data/sig/surge_api/models/phone_number_attached_to_campaign_webhook_event.rbs +5 -0
- data/sig/surge_api/models/phone_number_purchase_params.rbs +7 -0
- data/sig/surge_api/models.rbs +4 -0
- data/sig/surge_api/resources/accounts.rbs +6 -0
- data/sig/surge_api/resources/attachments.rbs +12 -0
- data/sig/surge_api/resources/phone_numbers.rbs +1 -0
- metadata +14 -2
|
@@ -243,6 +243,10 @@ module SurgeAPI
|
|
|
243
243
|
sig { returns(String) }
|
|
244
244
|
attr_accessor :id
|
|
245
245
|
|
|
246
|
+
# A human-readable name for the phone number
|
|
247
|
+
sig { returns(T.nilable(String)) }
|
|
248
|
+
attr_accessor :name
|
|
249
|
+
|
|
246
250
|
# The canonical format of the phone number.
|
|
247
251
|
sig { returns(String) }
|
|
248
252
|
attr_accessor :number
|
|
@@ -259,6 +263,7 @@ module SurgeAPI
|
|
|
259
263
|
sig do
|
|
260
264
|
params(
|
|
261
265
|
id: String,
|
|
266
|
+
name: T.nilable(String),
|
|
262
267
|
number: String,
|
|
263
268
|
type: SurgeAPI::Message::Conversation::PhoneNumber::Type::OrSymbol
|
|
264
269
|
).returns(T.attached_class)
|
|
@@ -266,6 +271,8 @@ module SurgeAPI
|
|
|
266
271
|
def self.new(
|
|
267
272
|
# Unique identifier for the phone number
|
|
268
273
|
id:,
|
|
274
|
+
# A human-readable name for the phone number
|
|
275
|
+
name:,
|
|
269
276
|
# The canonical format of the phone number.
|
|
270
277
|
number:,
|
|
271
278
|
# Whether the phone number is local, toll-free, or short code
|
|
@@ -277,6 +284,7 @@ module SurgeAPI
|
|
|
277
284
|
override.returns(
|
|
278
285
|
{
|
|
279
286
|
id: String,
|
|
287
|
+
name: T.nilable(String),
|
|
280
288
|
number: String,
|
|
281
289
|
type:
|
|
282
290
|
SurgeAPI::Message::Conversation::PhoneNumber::Type::TaggedSymbol
|
|
@@ -16,6 +16,10 @@ module SurgeAPI
|
|
|
16
16
|
sig { returns(T.nilable(String)) }
|
|
17
17
|
attr_accessor :campaign_id
|
|
18
18
|
|
|
19
|
+
# A human-readable name for the phone number
|
|
20
|
+
sig { returns(T.nilable(String)) }
|
|
21
|
+
attr_accessor :name
|
|
22
|
+
|
|
19
23
|
# The phone number in E.164 format
|
|
20
24
|
sig { returns(String) }
|
|
21
25
|
attr_accessor :number
|
|
@@ -29,6 +33,7 @@ module SurgeAPI
|
|
|
29
33
|
params(
|
|
30
34
|
id: String,
|
|
31
35
|
campaign_id: T.nilable(String),
|
|
36
|
+
name: T.nilable(String),
|
|
32
37
|
number: String,
|
|
33
38
|
type: SurgeAPI::PhoneNumber::Type::OrSymbol
|
|
34
39
|
).returns(T.attached_class)
|
|
@@ -38,6 +43,8 @@ module SurgeAPI
|
|
|
38
43
|
id:,
|
|
39
44
|
# The unique identifier of the campaign this phone number is attached to, if any
|
|
40
45
|
campaign_id:,
|
|
46
|
+
# A human-readable name for the phone number
|
|
47
|
+
name:,
|
|
41
48
|
# The phone number in E.164 format
|
|
42
49
|
number:,
|
|
43
50
|
# Whether the phone number is local, toll-free, or short code
|
|
@@ -50,6 +57,7 @@ module SurgeAPI
|
|
|
50
57
|
{
|
|
51
58
|
id: String,
|
|
52
59
|
campaign_id: T.nilable(String),
|
|
60
|
+
name: T.nilable(String),
|
|
53
61
|
number: String,
|
|
54
62
|
type: SurgeAPI::PhoneNumber::Type::TaggedSymbol
|
|
55
63
|
}
|
|
@@ -88,6 +88,10 @@ module SurgeAPI
|
|
|
88
88
|
sig { returns(String) }
|
|
89
89
|
attr_accessor :campaign_id
|
|
90
90
|
|
|
91
|
+
# A human-readable name for the phone number
|
|
92
|
+
sig { returns(T.nilable(String)) }
|
|
93
|
+
attr_accessor :name
|
|
94
|
+
|
|
91
95
|
# The phone number in E.164 format
|
|
92
96
|
sig { returns(String) }
|
|
93
97
|
attr_accessor :number
|
|
@@ -105,6 +109,7 @@ module SurgeAPI
|
|
|
105
109
|
params(
|
|
106
110
|
id: String,
|
|
107
111
|
campaign_id: String,
|
|
112
|
+
name: T.nilable(String),
|
|
108
113
|
number: String,
|
|
109
114
|
type:
|
|
110
115
|
SurgeAPI::PhoneNumberAttachedToCampaignWebhookEvent::Data::Type::OrSymbol
|
|
@@ -115,6 +120,8 @@ module SurgeAPI
|
|
|
115
120
|
id:,
|
|
116
121
|
# The unique identifier of the campaign this phone number is attached to
|
|
117
122
|
campaign_id:,
|
|
123
|
+
# A human-readable name for the phone number
|
|
124
|
+
name:,
|
|
118
125
|
# The phone number in E.164 format
|
|
119
126
|
number:,
|
|
120
127
|
# Whether the phone number is local, toll-free, or short code
|
|
@@ -127,6 +134,7 @@ module SurgeAPI
|
|
|
127
134
|
{
|
|
128
135
|
id: String,
|
|
129
136
|
campaign_id: String,
|
|
137
|
+
name: T.nilable(String),
|
|
130
138
|
number: String,
|
|
131
139
|
type:
|
|
132
140
|
SurgeAPI::PhoneNumberAttachedToCampaignWebhookEvent::Data::Type::TaggedSymbol
|
|
@@ -38,6 +38,14 @@ module SurgeAPI
|
|
|
38
38
|
sig { params(longitude: Float).void }
|
|
39
39
|
attr_writer :longitude
|
|
40
40
|
|
|
41
|
+
# A human-readable name for the phone number. If not provided, defaults to the
|
|
42
|
+
# formatted phone number.
|
|
43
|
+
sig { returns(T.nilable(String)) }
|
|
44
|
+
attr_reader :name
|
|
45
|
+
|
|
46
|
+
sig { params(name: String).void }
|
|
47
|
+
attr_writer :name
|
|
48
|
+
|
|
41
49
|
# Whether the phone number is local or toll-free. Can be omitted if area_code or
|
|
42
50
|
# latitude/longitude are provided.
|
|
43
51
|
sig do
|
|
@@ -55,6 +63,7 @@ module SurgeAPI
|
|
|
55
63
|
area_code: String,
|
|
56
64
|
latitude: Float,
|
|
57
65
|
longitude: Float,
|
|
66
|
+
name: String,
|
|
58
67
|
type: SurgeAPI::PhoneNumberPurchaseParams::Type::OrSymbol,
|
|
59
68
|
request_options: SurgeAPI::RequestOptions::OrHash
|
|
60
69
|
).returns(T.attached_class)
|
|
@@ -69,6 +78,9 @@ module SurgeAPI
|
|
|
69
78
|
# Longitude to search for nearby phone numbers. Must be used with latitude. If
|
|
70
79
|
# provided without type, type will be inferred as 'local'.
|
|
71
80
|
longitude: nil,
|
|
81
|
+
# A human-readable name for the phone number. If not provided, defaults to the
|
|
82
|
+
# formatted phone number.
|
|
83
|
+
name: nil,
|
|
72
84
|
# Whether the phone number is local or toll-free. Can be omitted if area_code or
|
|
73
85
|
# latitude/longitude are provided.
|
|
74
86
|
type: nil,
|
|
@@ -82,6 +94,7 @@ module SurgeAPI
|
|
|
82
94
|
area_code: String,
|
|
83
95
|
latitude: Float,
|
|
84
96
|
longitude: Float,
|
|
97
|
+
name: String,
|
|
85
98
|
type: SurgeAPI::PhoneNumberPurchaseParams::Type::OrSymbol,
|
|
86
99
|
request_options: SurgeAPI::RequestOptions
|
|
87
100
|
}
|
data/rbi/surge_api/models.rbi
CHANGED
|
@@ -7,12 +7,16 @@ module SurgeAPI
|
|
|
7
7
|
|
|
8
8
|
AccountCreateParams = SurgeAPI::Models::AccountCreateParams
|
|
9
9
|
|
|
10
|
+
AccountListParams = SurgeAPI::Models::AccountListParams
|
|
11
|
+
|
|
10
12
|
AccountRetrieveStatusParams = SurgeAPI::Models::AccountRetrieveStatusParams
|
|
11
13
|
|
|
12
14
|
AccountStatus = SurgeAPI::Models::AccountStatus
|
|
13
15
|
|
|
14
16
|
AccountUpdateParams = SurgeAPI::Models::AccountUpdateParams
|
|
15
17
|
|
|
18
|
+
AttachmentGetFileParams = SurgeAPI::Models::AttachmentGetFileParams
|
|
19
|
+
|
|
16
20
|
AudienceAddContactParams = SurgeAPI::Models::AudienceAddContactParams
|
|
17
21
|
|
|
18
22
|
AudienceCreateParams = SurgeAPI::Models::AudienceCreateParams
|
|
@@ -65,6 +65,24 @@ module SurgeAPI
|
|
|
65
65
|
)
|
|
66
66
|
end
|
|
67
67
|
|
|
68
|
+
# List all accounts for the calling platform with cursor-based pagination.
|
|
69
|
+
sig do
|
|
70
|
+
params(
|
|
71
|
+
after: String,
|
|
72
|
+
before: String,
|
|
73
|
+
request_options: SurgeAPI::RequestOptions::OrHash
|
|
74
|
+
).returns(SurgeAPI::Internal::Cursor[SurgeAPI::Account])
|
|
75
|
+
end
|
|
76
|
+
def list(
|
|
77
|
+
# Cursor for forward pagination. Use the next_cursor from a previous response.
|
|
78
|
+
after: nil,
|
|
79
|
+
# Cursor for backward pagination. Use the previous_cursor from a previous
|
|
80
|
+
# response.
|
|
81
|
+
before: nil,
|
|
82
|
+
request_options: {}
|
|
83
|
+
)
|
|
84
|
+
end
|
|
85
|
+
|
|
68
86
|
# Archives an account and releases all associated resources.
|
|
69
87
|
#
|
|
70
88
|
# **Warning**: This action will:
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module SurgeAPI
|
|
4
|
+
module Resources
|
|
5
|
+
class Attachments
|
|
6
|
+
# Redirects to a signed URL where the attachment file can be downloaded. URL is
|
|
7
|
+
# short-lived, so redirect should be followed immediately.
|
|
8
|
+
sig do
|
|
9
|
+
params(
|
|
10
|
+
attachment_id: String,
|
|
11
|
+
request_options: SurgeAPI::RequestOptions::OrHash
|
|
12
|
+
).returns(SurgeAPI::Models::AttachmentGetFileResponse)
|
|
13
|
+
end
|
|
14
|
+
def get_file(
|
|
15
|
+
# The ID of the attachment.
|
|
16
|
+
attachment_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
|
|
@@ -32,6 +32,7 @@ module SurgeAPI
|
|
|
32
32
|
area_code: String,
|
|
33
33
|
latitude: Float,
|
|
34
34
|
longitude: Float,
|
|
35
|
+
name: String,
|
|
35
36
|
type: SurgeAPI::PhoneNumberPurchaseParams::Type::OrSymbol,
|
|
36
37
|
request_options: SurgeAPI::RequestOptions::OrHash
|
|
37
38
|
).returns(SurgeAPI::PhoneNumber)
|
|
@@ -48,6 +49,9 @@ module SurgeAPI
|
|
|
48
49
|
# Longitude to search for nearby phone numbers. Must be used with latitude. If
|
|
49
50
|
# provided without type, type will be inferred as 'local'.
|
|
50
51
|
longitude: nil,
|
|
52
|
+
# A human-readable name for the phone number. If not provided, defaults to the
|
|
53
|
+
# formatted phone number.
|
|
54
|
+
name: nil,
|
|
51
55
|
# Whether the phone number is local or toll-free. Can be omitted if area_code or
|
|
52
56
|
# latitude/longitude are provided.
|
|
53
57
|
type: nil,
|
data/sig/surge_api/client.rbs
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module SurgeAPI
|
|
2
|
+
module Models
|
|
3
|
+
type account_list_params =
|
|
4
|
+
{ after: String, before: String }
|
|
5
|
+
& SurgeAPI::Internal::Type::request_parameters
|
|
6
|
+
|
|
7
|
+
class AccountListParams < 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
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module SurgeAPI
|
|
2
|
+
module Models
|
|
3
|
+
type attachment_get_file_params =
|
|
4
|
+
{ } & SurgeAPI::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class AttachmentGetFileParams < 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,13 @@
|
|
|
1
|
+
module SurgeAPI
|
|
2
|
+
module Models
|
|
3
|
+
type attachment_get_file_response = { error: SurgeAPI::Error }
|
|
4
|
+
|
|
5
|
+
class AttachmentGetFileResponse < SurgeAPI::Internal::Type::BaseModel
|
|
6
|
+
attr_accessor error: SurgeAPI::Error
|
|
7
|
+
|
|
8
|
+
def initialize: (error: SurgeAPI::Error) -> void
|
|
9
|
+
|
|
10
|
+
def to_hash: -> { error: SurgeAPI::Error }
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -31,18 +31,36 @@ module SurgeAPI
|
|
|
31
31
|
type: :"link.followed"
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
type data =
|
|
34
|
+
type data =
|
|
35
|
+
{
|
|
36
|
+
id: String,
|
|
37
|
+
message: SurgeAPI::Message?,
|
|
38
|
+
message_id: String?,
|
|
39
|
+
url: String
|
|
40
|
+
}
|
|
35
41
|
|
|
36
42
|
class Data < SurgeAPI::Internal::Type::BaseModel
|
|
37
43
|
attr_accessor id: String
|
|
38
44
|
|
|
39
|
-
attr_accessor
|
|
45
|
+
attr_accessor message: SurgeAPI::Message?
|
|
46
|
+
|
|
47
|
+
attr_accessor message_id: String?
|
|
40
48
|
|
|
41
49
|
attr_accessor url: String
|
|
42
50
|
|
|
43
|
-
def initialize: (
|
|
51
|
+
def initialize: (
|
|
52
|
+
id: String,
|
|
53
|
+
message: SurgeAPI::Message?,
|
|
54
|
+
message_id: String?,
|
|
55
|
+
url: String
|
|
56
|
+
) -> void
|
|
44
57
|
|
|
45
|
-
def to_hash: -> {
|
|
58
|
+
def to_hash: -> {
|
|
59
|
+
id: String,
|
|
60
|
+
message: SurgeAPI::Message?,
|
|
61
|
+
message_id: String?,
|
|
62
|
+
url: String
|
|
63
|
+
}
|
|
46
64
|
end
|
|
47
65
|
end
|
|
48
66
|
end
|
|
@@ -134,6 +134,7 @@ module SurgeAPI
|
|
|
134
134
|
type phone_number =
|
|
135
135
|
{
|
|
136
136
|
id: String,
|
|
137
|
+
name: String?,
|
|
137
138
|
number: String,
|
|
138
139
|
type: SurgeAPI::Models::Message::Conversation::PhoneNumber::type_
|
|
139
140
|
}
|
|
@@ -141,18 +142,22 @@ module SurgeAPI
|
|
|
141
142
|
class PhoneNumber < SurgeAPI::Internal::Type::BaseModel
|
|
142
143
|
attr_accessor id: String
|
|
143
144
|
|
|
145
|
+
attr_accessor name: String?
|
|
146
|
+
|
|
144
147
|
attr_accessor number: String
|
|
145
148
|
|
|
146
149
|
attr_accessor type: SurgeAPI::Models::Message::Conversation::PhoneNumber::type_
|
|
147
150
|
|
|
148
151
|
def initialize: (
|
|
149
152
|
id: String,
|
|
153
|
+
name: String?,
|
|
150
154
|
number: String,
|
|
151
155
|
type: SurgeAPI::Models::Message::Conversation::PhoneNumber::type_
|
|
152
156
|
) -> void
|
|
153
157
|
|
|
154
158
|
def to_hash: -> {
|
|
155
159
|
id: String,
|
|
160
|
+
name: String?,
|
|
156
161
|
number: String,
|
|
157
162
|
type: SurgeAPI::Models::Message::Conversation::PhoneNumber::type_
|
|
158
163
|
}
|
|
@@ -4,6 +4,7 @@ module SurgeAPI
|
|
|
4
4
|
{
|
|
5
5
|
id: String,
|
|
6
6
|
campaign_id: String?,
|
|
7
|
+
name: String?,
|
|
7
8
|
number: String,
|
|
8
9
|
type: SurgeAPI::Models::PhoneNumber::type_
|
|
9
10
|
}
|
|
@@ -13,6 +14,8 @@ module SurgeAPI
|
|
|
13
14
|
|
|
14
15
|
attr_accessor campaign_id: String?
|
|
15
16
|
|
|
17
|
+
attr_accessor name: String?
|
|
18
|
+
|
|
16
19
|
attr_accessor number: String
|
|
17
20
|
|
|
18
21
|
attr_accessor type: SurgeAPI::Models::PhoneNumber::type_
|
|
@@ -20,6 +23,7 @@ module SurgeAPI
|
|
|
20
23
|
def initialize: (
|
|
21
24
|
id: String,
|
|
22
25
|
campaign_id: String?,
|
|
26
|
+
name: String?,
|
|
23
27
|
number: String,
|
|
24
28
|
type: SurgeAPI::Models::PhoneNumber::type_
|
|
25
29
|
) -> void
|
|
@@ -27,6 +31,7 @@ module SurgeAPI
|
|
|
27
31
|
def to_hash: -> {
|
|
28
32
|
id: String,
|
|
29
33
|
campaign_id: String?,
|
|
34
|
+
name: String?,
|
|
30
35
|
number: String,
|
|
31
36
|
type: SurgeAPI::Models::PhoneNumber::type_
|
|
32
37
|
}
|
|
@@ -35,6 +35,7 @@ module SurgeAPI
|
|
|
35
35
|
{
|
|
36
36
|
id: String,
|
|
37
37
|
campaign_id: String,
|
|
38
|
+
name: String?,
|
|
38
39
|
number: String,
|
|
39
40
|
type: SurgeAPI::Models::PhoneNumberAttachedToCampaignWebhookEvent::Data::type_
|
|
40
41
|
}
|
|
@@ -44,6 +45,8 @@ module SurgeAPI
|
|
|
44
45
|
|
|
45
46
|
attr_accessor campaign_id: String
|
|
46
47
|
|
|
48
|
+
attr_accessor name: String?
|
|
49
|
+
|
|
47
50
|
attr_accessor number: String
|
|
48
51
|
|
|
49
52
|
attr_accessor type: SurgeAPI::Models::PhoneNumberAttachedToCampaignWebhookEvent::Data::type_
|
|
@@ -51,6 +54,7 @@ module SurgeAPI
|
|
|
51
54
|
def initialize: (
|
|
52
55
|
id: String,
|
|
53
56
|
campaign_id: String,
|
|
57
|
+
name: String?,
|
|
54
58
|
number: String,
|
|
55
59
|
type: SurgeAPI::Models::PhoneNumberAttachedToCampaignWebhookEvent::Data::type_
|
|
56
60
|
) -> void
|
|
@@ -58,6 +62,7 @@ module SurgeAPI
|
|
|
58
62
|
def to_hash: -> {
|
|
59
63
|
id: String,
|
|
60
64
|
campaign_id: String,
|
|
65
|
+
name: String?,
|
|
61
66
|
number: String,
|
|
62
67
|
type: SurgeAPI::Models::PhoneNumberAttachedToCampaignWebhookEvent::Data::type_
|
|
63
68
|
}
|
|
@@ -5,6 +5,7 @@ module SurgeAPI
|
|
|
5
5
|
area_code: String,
|
|
6
6
|
latitude: Float,
|
|
7
7
|
longitude: Float,
|
|
8
|
+
name: String,
|
|
8
9
|
type: SurgeAPI::Models::PhoneNumberPurchaseParams::type_
|
|
9
10
|
}
|
|
10
11
|
& SurgeAPI::Internal::Type::request_parameters
|
|
@@ -25,6 +26,10 @@ module SurgeAPI
|
|
|
25
26
|
|
|
26
27
|
def longitude=: (Float) -> Float
|
|
27
28
|
|
|
29
|
+
attr_reader name: String?
|
|
30
|
+
|
|
31
|
+
def name=: (String) -> String
|
|
32
|
+
|
|
28
33
|
attr_reader type: SurgeAPI::Models::PhoneNumberPurchaseParams::type_?
|
|
29
34
|
|
|
30
35
|
def type=: (
|
|
@@ -35,6 +40,7 @@ module SurgeAPI
|
|
|
35
40
|
?area_code: String,
|
|
36
41
|
?latitude: Float,
|
|
37
42
|
?longitude: Float,
|
|
43
|
+
?name: String,
|
|
38
44
|
?type: SurgeAPI::Models::PhoneNumberPurchaseParams::type_,
|
|
39
45
|
?request_options: SurgeAPI::request_opts
|
|
40
46
|
) -> void
|
|
@@ -43,6 +49,7 @@ module SurgeAPI
|
|
|
43
49
|
area_code: String,
|
|
44
50
|
latitude: Float,
|
|
45
51
|
longitude: Float,
|
|
52
|
+
name: String,
|
|
46
53
|
type: SurgeAPI::Models::PhoneNumberPurchaseParams::type_,
|
|
47
54
|
request_options: SurgeAPI::RequestOptions
|
|
48
55
|
}
|
data/sig/surge_api/models.rbs
CHANGED
|
@@ -5,12 +5,16 @@ module SurgeAPI
|
|
|
5
5
|
|
|
6
6
|
class AccountCreateParams = SurgeAPI::Models::AccountCreateParams
|
|
7
7
|
|
|
8
|
+
class AccountListParams = SurgeAPI::Models::AccountListParams
|
|
9
|
+
|
|
8
10
|
class AccountRetrieveStatusParams = SurgeAPI::Models::AccountRetrieveStatusParams
|
|
9
11
|
|
|
10
12
|
class AccountStatus = SurgeAPI::Models::AccountStatus
|
|
11
13
|
|
|
12
14
|
class AccountUpdateParams = SurgeAPI::Models::AccountUpdateParams
|
|
13
15
|
|
|
16
|
+
class AttachmentGetFileParams = SurgeAPI::Models::AttachmentGetFileParams
|
|
17
|
+
|
|
14
18
|
class AudienceAddContactParams = SurgeAPI::Models::AudienceAddContactParams
|
|
15
19
|
|
|
16
20
|
class AudienceCreateParams = SurgeAPI::Models::AudienceCreateParams
|
|
@@ -18,6 +18,12 @@ module SurgeAPI
|
|
|
18
18
|
?request_options: SurgeAPI::request_opts
|
|
19
19
|
) -> SurgeAPI::Account
|
|
20
20
|
|
|
21
|
+
def list: (
|
|
22
|
+
?after: String,
|
|
23
|
+
?before: String,
|
|
24
|
+
?request_options: SurgeAPI::request_opts
|
|
25
|
+
) -> SurgeAPI::Internal::Cursor[SurgeAPI::Account]
|
|
26
|
+
|
|
21
27
|
def archive: (
|
|
22
28
|
String id,
|
|
23
29
|
?request_options: SurgeAPI::request_opts
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
module SurgeAPI
|
|
2
|
+
module Resources
|
|
3
|
+
class Attachments
|
|
4
|
+
def get_file: (
|
|
5
|
+
String attachment_id,
|
|
6
|
+
?request_options: SurgeAPI::request_opts
|
|
7
|
+
) -> SurgeAPI::Models::AttachmentGetFileResponse
|
|
8
|
+
|
|
9
|
+
def initialize: (client: SurgeAPI::Client) -> void
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: surge_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.17.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Surge
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-04
|
|
11
|
+
date: 2026-05-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|
|
@@ -73,9 +73,12 @@ files:
|
|
|
73
73
|
- lib/surge_api/models/account.rb
|
|
74
74
|
- lib/surge_api/models/account_archive_params.rb
|
|
75
75
|
- lib/surge_api/models/account_create_params.rb
|
|
76
|
+
- lib/surge_api/models/account_list_params.rb
|
|
76
77
|
- lib/surge_api/models/account_retrieve_status_params.rb
|
|
77
78
|
- lib/surge_api/models/account_status.rb
|
|
78
79
|
- lib/surge_api/models/account_update_params.rb
|
|
80
|
+
- lib/surge_api/models/attachment_get_file_params.rb
|
|
81
|
+
- lib/surge_api/models/attachment_get_file_response.rb
|
|
79
82
|
- lib/surge_api/models/audience_add_contact_params.rb
|
|
80
83
|
- lib/surge_api/models/audience_create_params.rb
|
|
81
84
|
- lib/surge_api/models/audience_create_response.rb
|
|
@@ -140,6 +143,7 @@ files:
|
|
|
140
143
|
- lib/surge_api/models/webhook_unwrap_params.rb
|
|
141
144
|
- lib/surge_api/request_options.rb
|
|
142
145
|
- lib/surge_api/resources/accounts.rb
|
|
146
|
+
- lib/surge_api/resources/attachments.rb
|
|
143
147
|
- lib/surge_api/resources/audiences.rb
|
|
144
148
|
- lib/surge_api/resources/blasts.rb
|
|
145
149
|
- lib/surge_api/resources/campaigns.rb
|
|
@@ -175,9 +179,12 @@ files:
|
|
|
175
179
|
- rbi/surge_api/models/account.rbi
|
|
176
180
|
- rbi/surge_api/models/account_archive_params.rbi
|
|
177
181
|
- rbi/surge_api/models/account_create_params.rbi
|
|
182
|
+
- rbi/surge_api/models/account_list_params.rbi
|
|
178
183
|
- rbi/surge_api/models/account_retrieve_status_params.rbi
|
|
179
184
|
- rbi/surge_api/models/account_status.rbi
|
|
180
185
|
- rbi/surge_api/models/account_update_params.rbi
|
|
186
|
+
- rbi/surge_api/models/attachment_get_file_params.rbi
|
|
187
|
+
- rbi/surge_api/models/attachment_get_file_response.rbi
|
|
181
188
|
- rbi/surge_api/models/audience_add_contact_params.rbi
|
|
182
189
|
- rbi/surge_api/models/audience_create_params.rbi
|
|
183
190
|
- rbi/surge_api/models/audience_create_response.rbi
|
|
@@ -242,6 +249,7 @@ files:
|
|
|
242
249
|
- rbi/surge_api/models/webhook_unwrap_params.rbi
|
|
243
250
|
- rbi/surge_api/request_options.rbi
|
|
244
251
|
- rbi/surge_api/resources/accounts.rbi
|
|
252
|
+
- rbi/surge_api/resources/attachments.rbi
|
|
245
253
|
- rbi/surge_api/resources/audiences.rbi
|
|
246
254
|
- rbi/surge_api/resources/blasts.rbi
|
|
247
255
|
- rbi/surge_api/resources/campaigns.rbi
|
|
@@ -276,9 +284,12 @@ files:
|
|
|
276
284
|
- sig/surge_api/models/account.rbs
|
|
277
285
|
- sig/surge_api/models/account_archive_params.rbs
|
|
278
286
|
- sig/surge_api/models/account_create_params.rbs
|
|
287
|
+
- sig/surge_api/models/account_list_params.rbs
|
|
279
288
|
- sig/surge_api/models/account_retrieve_status_params.rbs
|
|
280
289
|
- sig/surge_api/models/account_status.rbs
|
|
281
290
|
- sig/surge_api/models/account_update_params.rbs
|
|
291
|
+
- sig/surge_api/models/attachment_get_file_params.rbs
|
|
292
|
+
- sig/surge_api/models/attachment_get_file_response.rbs
|
|
282
293
|
- sig/surge_api/models/audience_add_contact_params.rbs
|
|
283
294
|
- sig/surge_api/models/audience_create_params.rbs
|
|
284
295
|
- sig/surge_api/models/audience_create_response.rbs
|
|
@@ -343,6 +354,7 @@ files:
|
|
|
343
354
|
- sig/surge_api/models/webhook_unwrap_params.rbs
|
|
344
355
|
- sig/surge_api/request_options.rbs
|
|
345
356
|
- sig/surge_api/resources/accounts.rbs
|
|
357
|
+
- sig/surge_api/resources/attachments.rbs
|
|
346
358
|
- sig/surge_api/resources/audiences.rbs
|
|
347
359
|
- sig/surge_api/resources/blasts.rbs
|
|
348
360
|
- sig/surge_api/resources/campaigns.rbs
|