zernio-sdk 0.0.783 → 0.0.784
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/README.md +9 -0
- data/docs/CreatePhoneNumberStockWatchRequest.md +18 -0
- data/docs/ListPhoneNumberStockWatches200Response.md +18 -0
- data/docs/PhoneNumberStockWatch.md +24 -0
- data/docs/PhoneNumbersApi.md +203 -0
- data/docs/WebhookEventsApi.md +69 -0
- data/docs/WebhookPayloadPhoneNumberStockAvailable.md +24 -0
- data/docs/WebhookPayloadPhoneNumberStockAvailableStock.md +20 -0
- data/docs/WebhookPayloadPhoneNumberStockAvailableStockTypesInner.md +20 -0
- data/lib/zernio-sdk/api/phone_numbers_api.rb +184 -0
- data/lib/zernio-sdk/api/webhook_events_api.rb +66 -0
- data/lib/zernio-sdk/models/create_phone_number_stock_watch_request.rb +183 -0
- data/lib/zernio-sdk/models/list_phone_number_stock_watches200_response.rb +149 -0
- data/lib/zernio-sdk/models/phone_number_stock_watch.rb +243 -0
- data/lib/zernio-sdk/models/webhook_payload_phone_number_stock_available.rb +269 -0
- data/lib/zernio-sdk/models/webhook_payload_phone_number_stock_available_stock.rb +194 -0
- data/lib/zernio-sdk/models/webhook_payload_phone_number_stock_available_stock_types_inner.rb +192 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +6 -0
- data/openapi.yaml +146 -4
- data/spec/api/phone_numbers_api_spec.rb +33 -0
- data/spec/models/create_phone_number_stock_watch_request_spec.rb +36 -0
- data/spec/models/create_webhook_settings_request_spec.rb +1 -1
- data/spec/models/list_phone_number_stock_watches200_response_spec.rb +36 -0
- data/spec/models/phone_number_stock_watch_spec.rb +54 -0
- data/spec/models/update_webhook_settings_request_spec.rb +1 -1
- data/spec/models/webhook_payload_phone_number_stock_available_spec.rb +58 -0
- data/spec/models/webhook_payload_phone_number_stock_available_stock_spec.rb +42 -0
- data/spec/models/webhook_payload_phone_number_stock_available_stock_types_inner_spec.rb +42 -0
- data/spec/models/webhook_spec.rb +1 -1
- metadata +25 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4470ecb712494d1056ef762bcf0a85305c48e1928372196591115eac3d02cd67
|
|
4
|
+
data.tar.gz: ba8ea05c5a462624a1f286c6cbff5c34d1a9537c48c00017be06d6a02ef05f00
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aa3229a577409d0ac61c2a204dac8bc7bf75a2267a8ccd70cbda1d87180de3a0328364a65e5cab8f8152e7b85df2fe58efcd00aba440b0dff17da0bcd1bb2066
|
|
7
|
+
data.tar.gz: ab3be7790e719007d42e18a7bbb09ecdeb1a0522559880a3d22202ac640ef0030196d5caee86536226d522ed056d4111a74e9bf8643a62a1d8177bd2a8d61766
|
data/README.md
CHANGED
|
@@ -426,6 +426,8 @@ Class | Method | HTTP request | Description
|
|
|
426
426
|
*Zernio::PhoneNumbersApi* | [**check_phone_number_portability**](docs/PhoneNumbersApi.md#check_phone_number_portability) | **POST** /v1/phone-numbers/port-in/check | Check portability
|
|
427
427
|
*Zernio::PhoneNumbersApi* | [**create_phone_number_kyc_link**](docs/PhoneNumbersApi.md#create_phone_number_kyc_link) | **POST** /v1/phone-numbers/kyc/share | Create a hosted KYC link
|
|
428
428
|
*Zernio::PhoneNumbersApi* | [**create_phone_number_port_in**](docs/PhoneNumbersApi.md#create_phone_number_port_in) | **POST** /v1/phone-numbers/port-in | Port numbers in
|
|
429
|
+
*Zernio::PhoneNumbersApi* | [**create_phone_number_stock_watch**](docs/PhoneNumbersApi.md#create_phone_number_stock_watch) | **POST** /v1/phone-numbers/stock-watches | Watch an out-of-stock country
|
|
430
|
+
*Zernio::PhoneNumbersApi* | [**delete_phone_number_stock_watch**](docs/PhoneNumbersApi.md#delete_phone_number_stock_watch) | **DELETE** /v1/phone-numbers/stock-watches/{id} | Stop watching a country
|
|
429
431
|
*Zernio::PhoneNumbersApi* | [**get_phone_number**](docs/PhoneNumbersApi.md#get_phone_number) | **GET** /v1/phone-numbers/{id} | Get phone number
|
|
430
432
|
*Zernio::PhoneNumbersApi* | [**get_phone_number_kyc_form**](docs/PhoneNumbersApi.md#get_phone_number_kyc_form) | **GET** /v1/phone-numbers/kyc | Get KYC form spec
|
|
431
433
|
*Zernio::PhoneNumbersApi* | [**get_phone_number_port_in_order_requirements**](docs/PhoneNumbersApi.md#get_phone_number_port_in_order_requirements) | **GET** /v1/phone-numbers/port-in/{id}/requirements | A port-in order's pending requirements
|
|
@@ -433,6 +435,7 @@ Class | Method | HTTP request | Description
|
|
|
433
435
|
*Zernio::PhoneNumbersApi* | [**get_phone_number_remediation**](docs/PhoneNumbersApi.md#get_phone_number_remediation) | **GET** /v1/phone-numbers/{id}/remediate | Get declined requirements
|
|
434
436
|
*Zernio::PhoneNumbersApi* | [**list_phone_number_countries**](docs/PhoneNumbersApi.md#list_phone_number_countries) | **GET** /v1/phone-numbers/countries | List offerable number countries
|
|
435
437
|
*Zernio::PhoneNumbersApi* | [**list_phone_number_port_ins**](docs/PhoneNumbersApi.md#list_phone_number_port_ins) | **GET** /v1/phone-numbers/port-in | List port-in orders
|
|
438
|
+
*Zernio::PhoneNumbersApi* | [**list_phone_number_stock_watches**](docs/PhoneNumbersApi.md#list_phone_number_stock_watches) | **GET** /v1/phone-numbers/stock-watches | List stock watches
|
|
436
439
|
*Zernio::PhoneNumbersApi* | [**list_phone_numbers**](docs/PhoneNumbersApi.md#list_phone_numbers) | **GET** /v1/phone-numbers | List phone numbers
|
|
437
440
|
*Zernio::PhoneNumbersApi* | [**purchase_phone_number**](docs/PhoneNumbersApi.md#purchase_phone_number) | **POST** /v1/phone-numbers/purchase | Purchase phone number
|
|
438
441
|
*Zernio::PhoneNumbersApi* | [**release_phone_number**](docs/PhoneNumbersApi.md#release_phone_number) | **DELETE** /v1/phone-numbers/{id} | Release phone number
|
|
@@ -929,6 +932,7 @@ Class | Method | HTTP request | Description
|
|
|
929
932
|
- [Zernio::CreatePhoneNumberPortInRequest](docs/CreatePhoneNumberPortInRequest.md)
|
|
930
933
|
- [Zernio::CreatePhoneNumberPortInRequestEndUser](docs/CreatePhoneNumberPortInRequestEndUser.md)
|
|
931
934
|
- [Zernio::CreatePhoneNumberPortInRequestRequirementsInner](docs/CreatePhoneNumberPortInRequestRequirementsInner.md)
|
|
935
|
+
- [Zernio::CreatePhoneNumberStockWatchRequest](docs/CreatePhoneNumberStockWatchRequest.md)
|
|
932
936
|
- [Zernio::CreatePinterestBoard201Response](docs/CreatePinterestBoard201Response.md)
|
|
933
937
|
- [Zernio::CreatePinterestBoard201ResponseBoard](docs/CreatePinterestBoard201ResponseBoard.md)
|
|
934
938
|
- [Zernio::CreatePinterestBoardRequest](docs/CreatePinterestBoardRequest.md)
|
|
@@ -1656,6 +1660,7 @@ Class | Method | HTTP request | Description
|
|
|
1656
1660
|
- [Zernio::ListPhoneNumberCountries200ResponseCountriesInnerTypesInner](docs/ListPhoneNumberCountries200ResponseCountriesInnerTypesInner.md)
|
|
1657
1661
|
- [Zernio::ListPhoneNumberPortIns200Response](docs/ListPhoneNumberPortIns200Response.md)
|
|
1658
1662
|
- [Zernio::ListPhoneNumberPortIns200ResponseOrdersInner](docs/ListPhoneNumberPortIns200ResponseOrdersInner.md)
|
|
1663
|
+
- [Zernio::ListPhoneNumberStockWatches200Response](docs/ListPhoneNumberStockWatches200Response.md)
|
|
1659
1664
|
- [Zernio::ListPhoneNumbers200Response](docs/ListPhoneNumbers200Response.md)
|
|
1660
1665
|
- [Zernio::ListPhoneNumbers200ResponseConnectedInner](docs/ListPhoneNumbers200ResponseConnectedInner.md)
|
|
1661
1666
|
- [Zernio::ListPhoneNumbers200ResponseNumbersInner](docs/ListPhoneNumbers200ResponseNumbersInner.md)
|
|
@@ -1758,6 +1763,7 @@ Class | Method | HTTP request | Description
|
|
|
1758
1763
|
- [Zernio::Pagination](docs/Pagination.md)
|
|
1759
1764
|
- [Zernio::PauseWorkflow200Response](docs/PauseWorkflow200Response.md)
|
|
1760
1765
|
- [Zernio::Pending](docs/Pending.md)
|
|
1766
|
+
- [Zernio::PhoneNumberStockWatch](docs/PhoneNumberStockWatch.md)
|
|
1761
1767
|
- [Zernio::PinDiscordMessage200Response](docs/PinDiscordMessage200Response.md)
|
|
1762
1768
|
- [Zernio::PinterestPlatformData](docs/PinterestPlatformData.md)
|
|
1763
1769
|
- [Zernio::PlatformAnalytics](docs/PlatformAnalytics.md)
|
|
@@ -2321,6 +2327,9 @@ Class | Method | HTTP request | Description
|
|
|
2321
2327
|
- [Zernio::WebhookPayloadMessageSentMessageAttachmentsInner](docs/WebhookPayloadMessageSentMessageAttachmentsInner.md)
|
|
2322
2328
|
- [Zernio::WebhookPayloadMessageSentMessageSender](docs/WebhookPayloadMessageSentMessageSender.md)
|
|
2323
2329
|
- [Zernio::WebhookPayloadMessageSentMetadata](docs/WebhookPayloadMessageSentMetadata.md)
|
|
2330
|
+
- [Zernio::WebhookPayloadPhoneNumberStockAvailable](docs/WebhookPayloadPhoneNumberStockAvailable.md)
|
|
2331
|
+
- [Zernio::WebhookPayloadPhoneNumberStockAvailableStock](docs/WebhookPayloadPhoneNumberStockAvailableStock.md)
|
|
2332
|
+
- [Zernio::WebhookPayloadPhoneNumberStockAvailableStockTypesInner](docs/WebhookPayloadPhoneNumberStockAvailableStockTypesInner.md)
|
|
2324
2333
|
- [Zernio::WebhookPayloadPost](docs/WebhookPayloadPost.md)
|
|
2325
2334
|
- [Zernio::WebhookPayloadPostPlatform](docs/WebhookPayloadPostPlatform.md)
|
|
2326
2335
|
- [Zernio::WebhookPayloadPostPlatformAccount](docs/WebhookPayloadPostPlatformAccount.md)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Zernio::CreatePhoneNumberStockWatchRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **country** | **String** | ISO 3166-1 alpha-2 code of a country listed by GET /v1/phone-numbers/countries. | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'zernio-sdk'
|
|
13
|
+
|
|
14
|
+
instance = Zernio::CreatePhoneNumberStockWatchRequest.new(
|
|
15
|
+
country: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Zernio::ListPhoneNumberStockWatches200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **watches** | [**Array<PhoneNumberStockWatch>**](PhoneNumberStockWatch.md) | | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'zernio-sdk'
|
|
13
|
+
|
|
14
|
+
instance = Zernio::ListPhoneNumberStockWatches200Response.new(
|
|
15
|
+
watches: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Zernio::PhoneNumberStockWatch
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | |
|
|
8
|
+
| **country** | **String** | ISO 3166-1 alpha-2. | |
|
|
9
|
+
| **country_name** | **String** | | |
|
|
10
|
+
| **created_at** | **Time** | | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'zernio-sdk'
|
|
16
|
+
|
|
17
|
+
instance = Zernio::PhoneNumberStockWatch.new(
|
|
18
|
+
id: null,
|
|
19
|
+
country: null,
|
|
20
|
+
country_name: null,
|
|
21
|
+
created_at: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
data/docs/PhoneNumbersApi.md
CHANGED
|
@@ -9,6 +9,8 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
9
9
|
| [**check_phone_number_portability**](PhoneNumbersApi.md#check_phone_number_portability) | **POST** /v1/phone-numbers/port-in/check | Check portability |
|
|
10
10
|
| [**create_phone_number_kyc_link**](PhoneNumbersApi.md#create_phone_number_kyc_link) | **POST** /v1/phone-numbers/kyc/share | Create a hosted KYC link |
|
|
11
11
|
| [**create_phone_number_port_in**](PhoneNumbersApi.md#create_phone_number_port_in) | **POST** /v1/phone-numbers/port-in | Port numbers in |
|
|
12
|
+
| [**create_phone_number_stock_watch**](PhoneNumbersApi.md#create_phone_number_stock_watch) | **POST** /v1/phone-numbers/stock-watches | Watch an out-of-stock country |
|
|
13
|
+
| [**delete_phone_number_stock_watch**](PhoneNumbersApi.md#delete_phone_number_stock_watch) | **DELETE** /v1/phone-numbers/stock-watches/{id} | Stop watching a country |
|
|
12
14
|
| [**get_phone_number**](PhoneNumbersApi.md#get_phone_number) | **GET** /v1/phone-numbers/{id} | Get phone number |
|
|
13
15
|
| [**get_phone_number_kyc_form**](PhoneNumbersApi.md#get_phone_number_kyc_form) | **GET** /v1/phone-numbers/kyc | Get KYC form spec |
|
|
14
16
|
| [**get_phone_number_port_in_order_requirements**](PhoneNumbersApi.md#get_phone_number_port_in_order_requirements) | **GET** /v1/phone-numbers/port-in/{id}/requirements | A port-in order's pending requirements |
|
|
@@ -16,6 +18,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
16
18
|
| [**get_phone_number_remediation**](PhoneNumbersApi.md#get_phone_number_remediation) | **GET** /v1/phone-numbers/{id}/remediate | Get declined requirements |
|
|
17
19
|
| [**list_phone_number_countries**](PhoneNumbersApi.md#list_phone_number_countries) | **GET** /v1/phone-numbers/countries | List offerable number countries |
|
|
18
20
|
| [**list_phone_number_port_ins**](PhoneNumbersApi.md#list_phone_number_port_ins) | **GET** /v1/phone-numbers/port-in | List port-in orders |
|
|
21
|
+
| [**list_phone_number_stock_watches**](PhoneNumbersApi.md#list_phone_number_stock_watches) | **GET** /v1/phone-numbers/stock-watches | List stock watches |
|
|
19
22
|
| [**list_phone_numbers**](PhoneNumbersApi.md#list_phone_numbers) | **GET** /v1/phone-numbers | List phone numbers |
|
|
20
23
|
| [**purchase_phone_number**](PhoneNumbersApi.md#purchase_phone_number) | **POST** /v1/phone-numbers/purchase | Purchase phone number |
|
|
21
24
|
| [**release_phone_number**](PhoneNumbersApi.md#release_phone_number) | **DELETE** /v1/phone-numbers/{id} | Release phone number |
|
|
@@ -382,6 +385,142 @@ end
|
|
|
382
385
|
- **Accept**: application/json
|
|
383
386
|
|
|
384
387
|
|
|
388
|
+
## create_phone_number_stock_watch
|
|
389
|
+
|
|
390
|
+
> <PhoneNumberStockWatch> create_phone_number_stock_watch(create_phone_number_stock_watch_request)
|
|
391
|
+
|
|
392
|
+
Watch an out-of-stock country
|
|
393
|
+
|
|
394
|
+
Get notified the first time an out-of-stock country has deliverable numbers again: an email to the account holder plus the `phone_number.stock_available` webhook. Stock is re-checked every 6h. One watch per country; a repeat request returns the existing watch (200). The watch is consumed when it fires, so re-create it if you miss the stock. Up to 20 countries can be watched at once.
|
|
395
|
+
|
|
396
|
+
### Examples
|
|
397
|
+
|
|
398
|
+
```ruby
|
|
399
|
+
require 'time'
|
|
400
|
+
require 'zernio-sdk'
|
|
401
|
+
# setup authorization
|
|
402
|
+
Zernio.configure do |config|
|
|
403
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
404
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
405
|
+
end
|
|
406
|
+
|
|
407
|
+
api_instance = Zernio::PhoneNumbersApi.new
|
|
408
|
+
create_phone_number_stock_watch_request = Zernio::CreatePhoneNumberStockWatchRequest.new({country: 'country_example'}) # CreatePhoneNumberStockWatchRequest |
|
|
409
|
+
|
|
410
|
+
begin
|
|
411
|
+
# Watch an out-of-stock country
|
|
412
|
+
result = api_instance.create_phone_number_stock_watch(create_phone_number_stock_watch_request)
|
|
413
|
+
p result
|
|
414
|
+
rescue Zernio::ApiError => e
|
|
415
|
+
puts "Error when calling PhoneNumbersApi->create_phone_number_stock_watch: #{e}"
|
|
416
|
+
end
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
#### Using the create_phone_number_stock_watch_with_http_info variant
|
|
420
|
+
|
|
421
|
+
This returns an Array which contains the response data, status code and headers.
|
|
422
|
+
|
|
423
|
+
> <Array(<PhoneNumberStockWatch>, Integer, Hash)> create_phone_number_stock_watch_with_http_info(create_phone_number_stock_watch_request)
|
|
424
|
+
|
|
425
|
+
```ruby
|
|
426
|
+
begin
|
|
427
|
+
# Watch an out-of-stock country
|
|
428
|
+
data, status_code, headers = api_instance.create_phone_number_stock_watch_with_http_info(create_phone_number_stock_watch_request)
|
|
429
|
+
p status_code # => 2xx
|
|
430
|
+
p headers # => { ... }
|
|
431
|
+
p data # => <PhoneNumberStockWatch>
|
|
432
|
+
rescue Zernio::ApiError => e
|
|
433
|
+
puts "Error when calling PhoneNumbersApi->create_phone_number_stock_watch_with_http_info: #{e}"
|
|
434
|
+
end
|
|
435
|
+
```
|
|
436
|
+
|
|
437
|
+
### Parameters
|
|
438
|
+
|
|
439
|
+
| Name | Type | Description | Notes |
|
|
440
|
+
| ---- | ---- | ----------- | ----- |
|
|
441
|
+
| **create_phone_number_stock_watch_request** | [**CreatePhoneNumberStockWatchRequest**](CreatePhoneNumberStockWatchRequest.md) | | |
|
|
442
|
+
|
|
443
|
+
### Return type
|
|
444
|
+
|
|
445
|
+
[**PhoneNumberStockWatch**](PhoneNumberStockWatch.md)
|
|
446
|
+
|
|
447
|
+
### Authorization
|
|
448
|
+
|
|
449
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
450
|
+
|
|
451
|
+
### HTTP request headers
|
|
452
|
+
|
|
453
|
+
- **Content-Type**: application/json
|
|
454
|
+
- **Accept**: application/json
|
|
455
|
+
|
|
456
|
+
|
|
457
|
+
## delete_phone_number_stock_watch
|
|
458
|
+
|
|
459
|
+
> <DeleteSmsSenderId200Response> delete_phone_number_stock_watch(id)
|
|
460
|
+
|
|
461
|
+
Stop watching a country
|
|
462
|
+
|
|
463
|
+
### Examples
|
|
464
|
+
|
|
465
|
+
```ruby
|
|
466
|
+
require 'time'
|
|
467
|
+
require 'zernio-sdk'
|
|
468
|
+
# setup authorization
|
|
469
|
+
Zernio.configure do |config|
|
|
470
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
471
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
472
|
+
end
|
|
473
|
+
|
|
474
|
+
api_instance = Zernio::PhoneNumbersApi.new
|
|
475
|
+
id = 'id_example' # String |
|
|
476
|
+
|
|
477
|
+
begin
|
|
478
|
+
# Stop watching a country
|
|
479
|
+
result = api_instance.delete_phone_number_stock_watch(id)
|
|
480
|
+
p result
|
|
481
|
+
rescue Zernio::ApiError => e
|
|
482
|
+
puts "Error when calling PhoneNumbersApi->delete_phone_number_stock_watch: #{e}"
|
|
483
|
+
end
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
#### Using the delete_phone_number_stock_watch_with_http_info variant
|
|
487
|
+
|
|
488
|
+
This returns an Array which contains the response data, status code and headers.
|
|
489
|
+
|
|
490
|
+
> <Array(<DeleteSmsSenderId200Response>, Integer, Hash)> delete_phone_number_stock_watch_with_http_info(id)
|
|
491
|
+
|
|
492
|
+
```ruby
|
|
493
|
+
begin
|
|
494
|
+
# Stop watching a country
|
|
495
|
+
data, status_code, headers = api_instance.delete_phone_number_stock_watch_with_http_info(id)
|
|
496
|
+
p status_code # => 2xx
|
|
497
|
+
p headers # => { ... }
|
|
498
|
+
p data # => <DeleteSmsSenderId200Response>
|
|
499
|
+
rescue Zernio::ApiError => e
|
|
500
|
+
puts "Error when calling PhoneNumbersApi->delete_phone_number_stock_watch_with_http_info: #{e}"
|
|
501
|
+
end
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
### Parameters
|
|
505
|
+
|
|
506
|
+
| Name | Type | Description | Notes |
|
|
507
|
+
| ---- | ---- | ----------- | ----- |
|
|
508
|
+
| **id** | **String** | | |
|
|
509
|
+
|
|
510
|
+
### Return type
|
|
511
|
+
|
|
512
|
+
[**DeleteSmsSenderId200Response**](DeleteSmsSenderId200Response.md)
|
|
513
|
+
|
|
514
|
+
### Authorization
|
|
515
|
+
|
|
516
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
517
|
+
|
|
518
|
+
### HTTP request headers
|
|
519
|
+
|
|
520
|
+
- **Content-Type**: Not defined
|
|
521
|
+
- **Accept**: application/json
|
|
522
|
+
|
|
523
|
+
|
|
385
524
|
## get_phone_number
|
|
386
525
|
|
|
387
526
|
> <GetPhoneNumber200Response> get_phone_number(id)
|
|
@@ -867,6 +1006,70 @@ This endpoint does not need any parameter.
|
|
|
867
1006
|
- **Accept**: application/json
|
|
868
1007
|
|
|
869
1008
|
|
|
1009
|
+
## list_phone_number_stock_watches
|
|
1010
|
+
|
|
1011
|
+
> <ListPhoneNumberStockWatches200Response> list_phone_number_stock_watches
|
|
1012
|
+
|
|
1013
|
+
List stock watches
|
|
1014
|
+
|
|
1015
|
+
### Examples
|
|
1016
|
+
|
|
1017
|
+
```ruby
|
|
1018
|
+
require 'time'
|
|
1019
|
+
require 'zernio-sdk'
|
|
1020
|
+
# setup authorization
|
|
1021
|
+
Zernio.configure do |config|
|
|
1022
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
1023
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1024
|
+
end
|
|
1025
|
+
|
|
1026
|
+
api_instance = Zernio::PhoneNumbersApi.new
|
|
1027
|
+
|
|
1028
|
+
begin
|
|
1029
|
+
# List stock watches
|
|
1030
|
+
result = api_instance.list_phone_number_stock_watches
|
|
1031
|
+
p result
|
|
1032
|
+
rescue Zernio::ApiError => e
|
|
1033
|
+
puts "Error when calling PhoneNumbersApi->list_phone_number_stock_watches: #{e}"
|
|
1034
|
+
end
|
|
1035
|
+
```
|
|
1036
|
+
|
|
1037
|
+
#### Using the list_phone_number_stock_watches_with_http_info variant
|
|
1038
|
+
|
|
1039
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1040
|
+
|
|
1041
|
+
> <Array(<ListPhoneNumberStockWatches200Response>, Integer, Hash)> list_phone_number_stock_watches_with_http_info
|
|
1042
|
+
|
|
1043
|
+
```ruby
|
|
1044
|
+
begin
|
|
1045
|
+
# List stock watches
|
|
1046
|
+
data, status_code, headers = api_instance.list_phone_number_stock_watches_with_http_info
|
|
1047
|
+
p status_code # => 2xx
|
|
1048
|
+
p headers # => { ... }
|
|
1049
|
+
p data # => <ListPhoneNumberStockWatches200Response>
|
|
1050
|
+
rescue Zernio::ApiError => e
|
|
1051
|
+
puts "Error when calling PhoneNumbersApi->list_phone_number_stock_watches_with_http_info: #{e}"
|
|
1052
|
+
end
|
|
1053
|
+
```
|
|
1054
|
+
|
|
1055
|
+
### Parameters
|
|
1056
|
+
|
|
1057
|
+
This endpoint does not need any parameter.
|
|
1058
|
+
|
|
1059
|
+
### Return type
|
|
1060
|
+
|
|
1061
|
+
[**ListPhoneNumberStockWatches200Response**](ListPhoneNumberStockWatches200Response.md)
|
|
1062
|
+
|
|
1063
|
+
### Authorization
|
|
1064
|
+
|
|
1065
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
1066
|
+
|
|
1067
|
+
### HTTP request headers
|
|
1068
|
+
|
|
1069
|
+
- **Content-Type**: Not defined
|
|
1070
|
+
- **Accept**: application/json
|
|
1071
|
+
|
|
1072
|
+
|
|
870
1073
|
## list_phone_numbers
|
|
871
1074
|
|
|
872
1075
|
> <ListPhoneNumbers200Response> list_phone_numbers(opts)
|
data/docs/WebhookEventsApi.md
CHANGED
|
@@ -22,6 +22,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
22
22
|
| [**on_message_read**](WebhookEventsApi.md#on_message_read) | **POST** /message.read | Message read event |
|
|
23
23
|
| [**on_message_received**](WebhookEventsApi.md#on_message_received) | **POST** /message.received | Message received event |
|
|
24
24
|
| [**on_message_sent**](WebhookEventsApi.md#on_message_sent) | **POST** /message.sent | Message sent event |
|
|
25
|
+
| [**on_phone_number_stock_available**](WebhookEventsApi.md#on_phone_number_stock_available) | **POST** /phone_number.stock_available | Phone-number stock available event |
|
|
25
26
|
| [**on_post_cancelled**](WebhookEventsApi.md#on_post_cancelled) | **POST** /post.cancelled | Post cancelled event |
|
|
26
27
|
| [**on_post_external_created**](WebhookEventsApi.md#on_post_external_created) | **POST** /post.external.created | External post created event |
|
|
27
28
|
| [**on_post_external_deleted**](WebhookEventsApi.md#on_post_external_deleted) | **POST** /post.external.deleted | External post deleted event |
|
|
@@ -1280,6 +1281,74 @@ nil (empty response body)
|
|
|
1280
1281
|
- **Accept**: Not defined
|
|
1281
1282
|
|
|
1282
1283
|
|
|
1284
|
+
## on_phone_number_stock_available
|
|
1285
|
+
|
|
1286
|
+
> on_phone_number_stock_available(webhook_payload_phone_number_stock_available)
|
|
1287
|
+
|
|
1288
|
+
Phone-number stock available event
|
|
1289
|
+
|
|
1290
|
+
Fired by the stock sweep (every 6h) the first time a country you watch via POST /v1/phone-numbers/stock-watches has deliverable numbers again. The watch is consumed, so the event fires once per watch; the stock counts are a snapshot and numbers are sold first come, first served. Buy with POST /v1/phone-numbers/purchase.
|
|
1291
|
+
|
|
1292
|
+
### Examples
|
|
1293
|
+
|
|
1294
|
+
```ruby
|
|
1295
|
+
require 'time'
|
|
1296
|
+
require 'zernio-sdk'
|
|
1297
|
+
# setup authorization
|
|
1298
|
+
Zernio.configure do |config|
|
|
1299
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
1300
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1301
|
+
end
|
|
1302
|
+
|
|
1303
|
+
api_instance = Zernio::WebhookEventsApi.new
|
|
1304
|
+
webhook_payload_phone_number_stock_available = # WebhookPayloadPhoneNumberStockAvailable |
|
|
1305
|
+
|
|
1306
|
+
begin
|
|
1307
|
+
# Phone-number stock available event
|
|
1308
|
+
api_instance.on_phone_number_stock_available(webhook_payload_phone_number_stock_available)
|
|
1309
|
+
rescue Zernio::ApiError => e
|
|
1310
|
+
puts "Error when calling WebhookEventsApi->on_phone_number_stock_available: #{e}"
|
|
1311
|
+
end
|
|
1312
|
+
```
|
|
1313
|
+
|
|
1314
|
+
#### Using the on_phone_number_stock_available_with_http_info variant
|
|
1315
|
+
|
|
1316
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
1317
|
+
|
|
1318
|
+
> <Array(nil, Integer, Hash)> on_phone_number_stock_available_with_http_info(webhook_payload_phone_number_stock_available)
|
|
1319
|
+
|
|
1320
|
+
```ruby
|
|
1321
|
+
begin
|
|
1322
|
+
# Phone-number stock available event
|
|
1323
|
+
data, status_code, headers = api_instance.on_phone_number_stock_available_with_http_info(webhook_payload_phone_number_stock_available)
|
|
1324
|
+
p status_code # => 2xx
|
|
1325
|
+
p headers # => { ... }
|
|
1326
|
+
p data # => nil
|
|
1327
|
+
rescue Zernio::ApiError => e
|
|
1328
|
+
puts "Error when calling WebhookEventsApi->on_phone_number_stock_available_with_http_info: #{e}"
|
|
1329
|
+
end
|
|
1330
|
+
```
|
|
1331
|
+
|
|
1332
|
+
### Parameters
|
|
1333
|
+
|
|
1334
|
+
| Name | Type | Description | Notes |
|
|
1335
|
+
| ---- | ---- | ----------- | ----- |
|
|
1336
|
+
| **webhook_payload_phone_number_stock_available** | [**WebhookPayloadPhoneNumberStockAvailable**](WebhookPayloadPhoneNumberStockAvailable.md) | | |
|
|
1337
|
+
|
|
1338
|
+
### Return type
|
|
1339
|
+
|
|
1340
|
+
nil (empty response body)
|
|
1341
|
+
|
|
1342
|
+
### Authorization
|
|
1343
|
+
|
|
1344
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
1345
|
+
|
|
1346
|
+
### HTTP request headers
|
|
1347
|
+
|
|
1348
|
+
- **Content-Type**: application/json
|
|
1349
|
+
- **Accept**: Not defined
|
|
1350
|
+
|
|
1351
|
+
|
|
1283
1352
|
## on_post_cancelled
|
|
1284
1353
|
|
|
1285
1354
|
> on_post_cancelled(webhook_payload_post)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Zernio::WebhookPayloadPhoneNumberStockAvailable
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | Stable webhook event ID | |
|
|
8
|
+
| **event** | **String** | | |
|
|
9
|
+
| **stock** | [**WebhookPayloadPhoneNumberStockAvailableStock**](WebhookPayloadPhoneNumberStockAvailableStock.md) | | |
|
|
10
|
+
| **timestamp** | **Time** | UTC time at which Zernio generated this event (set once when the event payload is built, before delivery is queued). Retries and redeliveries keep the original value, so it reflects the event, not the delivery attempt. | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'zernio-sdk'
|
|
16
|
+
|
|
17
|
+
instance = Zernio::WebhookPayloadPhoneNumberStockAvailable.new(
|
|
18
|
+
id: null,
|
|
19
|
+
event: null,
|
|
20
|
+
stock: null,
|
|
21
|
+
timestamp: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zernio::WebhookPayloadPhoneNumberStockAvailableStock
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **country** | **String** | ISO 3166-1 alpha-2 country code of the watched country. | |
|
|
8
|
+
| **types** | [**Array<WebhookPayloadPhoneNumberStockAvailableStockTypesInner>**](WebhookPayloadPhoneNumberStockAvailableStockTypesInner.md) | Number types deliverable at sweep time. Only types with stock are listed. | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zernio-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Zernio::WebhookPayloadPhoneNumberStockAvailableStock.new(
|
|
16
|
+
country: null,
|
|
17
|
+
types: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zernio::WebhookPayloadPhoneNumberStockAvailableStockTypesInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **number_type** | **String** | local, mobile, national or toll_free. | |
|
|
8
|
+
| **available_count** | **Integer** | Deliverable numbers at sweep time; first come, first served. | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zernio-sdk'
|
|
14
|
+
|
|
15
|
+
instance = Zernio::WebhookPayloadPhoneNumberStockAvailableStockTypesInner.new(
|
|
16
|
+
number_type: null,
|
|
17
|
+
available_count: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|