surge_api 0.15.0 → 0.16.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 +10 -0
- data/README.md +1 -1
- data/lib/surge_api/client.rb +4 -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 +2 -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 +3 -0
- data/rbi/surge_api/client.rbi +3 -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 +2 -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/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 +2 -0
- data/sig/surge_api/resources/attachments.rbs +12 -0
- data/sig/surge_api/resources/phone_numbers.rbs +1 -0
- metadata +11 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 46beb8f51bbd1bbf30a337fd8f1bebec392a3e283b06663859e8c6fbc4418806
|
|
4
|
+
data.tar.gz: dd34d84097ceff18e2b17111d1513fa701d20079d4d90329f816eb3e89d14938
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6cf4a3222dd600709a14d8e718bb8bf04a9fd15650575914c136d11cb073e0d78724859e182b450ba7550fa46dfa8a2b3345e5e1175365477f9df729b992e385
|
|
7
|
+
data.tar.gz: ccb9085d52e5c8930568f9a511d6f6fe41e6f12f0aafacf515f201dde5c51d5ad04cb0d8341f4b7074eb7089e4c97dd69d35868ee9349c891abd5b588b522471
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.16.0 (2026-04-22)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.15.0...v0.16.0](https://github.com/surgeapi/ruby-sdk/compare/v0.15.0...v0.16.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** add endpoint to get attachment file ([5475d91](https://github.com/surgeapi/ruby-sdk/commit/5475d91e283e6afb974243f11a259e9990471f88))
|
|
10
|
+
* **api:** add message to link.followed events ([1c36d5c](https://github.com/surgeapi/ruby-sdk/commit/1c36d5c6c21eb866aa5489ce0b70b01bfd01a9e4))
|
|
11
|
+
* **api:** add name to phone numbers ([ee71d0d](https://github.com/surgeapi/ruby-sdk/commit/ee71d0dcec71388ed0af4132759072cca94e11f0))
|
|
12
|
+
|
|
3
13
|
## 0.15.0 (2026-04-06)
|
|
4
14
|
|
|
5
15
|
Full Changelog: [v0.14.0...v0.15.0](https://github.com/surgeapi/ruby-sdk/compare/v0.14.0...v0.15.0)
|
data/README.md
CHANGED
data/lib/surge_api/client.rb
CHANGED
|
@@ -21,6 +21,9 @@ module SurgeAPI
|
|
|
21
21
|
# @return [SurgeAPI::Resources::Accounts]
|
|
22
22
|
attr_reader :accounts
|
|
23
23
|
|
|
24
|
+
# @return [SurgeAPI::Resources::Attachments]
|
|
25
|
+
attr_reader :attachments
|
|
26
|
+
|
|
24
27
|
# @return [SurgeAPI::Resources::Audiences]
|
|
25
28
|
attr_reader :audiences
|
|
26
29
|
|
|
@@ -99,6 +102,7 @@ module SurgeAPI
|
|
|
99
102
|
)
|
|
100
103
|
|
|
101
104
|
@accounts = SurgeAPI::Resources::Accounts.new(client: self)
|
|
105
|
+
@attachments = SurgeAPI::Resources::Attachments.new(client: self)
|
|
102
106
|
@audiences = SurgeAPI::Resources::Audiences.new(client: self)
|
|
103
107
|
@blasts = SurgeAPI::Resources::Blasts.new(client: self)
|
|
104
108
|
@campaigns = SurgeAPI::Resources::Campaigns.new(client: self)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SurgeAPI
|
|
4
|
+
module Models
|
|
5
|
+
# @see SurgeAPI::Resources::Attachments#get_file
|
|
6
|
+
class AttachmentGetFileParams < SurgeAPI::Internal::Type::BaseModel
|
|
7
|
+
extend SurgeAPI::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include SurgeAPI::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!method initialize(request_options: {})
|
|
11
|
+
# @param request_options [SurgeAPI::RequestOptions, Hash{Symbol=>Object}]
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SurgeAPI
|
|
4
|
+
module Models
|
|
5
|
+
# @see SurgeAPI::Resources::Attachments#get_file
|
|
6
|
+
class AttachmentGetFileResponse < SurgeAPI::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute error
|
|
8
|
+
# An error response
|
|
9
|
+
#
|
|
10
|
+
# @return [SurgeAPI::Models::Error]
|
|
11
|
+
required :error, -> { SurgeAPI::Error }
|
|
12
|
+
|
|
13
|
+
# @!method initialize(error:)
|
|
14
|
+
# An error response
|
|
15
|
+
#
|
|
16
|
+
# @param error [SurgeAPI::Models::Error] An error response
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -44,11 +44,19 @@ module SurgeAPI
|
|
|
44
44
|
# @return [String]
|
|
45
45
|
required :id, String
|
|
46
46
|
|
|
47
|
+
# @!attribute message
|
|
48
|
+
# A Message is a communication sent to a Contact.
|
|
49
|
+
#
|
|
50
|
+
# @return [SurgeAPI::Models::Message, nil]
|
|
51
|
+
required :message, -> { SurgeAPI::Message }, nil?: true
|
|
52
|
+
|
|
47
53
|
# @!attribute message_id
|
|
48
|
-
#
|
|
54
|
+
# @deprecated Use `message.id` instead.
|
|
49
55
|
#
|
|
50
|
-
#
|
|
51
|
-
|
|
56
|
+
# Deprecated. The unique identifier for the message that contained the link.
|
|
57
|
+
#
|
|
58
|
+
# @return [String, nil]
|
|
59
|
+
required :message_id, String, nil?: true
|
|
52
60
|
|
|
53
61
|
# @!attribute url
|
|
54
62
|
# The original URL that was shortened
|
|
@@ -56,12 +64,14 @@ module SurgeAPI
|
|
|
56
64
|
# @return [String]
|
|
57
65
|
required :url, String
|
|
58
66
|
|
|
59
|
-
# @!method initialize(id:, message_id:, url:)
|
|
67
|
+
# @!method initialize(id:, message:, message_id:, url:)
|
|
60
68
|
# The data associated with the event
|
|
61
69
|
#
|
|
62
70
|
# @param id [String] The unique identifier for the link
|
|
63
71
|
#
|
|
64
|
-
# @param
|
|
72
|
+
# @param message [SurgeAPI::Models::Message, nil] A Message is a communication sent to a Contact.
|
|
73
|
+
#
|
|
74
|
+
# @param message_id [String, nil] Deprecated. The unique identifier for the message that contained the link.
|
|
65
75
|
#
|
|
66
76
|
# @param url [String] The original URL that was shortened
|
|
67
77
|
end
|
|
@@ -139,6 +139,12 @@ module SurgeAPI
|
|
|
139
139
|
# @return [String]
|
|
140
140
|
required :id, String
|
|
141
141
|
|
|
142
|
+
# @!attribute name
|
|
143
|
+
# A human-readable name for the phone number
|
|
144
|
+
#
|
|
145
|
+
# @return [String, nil]
|
|
146
|
+
required :name, String, nil?: true
|
|
147
|
+
|
|
142
148
|
# @!attribute number
|
|
143
149
|
# The canonical format of the phone number.
|
|
144
150
|
#
|
|
@@ -151,11 +157,13 @@ module SurgeAPI
|
|
|
151
157
|
# @return [Symbol, SurgeAPI::Models::Message::Conversation::PhoneNumber::Type]
|
|
152
158
|
required :type, enum: -> { SurgeAPI::Message::Conversation::PhoneNumber::Type }
|
|
153
159
|
|
|
154
|
-
# @!method initialize(id:, number:, type:)
|
|
160
|
+
# @!method initialize(id:, name:, number:, type:)
|
|
155
161
|
# This is the phone number tied to the Surge account.
|
|
156
162
|
#
|
|
157
163
|
# @param id [String] Unique identifier for the phone number
|
|
158
164
|
#
|
|
165
|
+
# @param name [String, nil] A human-readable name for the phone number
|
|
166
|
+
#
|
|
159
167
|
# @param number [String] The canonical format of the phone number.
|
|
160
168
|
#
|
|
161
169
|
# @param type [Symbol, SurgeAPI::Models::Message::Conversation::PhoneNumber::Type] Whether the phone number is local, toll-free, or short code
|
|
@@ -16,6 +16,12 @@ module SurgeAPI
|
|
|
16
16
|
# @return [String, nil]
|
|
17
17
|
required :campaign_id, String, nil?: true
|
|
18
18
|
|
|
19
|
+
# @!attribute name
|
|
20
|
+
# A human-readable name for the phone number
|
|
21
|
+
#
|
|
22
|
+
# @return [String, nil]
|
|
23
|
+
required :name, String, nil?: true
|
|
24
|
+
|
|
19
25
|
# @!attribute number
|
|
20
26
|
# The phone number in E.164 format
|
|
21
27
|
#
|
|
@@ -28,13 +34,15 @@ module SurgeAPI
|
|
|
28
34
|
# @return [Symbol, SurgeAPI::Models::PhoneNumber::Type]
|
|
29
35
|
required :type, enum: -> { SurgeAPI::PhoneNumber::Type }
|
|
30
36
|
|
|
31
|
-
# @!method initialize(id:, campaign_id:, number:, type:)
|
|
37
|
+
# @!method initialize(id:, campaign_id:, name:, number:, type:)
|
|
32
38
|
# A phone number that can be used to send and receive messages and calls
|
|
33
39
|
#
|
|
34
40
|
# @param id [String] Unique identifier for the phone number
|
|
35
41
|
#
|
|
36
42
|
# @param campaign_id [String, nil] The unique identifier of the campaign this phone number is attached to, if any
|
|
37
43
|
#
|
|
44
|
+
# @param name [String, nil] A human-readable name for the phone number
|
|
45
|
+
#
|
|
38
46
|
# @param number [String] The phone number in E.164 format
|
|
39
47
|
#
|
|
40
48
|
# @param type [Symbol, SurgeAPI::Models::PhoneNumber::Type] Whether the phone number is local, toll-free, or short code
|
|
@@ -54,6 +54,12 @@ module SurgeAPI
|
|
|
54
54
|
# @return [String]
|
|
55
55
|
required :campaign_id, String
|
|
56
56
|
|
|
57
|
+
# @!attribute name
|
|
58
|
+
# A human-readable name for the phone number
|
|
59
|
+
#
|
|
60
|
+
# @return [String, nil]
|
|
61
|
+
required :name, String, nil?: true
|
|
62
|
+
|
|
57
63
|
# @!attribute number
|
|
58
64
|
# The phone number in E.164 format
|
|
59
65
|
#
|
|
@@ -66,13 +72,15 @@ module SurgeAPI
|
|
|
66
72
|
# @return [Symbol, SurgeAPI::Models::PhoneNumberAttachedToCampaignWebhookEvent::Data::Type]
|
|
67
73
|
required :type, enum: -> { SurgeAPI::PhoneNumberAttachedToCampaignWebhookEvent::Data::Type }
|
|
68
74
|
|
|
69
|
-
# @!method initialize(id:, campaign_id:, number:, type:)
|
|
75
|
+
# @!method initialize(id:, campaign_id:, name:, number:, type:)
|
|
70
76
|
# The data associated with the event
|
|
71
77
|
#
|
|
72
78
|
# @param id [String] The unique identifier for the phone number
|
|
73
79
|
#
|
|
74
80
|
# @param campaign_id [String] The unique identifier of the campaign this phone number is attached to
|
|
75
81
|
#
|
|
82
|
+
# @param name [String, nil] A human-readable name for the phone number
|
|
83
|
+
#
|
|
76
84
|
# @param number [String] The phone number in E.164 format
|
|
77
85
|
#
|
|
78
86
|
# @param type [Symbol, SurgeAPI::Models::PhoneNumberAttachedToCampaignWebhookEvent::Data::Type] Whether the phone number is local, toll-free, or short code
|
|
@@ -28,6 +28,13 @@ module SurgeAPI
|
|
|
28
28
|
# @return [Float, nil]
|
|
29
29
|
optional :longitude, Float
|
|
30
30
|
|
|
31
|
+
# @!attribute name
|
|
32
|
+
# A human-readable name for the phone number. If not provided, defaults to the
|
|
33
|
+
# formatted phone number.
|
|
34
|
+
#
|
|
35
|
+
# @return [String, nil]
|
|
36
|
+
optional :name, String
|
|
37
|
+
|
|
31
38
|
# @!attribute type
|
|
32
39
|
# Whether the phone number is local or toll-free. Can be omitted if area_code or
|
|
33
40
|
# latitude/longitude are provided.
|
|
@@ -35,7 +42,7 @@ module SurgeAPI
|
|
|
35
42
|
# @return [Symbol, SurgeAPI::Models::PhoneNumberPurchaseParams::Type, nil]
|
|
36
43
|
optional :type, enum: -> { SurgeAPI::PhoneNumberPurchaseParams::Type }
|
|
37
44
|
|
|
38
|
-
# @!method initialize(area_code: nil, latitude: nil, longitude: nil, type: nil, request_options: {})
|
|
45
|
+
# @!method initialize(area_code: nil, latitude: nil, longitude: nil, name: nil, type: nil, request_options: {})
|
|
39
46
|
# Some parameter documentations has been truncated, see
|
|
40
47
|
# {SurgeAPI::Models::PhoneNumberPurchaseParams} for more details.
|
|
41
48
|
#
|
|
@@ -45,6 +52,8 @@ module SurgeAPI
|
|
|
45
52
|
#
|
|
46
53
|
# @param longitude [Float] Longitude to search for nearby phone numbers. Must be used with latitude. If pro
|
|
47
54
|
#
|
|
55
|
+
# @param name [String] A human-readable name for the phone number. If not provided, defaults to the for
|
|
56
|
+
#
|
|
48
57
|
# @param type [Symbol, SurgeAPI::Models::PhoneNumberPurchaseParams::Type] Whether the phone number is local or toll-free. Can be omitted if area_code or l
|
|
49
58
|
#
|
|
50
59
|
# @param request_options [SurgeAPI::RequestOptions, Hash{Symbol=>Object}]
|
data/lib/surge_api/models.rb
CHANGED
|
@@ -51,6 +51,8 @@ module SurgeAPI
|
|
|
51
51
|
|
|
52
52
|
AccountUpdateParams = SurgeAPI::Models::AccountUpdateParams
|
|
53
53
|
|
|
54
|
+
AttachmentGetFileParams = SurgeAPI::Models::AttachmentGetFileParams
|
|
55
|
+
|
|
54
56
|
AudienceAddContactParams = SurgeAPI::Models::AudienceAddContactParams
|
|
55
57
|
|
|
56
58
|
AudienceCreateParams = SurgeAPI::Models::AudienceCreateParams
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
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
|
+
#
|
|
9
|
+
# @overload get_file(attachment_id, request_options: {})
|
|
10
|
+
#
|
|
11
|
+
# @param attachment_id [String] The ID of the attachment.
|
|
12
|
+
#
|
|
13
|
+
# @param request_options [SurgeAPI::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
14
|
+
#
|
|
15
|
+
# @return [SurgeAPI::Models::AttachmentGetFileResponse]
|
|
16
|
+
#
|
|
17
|
+
# @see SurgeAPI::Models::AttachmentGetFileParams
|
|
18
|
+
def get_file(attachment_id, params = {})
|
|
19
|
+
@client.request(
|
|
20
|
+
method: :get,
|
|
21
|
+
path: ["attachments/%1$s/file", attachment_id],
|
|
22
|
+
model: SurgeAPI::Models::AttachmentGetFileResponse,
|
|
23
|
+
options: params[:request_options]
|
|
24
|
+
)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# @api private
|
|
28
|
+
#
|
|
29
|
+
# @param client [SurgeAPI::Client]
|
|
30
|
+
def initialize(client:)
|
|
31
|
+
@client = client
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -40,7 +40,7 @@ module SurgeAPI
|
|
|
40
40
|
# Purchase a new phone number for the account. You can specify search criteria or
|
|
41
41
|
# let the system select a random number.
|
|
42
42
|
#
|
|
43
|
-
# @overload purchase(account_id, area_code: nil, latitude: nil, longitude: nil, type: nil, request_options: {})
|
|
43
|
+
# @overload purchase(account_id, area_code: nil, latitude: nil, longitude: nil, name: nil, type: nil, request_options: {})
|
|
44
44
|
#
|
|
45
45
|
# @param account_id [String] The account for which the phone number should be created.
|
|
46
46
|
#
|
|
@@ -50,6 +50,8 @@ module SurgeAPI
|
|
|
50
50
|
#
|
|
51
51
|
# @param longitude [Float] Longitude to search for nearby phone numbers. Must be used with latitude. If pro
|
|
52
52
|
#
|
|
53
|
+
# @param name [String] A human-readable name for the phone number. If not provided, defaults to the for
|
|
54
|
+
#
|
|
53
55
|
# @param type [Symbol, SurgeAPI::Models::PhoneNumberPurchaseParams::Type] Whether the phone number is local or toll-free. Can be omitted if area_code or l
|
|
54
56
|
#
|
|
55
57
|
# @param request_options [SurgeAPI::RequestOptions, Hash{Symbol=>Object}, nil]
|
data/lib/surge_api/version.rb
CHANGED
data/lib/surge_api.rb
CHANGED
|
@@ -61,6 +61,8 @@ require_relative "surge_api/models/account_create_params"
|
|
|
61
61
|
require_relative "surge_api/models/account_retrieve_status_params"
|
|
62
62
|
require_relative "surge_api/models/account_status"
|
|
63
63
|
require_relative "surge_api/models/account_update_params"
|
|
64
|
+
require_relative "surge_api/models/attachment_get_file_params"
|
|
65
|
+
require_relative "surge_api/models/attachment_get_file_response"
|
|
64
66
|
require_relative "surge_api/models/audience_add_contact_params"
|
|
65
67
|
require_relative "surge_api/models/audience_create_params"
|
|
66
68
|
require_relative "surge_api/models/audience_create_response"
|
|
@@ -123,6 +125,7 @@ require_relative "surge_api/models/voicemail_received_webhook_event"
|
|
|
123
125
|
require_relative "surge_api/models/webhook_unwrap_params"
|
|
124
126
|
require_relative "surge_api/models"
|
|
125
127
|
require_relative "surge_api/resources/accounts"
|
|
128
|
+
require_relative "surge_api/resources/attachments"
|
|
126
129
|
require_relative "surge_api/resources/audiences"
|
|
127
130
|
require_relative "surge_api/resources/blasts"
|
|
128
131
|
require_relative "surge_api/resources/campaigns"
|
data/rbi/surge_api/client.rbi
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module SurgeAPI
|
|
4
|
+
module Models
|
|
5
|
+
class AttachmentGetFileParams < 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::AttachmentGetFileParams, SurgeAPI::Internal::AnyHash)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
sig do
|
|
15
|
+
params(request_options: SurgeAPI::RequestOptions::OrHash).returns(
|
|
16
|
+
T.attached_class
|
|
17
|
+
)
|
|
18
|
+
end
|
|
19
|
+
def self.new(request_options: {})
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
sig { override.returns({ request_options: SurgeAPI::RequestOptions }) }
|
|
23
|
+
def to_hash
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module SurgeAPI
|
|
4
|
+
module Models
|
|
5
|
+
class AttachmentGetFileResponse < SurgeAPI::Internal::Type::BaseModel
|
|
6
|
+
OrHash =
|
|
7
|
+
T.type_alias do
|
|
8
|
+
T.any(
|
|
9
|
+
SurgeAPI::Models::AttachmentGetFileResponse,
|
|
10
|
+
SurgeAPI::Internal::AnyHash
|
|
11
|
+
)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# An error response
|
|
15
|
+
sig { returns(SurgeAPI::Error) }
|
|
16
|
+
attr_reader :error
|
|
17
|
+
|
|
18
|
+
sig { params(error: SurgeAPI::Error::OrHash).void }
|
|
19
|
+
attr_writer :error
|
|
20
|
+
|
|
21
|
+
# An error response
|
|
22
|
+
sig { params(error: SurgeAPI::Error::OrHash).returns(T.attached_class) }
|
|
23
|
+
def self.new(
|
|
24
|
+
# An error response
|
|
25
|
+
error:
|
|
26
|
+
)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
sig { override.returns({ error: SurgeAPI::Error }) }
|
|
30
|
+
def to_hash
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -75,8 +75,15 @@ module SurgeAPI
|
|
|
75
75
|
sig { returns(String) }
|
|
76
76
|
attr_accessor :id
|
|
77
77
|
|
|
78
|
-
#
|
|
79
|
-
sig { returns(
|
|
78
|
+
# A Message is a communication sent to a Contact.
|
|
79
|
+
sig { returns(T.nilable(SurgeAPI::Message)) }
|
|
80
|
+
attr_reader :message
|
|
81
|
+
|
|
82
|
+
sig { params(message: T.nilable(SurgeAPI::Message::OrHash)).void }
|
|
83
|
+
attr_writer :message
|
|
84
|
+
|
|
85
|
+
# Deprecated. The unique identifier for the message that contained the link.
|
|
86
|
+
sig { returns(T.nilable(String)) }
|
|
80
87
|
attr_accessor :message_id
|
|
81
88
|
|
|
82
89
|
# The original URL that was shortened
|
|
@@ -85,14 +92,19 @@ module SurgeAPI
|
|
|
85
92
|
|
|
86
93
|
# The data associated with the event
|
|
87
94
|
sig do
|
|
88
|
-
params(
|
|
89
|
-
|
|
90
|
-
|
|
95
|
+
params(
|
|
96
|
+
id: String,
|
|
97
|
+
message: T.nilable(SurgeAPI::Message::OrHash),
|
|
98
|
+
message_id: T.nilable(String),
|
|
99
|
+
url: String
|
|
100
|
+
).returns(T.attached_class)
|
|
91
101
|
end
|
|
92
102
|
def self.new(
|
|
93
103
|
# The unique identifier for the link
|
|
94
104
|
id:,
|
|
95
|
-
#
|
|
105
|
+
# A Message is a communication sent to a Contact.
|
|
106
|
+
message:,
|
|
107
|
+
# Deprecated. The unique identifier for the message that contained the link.
|
|
96
108
|
message_id:,
|
|
97
109
|
# The original URL that was shortened
|
|
98
110
|
url:
|
|
@@ -100,7 +112,14 @@ module SurgeAPI
|
|
|
100
112
|
end
|
|
101
113
|
|
|
102
114
|
sig do
|
|
103
|
-
override.returns(
|
|
115
|
+
override.returns(
|
|
116
|
+
{
|
|
117
|
+
id: String,
|
|
118
|
+
message: T.nilable(SurgeAPI::Message),
|
|
119
|
+
message_id: T.nilable(String),
|
|
120
|
+
url: String
|
|
121
|
+
}
|
|
122
|
+
)
|
|
104
123
|
end
|
|
105
124
|
def to_hash
|
|
106
125
|
end
|
|
@@ -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
|
@@ -13,6 +13,8 @@ module SurgeAPI
|
|
|
13
13
|
|
|
14
14
|
AccountUpdateParams = SurgeAPI::Models::AccountUpdateParams
|
|
15
15
|
|
|
16
|
+
AttachmentGetFileParams = SurgeAPI::Models::AttachmentGetFileParams
|
|
17
|
+
|
|
16
18
|
AudienceAddContactParams = SurgeAPI::Models::AudienceAddContactParams
|
|
17
19
|
|
|
18
20
|
AudienceCreateParams = SurgeAPI::Models::AudienceCreateParams
|
|
@@ -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,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
|
@@ -11,6 +11,8 @@ module SurgeAPI
|
|
|
11
11
|
|
|
12
12
|
class AccountUpdateParams = SurgeAPI::Models::AccountUpdateParams
|
|
13
13
|
|
|
14
|
+
class AttachmentGetFileParams = SurgeAPI::Models::AttachmentGetFileParams
|
|
15
|
+
|
|
14
16
|
class AudienceAddContactParams = SurgeAPI::Models::AudienceAddContactParams
|
|
15
17
|
|
|
16
18
|
class AudienceCreateParams = SurgeAPI::Models::AudienceCreateParams
|
|
@@ -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.16.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-04-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|
|
@@ -76,6 +76,8 @@ files:
|
|
|
76
76
|
- lib/surge_api/models/account_retrieve_status_params.rb
|
|
77
77
|
- lib/surge_api/models/account_status.rb
|
|
78
78
|
- lib/surge_api/models/account_update_params.rb
|
|
79
|
+
- lib/surge_api/models/attachment_get_file_params.rb
|
|
80
|
+
- lib/surge_api/models/attachment_get_file_response.rb
|
|
79
81
|
- lib/surge_api/models/audience_add_contact_params.rb
|
|
80
82
|
- lib/surge_api/models/audience_create_params.rb
|
|
81
83
|
- lib/surge_api/models/audience_create_response.rb
|
|
@@ -140,6 +142,7 @@ files:
|
|
|
140
142
|
- lib/surge_api/models/webhook_unwrap_params.rb
|
|
141
143
|
- lib/surge_api/request_options.rb
|
|
142
144
|
- lib/surge_api/resources/accounts.rb
|
|
145
|
+
- lib/surge_api/resources/attachments.rb
|
|
143
146
|
- lib/surge_api/resources/audiences.rb
|
|
144
147
|
- lib/surge_api/resources/blasts.rb
|
|
145
148
|
- lib/surge_api/resources/campaigns.rb
|
|
@@ -178,6 +181,8 @@ files:
|
|
|
178
181
|
- rbi/surge_api/models/account_retrieve_status_params.rbi
|
|
179
182
|
- rbi/surge_api/models/account_status.rbi
|
|
180
183
|
- rbi/surge_api/models/account_update_params.rbi
|
|
184
|
+
- rbi/surge_api/models/attachment_get_file_params.rbi
|
|
185
|
+
- rbi/surge_api/models/attachment_get_file_response.rbi
|
|
181
186
|
- rbi/surge_api/models/audience_add_contact_params.rbi
|
|
182
187
|
- rbi/surge_api/models/audience_create_params.rbi
|
|
183
188
|
- rbi/surge_api/models/audience_create_response.rbi
|
|
@@ -242,6 +247,7 @@ files:
|
|
|
242
247
|
- rbi/surge_api/models/webhook_unwrap_params.rbi
|
|
243
248
|
- rbi/surge_api/request_options.rbi
|
|
244
249
|
- rbi/surge_api/resources/accounts.rbi
|
|
250
|
+
- rbi/surge_api/resources/attachments.rbi
|
|
245
251
|
- rbi/surge_api/resources/audiences.rbi
|
|
246
252
|
- rbi/surge_api/resources/blasts.rbi
|
|
247
253
|
- rbi/surge_api/resources/campaigns.rbi
|
|
@@ -279,6 +285,8 @@ files:
|
|
|
279
285
|
- sig/surge_api/models/account_retrieve_status_params.rbs
|
|
280
286
|
- sig/surge_api/models/account_status.rbs
|
|
281
287
|
- sig/surge_api/models/account_update_params.rbs
|
|
288
|
+
- sig/surge_api/models/attachment_get_file_params.rbs
|
|
289
|
+
- sig/surge_api/models/attachment_get_file_response.rbs
|
|
282
290
|
- sig/surge_api/models/audience_add_contact_params.rbs
|
|
283
291
|
- sig/surge_api/models/audience_create_params.rbs
|
|
284
292
|
- sig/surge_api/models/audience_create_response.rbs
|
|
@@ -343,6 +351,7 @@ files:
|
|
|
343
351
|
- sig/surge_api/models/webhook_unwrap_params.rbs
|
|
344
352
|
- sig/surge_api/request_options.rbs
|
|
345
353
|
- sig/surge_api/resources/accounts.rbs
|
|
354
|
+
- sig/surge_api/resources/attachments.rbs
|
|
346
355
|
- sig/surge_api/resources/audiences.rbs
|
|
347
356
|
- sig/surge_api/resources/blasts.rbs
|
|
348
357
|
- sig/surge_api/resources/campaigns.rbs
|