surge_api 0.19.0 → 0.20.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 +11 -0
- data/README.md +7 -7
- data/lib/surge_api/models/phone_number.rb +55 -4
- data/lib/surge_api/models/phone_number_attached_to_campaign_webhook_event.rb +60 -3
- data/lib/surge_api/models/phone_number_list_available_numbers_params.rb +88 -0
- data/lib/surge_api/models/phone_number_list_available_numbers_response.rb +61 -0
- data/lib/surge_api/models/phone_number_purchase_params.rb +10 -1
- data/lib/surge_api/models/phone_number_retrieve_params.rb +22 -0
- data/lib/surge_api/models.rb +4 -0
- data/lib/surge_api/resources/phone_numbers.rb +66 -3
- data/lib/surge_api/version.rb +1 -1
- data/lib/surge_api.rb +3 -0
- data/rbi/surge_api/models/phone_number.rbi +108 -2
- data/rbi/surge_api/models/phone_number_attached_to_campaign_webhook_event.rbi +129 -2
- data/rbi/surge_api/models/phone_number_list_available_numbers_params.rbi +183 -0
- data/rbi/surge_api/models/phone_number_list_available_numbers_response.rbi +139 -0
- data/rbi/surge_api/models/phone_number_purchase_params.rbi +13 -0
- data/rbi/surge_api/models/phone_number_retrieve_params.rbi +43 -0
- data/rbi/surge_api/models.rbi +5 -0
- data/rbi/surge_api/resources/phone_numbers.rbi +59 -2
- data/sig/surge_api/models/phone_number.rbs +41 -0
- data/sig/surge_api/models/phone_number_attached_to_campaign_webhook_event.rbs +41 -0
- data/sig/surge_api/models/phone_number_list_available_numbers_params.rbs +83 -0
- data/sig/surge_api/models/phone_number_list_available_numbers_response.rbs +52 -0
- data/sig/surge_api/models/phone_number_purchase_params.rbs +7 -0
- data/sig/surge_api/models/phone_number_retrieve_params.rbs +20 -0
- data/sig/surge_api/models.rbs +4 -0
- data/sig/surge_api/resources/phone_numbers.rbs +16 -0
- metadata +11 -2
data/rbi/surge_api/models.rbi
CHANGED
|
@@ -89,12 +89,17 @@ module SurgeAPI
|
|
|
89
89
|
PhoneNumberAttachedToCampaignWebhookEvent =
|
|
90
90
|
SurgeAPI::Models::PhoneNumberAttachedToCampaignWebhookEvent
|
|
91
91
|
|
|
92
|
+
PhoneNumberListAvailableNumbersParams =
|
|
93
|
+
SurgeAPI::Models::PhoneNumberListAvailableNumbersParams
|
|
94
|
+
|
|
92
95
|
PhoneNumberListParams = SurgeAPI::Models::PhoneNumberListParams
|
|
93
96
|
|
|
94
97
|
PhoneNumberPurchaseParams = SurgeAPI::Models::PhoneNumberPurchaseParams
|
|
95
98
|
|
|
96
99
|
PhoneNumberReleaseParams = SurgeAPI::Models::PhoneNumberReleaseParams
|
|
97
100
|
|
|
101
|
+
PhoneNumberRetrieveParams = SurgeAPI::Models::PhoneNumberRetrieveParams
|
|
102
|
+
|
|
98
103
|
PhoneNumberUpdateParams = SurgeAPI::Models::PhoneNumberUpdateParams
|
|
99
104
|
|
|
100
105
|
RecordingCompletedWebhookEvent =
|
|
@@ -3,6 +3,20 @@
|
|
|
3
3
|
module SurgeAPI
|
|
4
4
|
module Resources
|
|
5
5
|
class PhoneNumbers
|
|
6
|
+
# Retrieves a PhoneNumber object.
|
|
7
|
+
sig do
|
|
8
|
+
params(
|
|
9
|
+
id: String,
|
|
10
|
+
request_options: SurgeAPI::RequestOptions::OrHash
|
|
11
|
+
).returns(SurgeAPI::PhoneNumber)
|
|
12
|
+
end
|
|
13
|
+
def retrieve(
|
|
14
|
+
# The ID of the phone number to retrieve.
|
|
15
|
+
id,
|
|
16
|
+
request_options: {}
|
|
17
|
+
)
|
|
18
|
+
end
|
|
19
|
+
|
|
6
20
|
# Updates a phone number's details.
|
|
7
21
|
sig do
|
|
8
22
|
params(
|
|
@@ -44,8 +58,47 @@ module SurgeAPI
|
|
|
44
58
|
)
|
|
45
59
|
end
|
|
46
60
|
|
|
47
|
-
#
|
|
48
|
-
#
|
|
61
|
+
# Browse purchasable phone numbers from Surge inventory before buying.
|
|
62
|
+
#
|
|
63
|
+
# Pagination cursors are always null for now.
|
|
64
|
+
sig do
|
|
65
|
+
params(
|
|
66
|
+
account_id: String,
|
|
67
|
+
type: SurgeAPI::PhoneNumberListAvailableNumbersParams::Type::OrSymbol,
|
|
68
|
+
after: String,
|
|
69
|
+
area_code: String,
|
|
70
|
+
before: String,
|
|
71
|
+
country:
|
|
72
|
+
SurgeAPI::PhoneNumberListAvailableNumbersParams::Country::OrSymbol,
|
|
73
|
+
request_options: SurgeAPI::RequestOptions::OrHash
|
|
74
|
+
).returns(
|
|
75
|
+
SurgeAPI::Internal::Cursor[
|
|
76
|
+
SurgeAPI::Models::PhoneNumberListAvailableNumbersResponse
|
|
77
|
+
]
|
|
78
|
+
)
|
|
79
|
+
end
|
|
80
|
+
def list_available_numbers(
|
|
81
|
+
# The account ID to list available phone numbers for.
|
|
82
|
+
account_id,
|
|
83
|
+
# Whether to search for local or toll-free numbers.
|
|
84
|
+
type:,
|
|
85
|
+
# Cursor for forward pagination. Use the next_cursor from a previous response.
|
|
86
|
+
after: nil,
|
|
87
|
+
# Filter by 3-digit area code.
|
|
88
|
+
area_code: nil,
|
|
89
|
+
# Cursor for backward pagination. Use the previous_cursor from a previous
|
|
90
|
+
# response.
|
|
91
|
+
before: nil,
|
|
92
|
+
# ISO country code to search in.
|
|
93
|
+
country: nil,
|
|
94
|
+
request_options: {}
|
|
95
|
+
)
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Purchase a new phone number for the account. You can specify an exact phone
|
|
99
|
+
# number, search criteria, or let the system select a random number.
|
|
100
|
+
#
|
|
101
|
+
# When `phone_number` is provided, all other search parameters are ignored.
|
|
49
102
|
sig do
|
|
50
103
|
params(
|
|
51
104
|
account_id: String,
|
|
@@ -53,6 +106,7 @@ module SurgeAPI
|
|
|
53
106
|
latitude: Float,
|
|
54
107
|
longitude: Float,
|
|
55
108
|
name: String,
|
|
109
|
+
phone_number: String,
|
|
56
110
|
type: SurgeAPI::PhoneNumberPurchaseParams::Type::OrSymbol,
|
|
57
111
|
request_options: SurgeAPI::RequestOptions::OrHash
|
|
58
112
|
).returns(SurgeAPI::PhoneNumber)
|
|
@@ -72,6 +126,9 @@ module SurgeAPI
|
|
|
72
126
|
# A human-readable name for the phone number. If not provided, defaults to the
|
|
73
127
|
# formatted phone number.
|
|
74
128
|
name: nil,
|
|
129
|
+
# The exact phone number to purchase in E.164 format. When provided, all other
|
|
130
|
+
# search parameters are ignored.
|
|
131
|
+
phone_number: nil,
|
|
75
132
|
# Whether the phone number is local or toll-free. Can be omitted if area_code or
|
|
76
133
|
# latitude/longitude are provided.
|
|
77
134
|
type: nil,
|
|
@@ -3,6 +3,7 @@ module SurgeAPI
|
|
|
3
3
|
type phone_number =
|
|
4
4
|
{
|
|
5
5
|
id: String,
|
|
6
|
+
campaign: SurgeAPI::PhoneNumber::Campaign?,
|
|
6
7
|
campaign_id: String?,
|
|
7
8
|
name: String?,
|
|
8
9
|
number: String,
|
|
@@ -12,6 +13,8 @@ module SurgeAPI
|
|
|
12
13
|
class PhoneNumber < SurgeAPI::Internal::Type::BaseModel
|
|
13
14
|
attr_accessor id: String
|
|
14
15
|
|
|
16
|
+
attr_accessor campaign: SurgeAPI::PhoneNumber::Campaign?
|
|
17
|
+
|
|
15
18
|
attr_accessor campaign_id: String?
|
|
16
19
|
|
|
17
20
|
attr_accessor name: String?
|
|
@@ -22,6 +25,7 @@ module SurgeAPI
|
|
|
22
25
|
|
|
23
26
|
def initialize: (
|
|
24
27
|
id: String,
|
|
28
|
+
campaign: SurgeAPI::PhoneNumber::Campaign?,
|
|
25
29
|
campaign_id: String?,
|
|
26
30
|
name: String?,
|
|
27
31
|
number: String,
|
|
@@ -30,12 +34,49 @@ module SurgeAPI
|
|
|
30
34
|
|
|
31
35
|
def to_hash: -> {
|
|
32
36
|
id: String,
|
|
37
|
+
campaign: SurgeAPI::PhoneNumber::Campaign?,
|
|
33
38
|
campaign_id: String?,
|
|
34
39
|
name: String?,
|
|
35
40
|
number: String,
|
|
36
41
|
type: SurgeAPI::Models::PhoneNumber::type_
|
|
37
42
|
}
|
|
38
43
|
|
|
44
|
+
type campaign =
|
|
45
|
+
{
|
|
46
|
+
id: String,
|
|
47
|
+
attachment_status: SurgeAPI::Models::PhoneNumber::Campaign::attachment_status
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
class Campaign < SurgeAPI::Internal::Type::BaseModel
|
|
51
|
+
attr_accessor id: String
|
|
52
|
+
|
|
53
|
+
attr_accessor attachment_status: SurgeAPI::Models::PhoneNumber::Campaign::attachment_status
|
|
54
|
+
|
|
55
|
+
def initialize: (
|
|
56
|
+
id: String,
|
|
57
|
+
attachment_status: SurgeAPI::Models::PhoneNumber::Campaign::attachment_status
|
|
58
|
+
) -> void
|
|
59
|
+
|
|
60
|
+
def to_hash: -> {
|
|
61
|
+
id: String,
|
|
62
|
+
attachment_status: SurgeAPI::Models::PhoneNumber::Campaign::attachment_status
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
type attachment_status =
|
|
66
|
+
:attached | :attachment_pending | :detached | :detachment_pending
|
|
67
|
+
|
|
68
|
+
module AttachmentStatus
|
|
69
|
+
extend SurgeAPI::Internal::Type::Enum
|
|
70
|
+
|
|
71
|
+
ATTACHED: :attached
|
|
72
|
+
ATTACHMENT_PENDING: :attachment_pending
|
|
73
|
+
DETACHED: :detached
|
|
74
|
+
DETACHMENT_PENDING: :detachment_pending
|
|
75
|
+
|
|
76
|
+
def self?.values: -> ::Array[SurgeAPI::Models::PhoneNumber::Campaign::attachment_status]
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
39
80
|
type type_ = :local | :short_code | :toll_free
|
|
40
81
|
|
|
41
82
|
module Type
|
|
@@ -34,6 +34,7 @@ module SurgeAPI
|
|
|
34
34
|
type data =
|
|
35
35
|
{
|
|
36
36
|
id: String,
|
|
37
|
+
campaign: SurgeAPI::PhoneNumberAttachedToCampaignWebhookEvent::Data::Campaign?,
|
|
37
38
|
campaign_id: String,
|
|
38
39
|
name: String?,
|
|
39
40
|
number: String,
|
|
@@ -43,6 +44,8 @@ module SurgeAPI
|
|
|
43
44
|
class Data < SurgeAPI::Internal::Type::BaseModel
|
|
44
45
|
attr_accessor id: String
|
|
45
46
|
|
|
47
|
+
attr_accessor campaign: SurgeAPI::PhoneNumberAttachedToCampaignWebhookEvent::Data::Campaign?
|
|
48
|
+
|
|
46
49
|
attr_accessor campaign_id: String
|
|
47
50
|
|
|
48
51
|
attr_accessor name: String?
|
|
@@ -53,6 +56,7 @@ module SurgeAPI
|
|
|
53
56
|
|
|
54
57
|
def initialize: (
|
|
55
58
|
id: String,
|
|
59
|
+
campaign: SurgeAPI::PhoneNumberAttachedToCampaignWebhookEvent::Data::Campaign?,
|
|
56
60
|
campaign_id: String,
|
|
57
61
|
name: String?,
|
|
58
62
|
number: String,
|
|
@@ -61,12 +65,49 @@ module SurgeAPI
|
|
|
61
65
|
|
|
62
66
|
def to_hash: -> {
|
|
63
67
|
id: String,
|
|
68
|
+
campaign: SurgeAPI::PhoneNumberAttachedToCampaignWebhookEvent::Data::Campaign?,
|
|
64
69
|
campaign_id: String,
|
|
65
70
|
name: String?,
|
|
66
71
|
number: String,
|
|
67
72
|
type: SurgeAPI::Models::PhoneNumberAttachedToCampaignWebhookEvent::Data::type_
|
|
68
73
|
}
|
|
69
74
|
|
|
75
|
+
type campaign =
|
|
76
|
+
{
|
|
77
|
+
id: String,
|
|
78
|
+
attachment_status: SurgeAPI::Models::PhoneNumberAttachedToCampaignWebhookEvent::Data::Campaign::attachment_status
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
class Campaign < SurgeAPI::Internal::Type::BaseModel
|
|
82
|
+
attr_accessor id: String
|
|
83
|
+
|
|
84
|
+
attr_accessor attachment_status: SurgeAPI::Models::PhoneNumberAttachedToCampaignWebhookEvent::Data::Campaign::attachment_status
|
|
85
|
+
|
|
86
|
+
def initialize: (
|
|
87
|
+
id: String,
|
|
88
|
+
attachment_status: SurgeAPI::Models::PhoneNumberAttachedToCampaignWebhookEvent::Data::Campaign::attachment_status
|
|
89
|
+
) -> void
|
|
90
|
+
|
|
91
|
+
def to_hash: -> {
|
|
92
|
+
id: String,
|
|
93
|
+
attachment_status: SurgeAPI::Models::PhoneNumberAttachedToCampaignWebhookEvent::Data::Campaign::attachment_status
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
type attachment_status =
|
|
97
|
+
:attached | :attachment_pending | :detached | :detachment_pending
|
|
98
|
+
|
|
99
|
+
module AttachmentStatus
|
|
100
|
+
extend SurgeAPI::Internal::Type::Enum
|
|
101
|
+
|
|
102
|
+
ATTACHED: :attached
|
|
103
|
+
ATTACHMENT_PENDING: :attachment_pending
|
|
104
|
+
DETACHED: :detached
|
|
105
|
+
DETACHMENT_PENDING: :detachment_pending
|
|
106
|
+
|
|
107
|
+
def self?.values: -> ::Array[SurgeAPI::Models::PhoneNumberAttachedToCampaignWebhookEvent::Data::Campaign::attachment_status]
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
70
111
|
type type_ = :local | :short_code | :toll_free
|
|
71
112
|
|
|
72
113
|
module Type
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
module SurgeAPI
|
|
2
|
+
module Models
|
|
3
|
+
type phone_number_list_available_numbers_params =
|
|
4
|
+
{
|
|
5
|
+
account_id: String,
|
|
6
|
+
type: SurgeAPI::Models::PhoneNumberListAvailableNumbersParams::type_,
|
|
7
|
+
after: String,
|
|
8
|
+
area_code: String,
|
|
9
|
+
before: String,
|
|
10
|
+
country: SurgeAPI::Models::PhoneNumberListAvailableNumbersParams::country
|
|
11
|
+
}
|
|
12
|
+
& SurgeAPI::Internal::Type::request_parameters
|
|
13
|
+
|
|
14
|
+
class PhoneNumberListAvailableNumbersParams < SurgeAPI::Internal::Type::BaseModel
|
|
15
|
+
extend SurgeAPI::Internal::Type::RequestParameters::Converter
|
|
16
|
+
include SurgeAPI::Internal::Type::RequestParameters
|
|
17
|
+
|
|
18
|
+
attr_accessor account_id: String
|
|
19
|
+
|
|
20
|
+
attr_accessor type: SurgeAPI::Models::PhoneNumberListAvailableNumbersParams::type_
|
|
21
|
+
|
|
22
|
+
attr_reader after: String?
|
|
23
|
+
|
|
24
|
+
def after=: (String) -> String
|
|
25
|
+
|
|
26
|
+
attr_reader area_code: String?
|
|
27
|
+
|
|
28
|
+
def area_code=: (String) -> String
|
|
29
|
+
|
|
30
|
+
attr_reader before: String?
|
|
31
|
+
|
|
32
|
+
def before=: (String) -> String
|
|
33
|
+
|
|
34
|
+
attr_reader country: SurgeAPI::Models::PhoneNumberListAvailableNumbersParams::country?
|
|
35
|
+
|
|
36
|
+
def country=: (
|
|
37
|
+
SurgeAPI::Models::PhoneNumberListAvailableNumbersParams::country
|
|
38
|
+
) -> SurgeAPI::Models::PhoneNumberListAvailableNumbersParams::country
|
|
39
|
+
|
|
40
|
+
def initialize: (
|
|
41
|
+
account_id: String,
|
|
42
|
+
type: SurgeAPI::Models::PhoneNumberListAvailableNumbersParams::type_,
|
|
43
|
+
?after: String,
|
|
44
|
+
?area_code: String,
|
|
45
|
+
?before: String,
|
|
46
|
+
?country: SurgeAPI::Models::PhoneNumberListAvailableNumbersParams::country,
|
|
47
|
+
?request_options: SurgeAPI::request_opts
|
|
48
|
+
) -> void
|
|
49
|
+
|
|
50
|
+
def to_hash: -> {
|
|
51
|
+
account_id: String,
|
|
52
|
+
type: SurgeAPI::Models::PhoneNumberListAvailableNumbersParams::type_,
|
|
53
|
+
after: String,
|
|
54
|
+
area_code: String,
|
|
55
|
+
before: String,
|
|
56
|
+
country: SurgeAPI::Models::PhoneNumberListAvailableNumbersParams::country,
|
|
57
|
+
request_options: SurgeAPI::RequestOptions
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
type type_ = :local | :toll_free
|
|
61
|
+
|
|
62
|
+
module Type
|
|
63
|
+
extend SurgeAPI::Internal::Type::Enum
|
|
64
|
+
|
|
65
|
+
LOCAL: :local
|
|
66
|
+
TOLL_FREE: :toll_free
|
|
67
|
+
|
|
68
|
+
def self?.values: -> ::Array[SurgeAPI::Models::PhoneNumberListAvailableNumbersParams::type_]
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
type country = :US | :CA
|
|
72
|
+
|
|
73
|
+
module Country
|
|
74
|
+
extend SurgeAPI::Internal::Type::Enum
|
|
75
|
+
|
|
76
|
+
US: :US
|
|
77
|
+
CA: :CA
|
|
78
|
+
|
|
79
|
+
def self?.values: -> ::Array[SurgeAPI::Models::PhoneNumberListAvailableNumbersParams::country]
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
module SurgeAPI
|
|
2
|
+
module Models
|
|
3
|
+
type phone_number_list_available_numbers_response =
|
|
4
|
+
{
|
|
5
|
+
country: SurgeAPI::Models::PhoneNumberListAvailableNumbersResponse::country,
|
|
6
|
+
number: String,
|
|
7
|
+
type: SurgeAPI::Models::PhoneNumberListAvailableNumbersResponse::type_
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
class PhoneNumberListAvailableNumbersResponse < SurgeAPI::Internal::Type::BaseModel
|
|
11
|
+
attr_accessor country: SurgeAPI::Models::PhoneNumberListAvailableNumbersResponse::country
|
|
12
|
+
|
|
13
|
+
attr_accessor number: String
|
|
14
|
+
|
|
15
|
+
attr_accessor type: SurgeAPI::Models::PhoneNumberListAvailableNumbersResponse::type_
|
|
16
|
+
|
|
17
|
+
def initialize: (
|
|
18
|
+
country: SurgeAPI::Models::PhoneNumberListAvailableNumbersResponse::country,
|
|
19
|
+
number: String,
|
|
20
|
+
type: SurgeAPI::Models::PhoneNumberListAvailableNumbersResponse::type_
|
|
21
|
+
) -> void
|
|
22
|
+
|
|
23
|
+
def to_hash: -> {
|
|
24
|
+
country: SurgeAPI::Models::PhoneNumberListAvailableNumbersResponse::country,
|
|
25
|
+
number: String,
|
|
26
|
+
type: SurgeAPI::Models::PhoneNumberListAvailableNumbersResponse::type_
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
type country = :US | :CA
|
|
30
|
+
|
|
31
|
+
module Country
|
|
32
|
+
extend SurgeAPI::Internal::Type::Enum
|
|
33
|
+
|
|
34
|
+
US: :US
|
|
35
|
+
CA: :CA
|
|
36
|
+
|
|
37
|
+
def self?.values: -> ::Array[SurgeAPI::Models::PhoneNumberListAvailableNumbersResponse::country]
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
type type_ = :local | :toll_free
|
|
41
|
+
|
|
42
|
+
module Type
|
|
43
|
+
extend SurgeAPI::Internal::Type::Enum
|
|
44
|
+
|
|
45
|
+
LOCAL: :local
|
|
46
|
+
TOLL_FREE: :toll_free
|
|
47
|
+
|
|
48
|
+
def self?.values: -> ::Array[SurgeAPI::Models::PhoneNumberListAvailableNumbersResponse::type_]
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
@@ -7,6 +7,7 @@ module SurgeAPI
|
|
|
7
7
|
latitude: Float,
|
|
8
8
|
longitude: Float,
|
|
9
9
|
name: String,
|
|
10
|
+
phone_number: String,
|
|
10
11
|
type: SurgeAPI::Models::PhoneNumberPurchaseParams::type_
|
|
11
12
|
}
|
|
12
13
|
& SurgeAPI::Internal::Type::request_parameters
|
|
@@ -33,6 +34,10 @@ module SurgeAPI
|
|
|
33
34
|
|
|
34
35
|
def name=: (String) -> String
|
|
35
36
|
|
|
37
|
+
attr_reader phone_number: String?
|
|
38
|
+
|
|
39
|
+
def phone_number=: (String) -> String
|
|
40
|
+
|
|
36
41
|
attr_reader type: SurgeAPI::Models::PhoneNumberPurchaseParams::type_?
|
|
37
42
|
|
|
38
43
|
def type=: (
|
|
@@ -45,6 +50,7 @@ module SurgeAPI
|
|
|
45
50
|
?latitude: Float,
|
|
46
51
|
?longitude: Float,
|
|
47
52
|
?name: String,
|
|
53
|
+
?phone_number: String,
|
|
48
54
|
?type: SurgeAPI::Models::PhoneNumberPurchaseParams::type_,
|
|
49
55
|
?request_options: SurgeAPI::request_opts
|
|
50
56
|
) -> void
|
|
@@ -55,6 +61,7 @@ module SurgeAPI
|
|
|
55
61
|
latitude: Float,
|
|
56
62
|
longitude: Float,
|
|
57
63
|
name: String,
|
|
64
|
+
phone_number: String,
|
|
58
65
|
type: SurgeAPI::Models::PhoneNumberPurchaseParams::type_,
|
|
59
66
|
request_options: SurgeAPI::RequestOptions
|
|
60
67
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
module SurgeAPI
|
|
2
|
+
module Models
|
|
3
|
+
type phone_number_retrieve_params =
|
|
4
|
+
{ id: String } & SurgeAPI::Internal::Type::request_parameters
|
|
5
|
+
|
|
6
|
+
class PhoneNumberRetrieveParams < SurgeAPI::Internal::Type::BaseModel
|
|
7
|
+
extend SurgeAPI::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include SurgeAPI::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
attr_accessor id: String
|
|
11
|
+
|
|
12
|
+
def initialize: (
|
|
13
|
+
id: String,
|
|
14
|
+
?request_options: SurgeAPI::request_opts
|
|
15
|
+
) -> void
|
|
16
|
+
|
|
17
|
+
def to_hash: -> { id: String, request_options: SurgeAPI::RequestOptions }
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
data/sig/surge_api/models.rbs
CHANGED
|
@@ -85,12 +85,16 @@ module SurgeAPI
|
|
|
85
85
|
|
|
86
86
|
class PhoneNumberAttachedToCampaignWebhookEvent = SurgeAPI::Models::PhoneNumberAttachedToCampaignWebhookEvent
|
|
87
87
|
|
|
88
|
+
class PhoneNumberListAvailableNumbersParams = SurgeAPI::Models::PhoneNumberListAvailableNumbersParams
|
|
89
|
+
|
|
88
90
|
class PhoneNumberListParams = SurgeAPI::Models::PhoneNumberListParams
|
|
89
91
|
|
|
90
92
|
class PhoneNumberPurchaseParams = SurgeAPI::Models::PhoneNumberPurchaseParams
|
|
91
93
|
|
|
92
94
|
class PhoneNumberReleaseParams = SurgeAPI::Models::PhoneNumberReleaseParams
|
|
93
95
|
|
|
96
|
+
class PhoneNumberRetrieveParams = SurgeAPI::Models::PhoneNumberRetrieveParams
|
|
97
|
+
|
|
94
98
|
class PhoneNumberUpdateParams = SurgeAPI::Models::PhoneNumberUpdateParams
|
|
95
99
|
|
|
96
100
|
class RecordingCompletedWebhookEvent = SurgeAPI::Models::RecordingCompletedWebhookEvent
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
module SurgeAPI
|
|
2
2
|
module Resources
|
|
3
3
|
class PhoneNumbers
|
|
4
|
+
def retrieve: (
|
|
5
|
+
String id,
|
|
6
|
+
?request_options: SurgeAPI::request_opts
|
|
7
|
+
) -> SurgeAPI::PhoneNumber
|
|
8
|
+
|
|
4
9
|
def update: (
|
|
5
10
|
String id,
|
|
6
11
|
?campaign_id: String,
|
|
@@ -15,12 +20,23 @@ module SurgeAPI
|
|
|
15
20
|
?request_options: SurgeAPI::request_opts
|
|
16
21
|
) -> SurgeAPI::Internal::Cursor[SurgeAPI::PhoneNumber]
|
|
17
22
|
|
|
23
|
+
def list_available_numbers: (
|
|
24
|
+
String account_id,
|
|
25
|
+
type: SurgeAPI::Models::PhoneNumberListAvailableNumbersParams::type_,
|
|
26
|
+
?after: String,
|
|
27
|
+
?area_code: String,
|
|
28
|
+
?before: String,
|
|
29
|
+
?country: SurgeAPI::Models::PhoneNumberListAvailableNumbersParams::country,
|
|
30
|
+
?request_options: SurgeAPI::request_opts
|
|
31
|
+
) -> SurgeAPI::Internal::Cursor[SurgeAPI::Models::PhoneNumberListAvailableNumbersResponse]
|
|
32
|
+
|
|
18
33
|
def purchase: (
|
|
19
34
|
String account_id,
|
|
20
35
|
?area_code: String,
|
|
21
36
|
?latitude: Float,
|
|
22
37
|
?longitude: Float,
|
|
23
38
|
?name: String,
|
|
39
|
+
?phone_number: String,
|
|
24
40
|
?type: SurgeAPI::Models::PhoneNumberPurchaseParams::type_,
|
|
25
41
|
?request_options: SurgeAPI::request_opts
|
|
26
42
|
) -> SurgeAPI::PhoneNumber
|
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.20.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-07-
|
|
11
|
+
date: 2026-07-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: cgi
|
|
@@ -129,9 +129,12 @@ files:
|
|
|
129
129
|
- lib/surge_api/models/organization.rb
|
|
130
130
|
- lib/surge_api/models/phone_number.rb
|
|
131
131
|
- lib/surge_api/models/phone_number_attached_to_campaign_webhook_event.rb
|
|
132
|
+
- lib/surge_api/models/phone_number_list_available_numbers_params.rb
|
|
133
|
+
- lib/surge_api/models/phone_number_list_available_numbers_response.rb
|
|
132
134
|
- lib/surge_api/models/phone_number_list_params.rb
|
|
133
135
|
- lib/surge_api/models/phone_number_purchase_params.rb
|
|
134
136
|
- lib/surge_api/models/phone_number_release_params.rb
|
|
137
|
+
- lib/surge_api/models/phone_number_retrieve_params.rb
|
|
135
138
|
- lib/surge_api/models/phone_number_update_params.rb
|
|
136
139
|
- lib/surge_api/models/recording_completed_webhook_event.rb
|
|
137
140
|
- lib/surge_api/models/recording_delete_params.rb
|
|
@@ -237,9 +240,12 @@ files:
|
|
|
237
240
|
- rbi/surge_api/models/organization.rbi
|
|
238
241
|
- rbi/surge_api/models/phone_number.rbi
|
|
239
242
|
- rbi/surge_api/models/phone_number_attached_to_campaign_webhook_event.rbi
|
|
243
|
+
- rbi/surge_api/models/phone_number_list_available_numbers_params.rbi
|
|
244
|
+
- rbi/surge_api/models/phone_number_list_available_numbers_response.rbi
|
|
240
245
|
- rbi/surge_api/models/phone_number_list_params.rbi
|
|
241
246
|
- rbi/surge_api/models/phone_number_purchase_params.rbi
|
|
242
247
|
- rbi/surge_api/models/phone_number_release_params.rbi
|
|
248
|
+
- rbi/surge_api/models/phone_number_retrieve_params.rbi
|
|
243
249
|
- rbi/surge_api/models/phone_number_update_params.rbi
|
|
244
250
|
- rbi/surge_api/models/recording_completed_webhook_event.rbi
|
|
245
251
|
- rbi/surge_api/models/recording_delete_params.rbi
|
|
@@ -344,9 +350,12 @@ files:
|
|
|
344
350
|
- sig/surge_api/models/organization.rbs
|
|
345
351
|
- sig/surge_api/models/phone_number.rbs
|
|
346
352
|
- sig/surge_api/models/phone_number_attached_to_campaign_webhook_event.rbs
|
|
353
|
+
- sig/surge_api/models/phone_number_list_available_numbers_params.rbs
|
|
354
|
+
- sig/surge_api/models/phone_number_list_available_numbers_response.rbs
|
|
347
355
|
- sig/surge_api/models/phone_number_list_params.rbs
|
|
348
356
|
- sig/surge_api/models/phone_number_purchase_params.rbs
|
|
349
357
|
- sig/surge_api/models/phone_number_release_params.rbs
|
|
358
|
+
- sig/surge_api/models/phone_number_retrieve_params.rbs
|
|
350
359
|
- sig/surge_api/models/phone_number_update_params.rbs
|
|
351
360
|
- sig/surge_api/models/recording_completed_webhook_event.rbs
|
|
352
361
|
- sig/surge_api/models/recording_delete_params.rbs
|