late-sdk 0.0.958 → 0.0.960
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 +1 -0
- data/docs/CheckPhoneNumberAvailability200Response.md +3 -1
- data/docs/CheckPhoneNumberAvailability200ResponseSoldOutAreasInner.md +22 -0
- data/docs/CreatePhoneNumberStockWatchRequest.md +3 -1
- data/docs/PhoneNumberStockWatch.md +2 -0
- data/docs/PhoneNumbersApi.md +1 -1
- data/docs/RespondToPhoneNumberReviewerRequestDocumentsInner.md +3 -1
- data/docs/SubmitPhoneNumberKycRequest.md +2 -0
- data/docs/SubmitPhoneNumberKycRequestDocumentsInnerOneOf1.md +3 -1
- data/docs/SubmitWhatsAppNumberKycRequest.md +2 -0
- data/docs/WebhookPayloadPhoneNumberStockAvailableStock.md +5 -1
- data/lib/zernio-sdk/api/phone_numbers_api.rb +2 -2
- data/lib/zernio-sdk/models/check_phone_number_availability200_response.rb +16 -4
- data/lib/zernio-sdk/models/check_phone_number_availability200_response_sold_out_areas_inner.rb +168 -0
- data/lib/zernio-sdk/models/create_phone_number_stock_watch_request.rb +35 -4
- data/lib/zernio-sdk/models/phone_number_stock_watch.rb +12 -1
- data/lib/zernio-sdk/models/respond_to_phone_number_reviewer_request_documents_inner.rb +14 -4
- data/lib/zernio-sdk/models/submit_phone_number_kyc_request.rb +11 -1
- data/lib/zernio-sdk/models/submit_phone_number_kyc_request_documents_inner_one_of1.rb +14 -4
- data/lib/zernio-sdk/models/submit_whats_app_number_kyc_request.rb +11 -1
- data/lib/zernio-sdk/models/webhook_payload_phone_number_stock_available_stock.rb +24 -4
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +1 -0
- data/openapi.yaml +43 -1
- data/spec/api/phone_numbers_api_spec.rb +1 -1
- data/spec/models/check_phone_number_availability200_response_sold_out_areas_inner_spec.rb +48 -0
- data/spec/models/check_phone_number_availability200_response_spec.rb +6 -0
- data/spec/models/create_phone_number_stock_watch_request_spec.rb +6 -0
- data/spec/models/phone_number_stock_watch_spec.rb +6 -0
- data/spec/models/respond_to_phone_number_reviewer_request_documents_inner_spec.rb +6 -0
- data/spec/models/submit_phone_number_kyc_request_documents_inner_one_of1_spec.rb +6 -0
- data/spec/models/submit_phone_number_kyc_request_spec.rb +6 -0
- data/spec/models/submit_whats_app_number_kyc_request_spec.rb +6 -0
- data/spec/models/webhook_payload_phone_number_stock_available_stock_spec.rb +12 -0
- data/zernio-sdk-0.0.960.gem +0 -0
- metadata +6 -2
- data/zernio-sdk-0.0.958.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6fa0660ea2190376f84f611b976ae8041849ea40f2a26121fbcee6f546ea157b
|
|
4
|
+
data.tar.gz: ac84a3d7341e7e5d9f85016f5bf850bcd6fc6920308ea6d3b90bdf85c73c8f22
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cd0600c171e2cce7c39d8964c0306c60771ff11e37614854b68e8c1017f1d05a5aaabb07c1226a59d72690e9a54a44c85bab58f82c21c8c52de663007c93398d
|
|
7
|
+
data.tar.gz: 4778504ba6a5e4251146dfb9d99d27b216af2b0f67e29a205d483890beaaa011dac4ff93b07e9f565278158b2bf73232d09a8b49963bc7d02b9968b49b6b459e
|
data/README.md
CHANGED
|
@@ -1002,6 +1002,7 @@ Class | Method | HTTP request | Description
|
|
|
1002
1002
|
- [Zernio::ChannelPickerTeam](docs/ChannelPickerTeam.md)
|
|
1003
1003
|
- [Zernio::CheckPhoneNumberAvailability200Response](docs/CheckPhoneNumberAvailability200Response.md)
|
|
1004
1004
|
- [Zernio::CheckPhoneNumberAvailability200ResponseAreaOptionsInner](docs/CheckPhoneNumberAvailability200ResponseAreaOptionsInner.md)
|
|
1005
|
+
- [Zernio::CheckPhoneNumberAvailability200ResponseSoldOutAreasInner](docs/CheckPhoneNumberAvailability200ResponseSoldOutAreasInner.md)
|
|
1005
1006
|
- [Zernio::CheckPhoneNumberPortability200Response](docs/CheckPhoneNumberPortability200Response.md)
|
|
1006
1007
|
- [Zernio::CheckPhoneNumberPortability200ResponseResultsInner](docs/CheckPhoneNumberPortability200ResponseResultsInner.md)
|
|
1007
1008
|
- [Zernio::CheckPhoneNumberPortabilityRequest](docs/CheckPhoneNumberPortabilityRequest.md)
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
| **address_constraint** | **String** | | [optional] |
|
|
12
12
|
| **areas** | **Array<String>** | For `geo` only: the area(s) the registered address must be in. | [optional] |
|
|
13
13
|
| **area_options** | [**Array<CheckPhoneNumberAvailability200ResponseAreaOptionsInner>**](CheckPhoneNumberAvailability200ResponseAreaOptionsInner.md) | Live inventory grouped by area code. For US and CA this is the full country inventory (every area code with stock, recognizable metros listed first, then alphabetical); other countries are ordered largest stock first; they list the areas in the latest inventory page (up to 500 numbers, which for most countries is the entire pool). Empty when out of stock (or the area lookup failed). Pass a chosen `ndc` as `areaCode` on POST /v1/phone-numbers/purchase (or on the KYC submit for regulated countries) to require that area. | [optional] |
|
|
14
|
+
| **sold_out_areas** | [**Array<CheckPhoneNumberAvailability200ResponseSoldOutAreasInner>**](CheckPhoneNumberAvailability200ResponseSoldOutAreasInner.md) | Areas that had stock in the last 90 days and have none now. Pass one as `areaCode` with `preOrder: true` on the KYC submit when `preOrderable` is true, or watch it with POST /v1/phone-numbers/stock-watches. | [optional] |
|
|
14
15
|
|
|
15
16
|
## Example
|
|
16
17
|
|
|
@@ -24,7 +25,8 @@ instance = Zernio::CheckPhoneNumberAvailability200Response.new(
|
|
|
24
25
|
pre_orderable: null,
|
|
25
26
|
address_constraint: null,
|
|
26
27
|
areas: null,
|
|
27
|
-
area_options: null
|
|
28
|
+
area_options: null,
|
|
29
|
+
sold_out_areas: null
|
|
28
30
|
)
|
|
29
31
|
```
|
|
30
32
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::CheckPhoneNumberAvailability200ResponseSoldOutAreasInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **ndc** | **String** | Area code (national destination code). | [optional] |
|
|
8
|
+
| **name** | **String** | Area name. | [optional] |
|
|
9
|
+
| **pre_orderable** | **Boolean** | Whether this area can be pre-ordered: the carrier sources a number in it (usually 2 to 4 weeks, never guaranteed). | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::CheckPhoneNumberAvailability200ResponseSoldOutAreasInner.new(
|
|
17
|
+
ndc: null,
|
|
18
|
+
name: null,
|
|
19
|
+
pre_orderable: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **country** | **String** | ISO 3166-1 alpha-2 code of a country listed by GET /v1/phone-numbers/countries. | |
|
|
8
8
|
| **number_type** | **String** | Narrow the watch to one number type. Omit to be notified when any type in the country is back. | [optional] |
|
|
9
|
+
| **area_code** | **String** | Narrow the watch to one area code (NDC). Requires numberType. | [optional] |
|
|
9
10
|
|
|
10
11
|
## Example
|
|
11
12
|
|
|
@@ -14,7 +15,8 @@ require 'zernio-sdk'
|
|
|
14
15
|
|
|
15
16
|
instance = Zernio::CreatePhoneNumberStockWatchRequest.new(
|
|
16
17
|
country: null,
|
|
17
|
-
number_type: null
|
|
18
|
+
number_type: null,
|
|
19
|
+
area_code: null
|
|
18
20
|
)
|
|
19
21
|
```
|
|
20
22
|
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
| **country** | **String** | ISO 3166-1 alpha-2. | |
|
|
9
9
|
| **country_name** | **String** | | |
|
|
10
10
|
| **number_type** | **String** | The watched number type, or null when the watch covers every type in the country. | |
|
|
11
|
+
| **area_code** | **String** | The watched area code (NDC), or null when the watch covers every area. | [optional] |
|
|
11
12
|
| **created_at** | **Time** | | |
|
|
12
13
|
|
|
13
14
|
## Example
|
|
@@ -20,6 +21,7 @@ instance = Zernio::PhoneNumberStockWatch.new(
|
|
|
20
21
|
country: null,
|
|
21
22
|
country_name: null,
|
|
22
23
|
number_type: null,
|
|
24
|
+
area_code: null,
|
|
23
25
|
created_at: null
|
|
24
26
|
)
|
|
25
27
|
```
|
data/docs/PhoneNumbersApi.md
CHANGED
|
@@ -391,7 +391,7 @@ end
|
|
|
391
391
|
|
|
392
392
|
Watch an out-of-stock country
|
|
393
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 and number type; 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 watches at once. Countries and types marked `fulfilment: request` by GET /v1/phone-numbers/countries can also be watched, but anything with `preOrderable: true` does not need a watch: submit KYC and the carrier sources the number to order.
|
|
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 and number type; 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 watches at once. Countries and types marked `fulfilment: request` by GET /v1/phone-numbers/countries can also be watched, but anything with `preOrderable: true` does not need a watch: submit KYC and the carrier sources the number to order. Pass `areaCode` (with `numberType`) to watch one sold-out area, for example an entry of `soldOutAreas` from GET /v1/phone-numbers/availability. Area stock is checked live on the same 6h cadence.
|
|
395
395
|
|
|
396
396
|
### Examples
|
|
397
397
|
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
| **filename** | **String** | | [optional] |
|
|
9
9
|
| **base64** | **String** | Base64-encoded file bytes (or supply documentId instead). | [optional] |
|
|
10
10
|
| **document_id** | **String** | Id of a document already uploaded out-of-band. | [optional] |
|
|
11
|
+
| **issued_at** | **Date** | Date printed on the document (YYYY-MM-DD), for slots the regulator windows such as proof of address. The pre-submit review trusts it over its own read of the PDF. | [optional] |
|
|
11
12
|
|
|
12
13
|
## Example
|
|
13
14
|
|
|
@@ -18,7 +19,8 @@ instance = Zernio::RespondToPhoneNumberReviewerRequestDocumentsInner.new(
|
|
|
18
19
|
requirement_id: null,
|
|
19
20
|
filename: null,
|
|
20
21
|
base64: null,
|
|
21
|
-
document_id: null
|
|
22
|
+
document_id: null,
|
|
23
|
+
issued_at: null
|
|
22
24
|
)
|
|
23
25
|
```
|
|
24
26
|
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
| **reuse_option_id** | **String** | Which reusable verification to use (GET reusable.options[].id). The unambiguous selection key. Omitted = the approved default. No match = 409. | [optional] |
|
|
13
13
|
| **reuse_from** | **String** | Legacy fallback for `reuseOptionId`: the source phone number (GET reusable.options[].fromPhoneNumber). Ambiguous when a number labels two verifications, so prefer `reuseOptionId`. Omitted = the approved default. No match = 409. | [optional] |
|
|
14
14
|
| **area_code** | **String** | Area code (NDC) the number must be in. Hard constraint: an empty area pool fails with 409 code AREA_CODE_UNAVAILABLE instead of ordering from another area. Omit for any area. Options come from GET /v1/phone-numbers/availability (areaOptions); the purchase 202 kycUrl echoes the areaCode picked at purchase time so it can be passed here. | [optional] |
|
|
15
|
+
| **pre_order** | **Boolean** | With areaCode: pre-order that area when it has no stock (an area listed in soldOutAreas with preOrderable true) instead of failing with AREA_CODE_UNAVAILABLE. The carrier sources a number in that area. | [optional] |
|
|
15
16
|
| **end_user_first_name** | **String** | End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement. | [optional] |
|
|
16
17
|
| **end_user_last_name** | **String** | End user's legal last name. Same condition as endUserFirstName. | [optional] |
|
|
17
18
|
| **values** | **Hash<String, String>** | requirementId → textual value | [optional] |
|
|
@@ -32,6 +33,7 @@ instance = Zernio::SubmitPhoneNumberKycRequest.new(
|
|
|
32
33
|
reuse_option_id: null,
|
|
33
34
|
reuse_from: null,
|
|
34
35
|
area_code: null,
|
|
36
|
+
pre_order: null,
|
|
35
37
|
end_user_first_name: null,
|
|
36
38
|
end_user_last_name: null,
|
|
37
39
|
values: null,
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **requirement_id** | **String** | | |
|
|
8
8
|
| **document_id** | **String** | Id from POST /v1/phone-numbers/kyc/upload-document. | |
|
|
9
|
+
| **issued_at** | **Date** | Date printed on the document (YYYY-MM-DD), for slots the regulator windows such as proof of address. The pre-submit review trusts it over its own read of the PDF. | [optional] |
|
|
9
10
|
|
|
10
11
|
## Example
|
|
11
12
|
|
|
@@ -14,7 +15,8 @@ require 'zernio-sdk'
|
|
|
14
15
|
|
|
15
16
|
instance = Zernio::SubmitPhoneNumberKycRequestDocumentsInnerOneOf1.new(
|
|
16
17
|
requirement_id: null,
|
|
17
|
-
document_id: null
|
|
18
|
+
document_id: null,
|
|
19
|
+
issued_at: null
|
|
18
20
|
)
|
|
19
21
|
```
|
|
20
22
|
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
| **reuse_option_id** | **String** | Which reusable verification to use (GET reusable.options[].id). The unambiguous selection key. Omitted = the approved default. No match = 409. | [optional] |
|
|
13
13
|
| **reuse_from** | **String** | Legacy fallback for `reuseOptionId`: the source phone number (GET reusable.options[].fromPhoneNumber). Ambiguous when a number labels two verifications, so prefer `reuseOptionId`. Omitted = the approved default. No match = 409. | [optional] |
|
|
14
14
|
| **area_code** | **String** | Area code (NDC) the number must be in. Hard constraint: an empty area pool fails with 409 code AREA_CODE_UNAVAILABLE instead of ordering from another area. Omit for any area. Options come from GET /v1/phone-numbers/availability (areaOptions); the purchase 202 kycUrl echoes the areaCode picked at purchase time so it can be passed here. | [optional] |
|
|
15
|
+
| **pre_order** | **Boolean** | With areaCode: pre-order that area when it has no stock (an area listed in soldOutAreas with preOrderable true) instead of failing with AREA_CODE_UNAVAILABLE. The carrier sources a number in that area. | [optional] |
|
|
15
16
|
| **end_user_first_name** | **String** | End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement. | [optional] |
|
|
16
17
|
| **end_user_last_name** | **String** | End user's legal last name. Same condition as endUserFirstName. | [optional] |
|
|
17
18
|
| **values** | **Hash<String, String>** | requirementId → textual value | [optional] |
|
|
@@ -32,6 +33,7 @@ instance = Zernio::SubmitWhatsAppNumberKycRequest.new(
|
|
|
32
33
|
reuse_option_id: null,
|
|
33
34
|
reuse_from: null,
|
|
34
35
|
area_code: null,
|
|
36
|
+
pre_order: null,
|
|
35
37
|
end_user_first_name: null,
|
|
36
38
|
end_user_last_name: null,
|
|
37
39
|
values: null,
|
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **country** | **String** | ISO 3166-1 alpha-2 country code of the watched country. | |
|
|
8
8
|
| **types** | [**Array<WebhookPayloadPhoneNumberStockAvailableStockTypesInner>**](WebhookPayloadPhoneNumberStockAvailableStockTypesInner.md) | Number types deliverable at sweep time. Only types with stock are listed. | |
|
|
9
|
+
| **area_code** | **String** | Set when the watch named an area: the area code (NDC) that is back in stock. | [optional] |
|
|
10
|
+
| **area_name** | **String** | The name of that area, when known. | [optional] |
|
|
9
11
|
|
|
10
12
|
## Example
|
|
11
13
|
|
|
@@ -14,7 +16,9 @@ require 'zernio-sdk'
|
|
|
14
16
|
|
|
15
17
|
instance = Zernio::WebhookPayloadPhoneNumberStockAvailableStock.new(
|
|
16
18
|
country: null,
|
|
17
|
-
types: null
|
|
19
|
+
types: null,
|
|
20
|
+
area_code: null,
|
|
21
|
+
area_name: null
|
|
18
22
|
)
|
|
19
23
|
```
|
|
20
24
|
|
|
@@ -361,7 +361,7 @@ module Zernio
|
|
|
361
361
|
end
|
|
362
362
|
|
|
363
363
|
# Watch an out-of-stock country
|
|
364
|
-
# 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 and number type; 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 watches at once. Countries and types marked `fulfilment: request` by GET /v1/phone-numbers/countries can also be watched, but anything with `preOrderable: true` does not need a watch: submit KYC and the carrier sources the number to order.
|
|
364
|
+
# 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 and number type; 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 watches at once. Countries and types marked `fulfilment: request` by GET /v1/phone-numbers/countries can also be watched, but anything with `preOrderable: true` does not need a watch: submit KYC and the carrier sources the number to order. Pass `areaCode` (with `numberType`) to watch one sold-out area, for example an entry of `soldOutAreas` from GET /v1/phone-numbers/availability. Area stock is checked live on the same 6h cadence.
|
|
365
365
|
# @param create_phone_number_stock_watch_request [CreatePhoneNumberStockWatchRequest]
|
|
366
366
|
# @param [Hash] opts the optional parameters
|
|
367
367
|
# @return [PhoneNumberStockWatch]
|
|
@@ -371,7 +371,7 @@ module Zernio
|
|
|
371
371
|
end
|
|
372
372
|
|
|
373
373
|
# Watch an out-of-stock country
|
|
374
|
-
# 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 and number type; 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 watches at once. Countries and types marked `fulfilment: request` by GET /v1/phone-numbers/countries can also be watched, but anything with `preOrderable: true` does not need a watch: submit KYC and the carrier sources the number to order.
|
|
374
|
+
# 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 and number type; 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 watches at once. Countries and types marked `fulfilment: request` by GET /v1/phone-numbers/countries can also be watched, but anything with `preOrderable: true` does not need a watch: submit KYC and the carrier sources the number to order. Pass `areaCode` (with `numberType`) to watch one sold-out area, for example an entry of `soldOutAreas` from GET /v1/phone-numbers/availability. Area stock is checked live on the same 6h cadence.
|
|
375
375
|
# @param create_phone_number_stock_watch_request [CreatePhoneNumberStockWatchRequest]
|
|
376
376
|
# @param [Hash] opts the optional parameters
|
|
377
377
|
# @return [Array<(PhoneNumberStockWatch, Integer, Hash)>] PhoneNumberStockWatch data, response status code and response headers
|
|
@@ -33,6 +33,9 @@ module Zernio
|
|
|
33
33
|
# Live inventory grouped by area code. For US and CA this is the full country inventory (every area code with stock, recognizable metros listed first, then alphabetical); other countries are ordered largest stock first; they list the areas in the latest inventory page (up to 500 numbers, which for most countries is the entire pool). Empty when out of stock (or the area lookup failed). Pass a chosen `ndc` as `areaCode` on POST /v1/phone-numbers/purchase (or on the KYC submit for regulated countries) to require that area.
|
|
34
34
|
attr_accessor :area_options
|
|
35
35
|
|
|
36
|
+
# Areas that had stock in the last 90 days and have none now. Pass one as `areaCode` with `preOrder: true` on the KYC submit when `preOrderable` is true, or watch it with POST /v1/phone-numbers/stock-watches.
|
|
37
|
+
attr_accessor :sold_out_areas
|
|
38
|
+
|
|
36
39
|
class EnumAttributeValidator
|
|
37
40
|
attr_reader :datatype
|
|
38
41
|
attr_reader :allowable_values
|
|
@@ -64,7 +67,8 @@ module Zernio
|
|
|
64
67
|
:'pre_orderable' => :'preOrderable',
|
|
65
68
|
:'address_constraint' => :'addressConstraint',
|
|
66
69
|
:'areas' => :'areas',
|
|
67
|
-
:'area_options' => :'areaOptions'
|
|
70
|
+
:'area_options' => :'areaOptions',
|
|
71
|
+
:'sold_out_areas' => :'soldOutAreas'
|
|
68
72
|
}
|
|
69
73
|
end
|
|
70
74
|
|
|
@@ -87,7 +91,8 @@ module Zernio
|
|
|
87
91
|
:'pre_orderable' => :'Boolean',
|
|
88
92
|
:'address_constraint' => :'String',
|
|
89
93
|
:'areas' => :'Array<String>',
|
|
90
|
-
:'area_options' => :'Array<CheckPhoneNumberAvailability200ResponseAreaOptionsInner>'
|
|
94
|
+
:'area_options' => :'Array<CheckPhoneNumberAvailability200ResponseAreaOptionsInner>',
|
|
95
|
+
:'sold_out_areas' => :'Array<CheckPhoneNumberAvailability200ResponseSoldOutAreasInner>'
|
|
91
96
|
}
|
|
92
97
|
end
|
|
93
98
|
|
|
@@ -144,6 +149,12 @@ module Zernio
|
|
|
144
149
|
self.area_options = value
|
|
145
150
|
end
|
|
146
151
|
end
|
|
152
|
+
|
|
153
|
+
if attributes.key?(:'sold_out_areas')
|
|
154
|
+
if (value = attributes[:'sold_out_areas']).is_a?(Array)
|
|
155
|
+
self.sold_out_areas = value
|
|
156
|
+
end
|
|
157
|
+
end
|
|
147
158
|
end
|
|
148
159
|
|
|
149
160
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -184,7 +195,8 @@ module Zernio
|
|
|
184
195
|
pre_orderable == o.pre_orderable &&
|
|
185
196
|
address_constraint == o.address_constraint &&
|
|
186
197
|
areas == o.areas &&
|
|
187
|
-
area_options == o.area_options
|
|
198
|
+
area_options == o.area_options &&
|
|
199
|
+
sold_out_areas == o.sold_out_areas
|
|
188
200
|
end
|
|
189
201
|
|
|
190
202
|
# @see the `==` method
|
|
@@ -196,7 +208,7 @@ module Zernio
|
|
|
196
208
|
# Calculates hash code according to all attributes.
|
|
197
209
|
# @return [Integer] Hash code
|
|
198
210
|
def hash
|
|
199
|
-
[country, number_type, available, pre_orderable, address_constraint, areas, area_options].hash
|
|
211
|
+
[country, number_type, available, pre_orderable, address_constraint, areas, area_options, sold_out_areas].hash
|
|
200
212
|
end
|
|
201
213
|
|
|
202
214
|
# Builds the object from hash
|
data/lib/zernio-sdk/models/check_phone_number_availability200_response_sold_out_areas_inner.rb
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema).
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.4
|
|
7
|
+
Contact: support@zernio.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.19.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module Zernio
|
|
17
|
+
class CheckPhoneNumberAvailability200ResponseSoldOutAreasInner < ApiModelBase
|
|
18
|
+
# Area code (national destination code).
|
|
19
|
+
attr_accessor :ndc
|
|
20
|
+
|
|
21
|
+
# Area name.
|
|
22
|
+
attr_accessor :name
|
|
23
|
+
|
|
24
|
+
# Whether this area can be pre-ordered: the carrier sources a number in it (usually 2 to 4 weeks, never guaranteed).
|
|
25
|
+
attr_accessor :pre_orderable
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'ndc' => :'ndc',
|
|
31
|
+
:'name' => :'name',
|
|
32
|
+
:'pre_orderable' => :'preOrderable'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns attribute mapping this model knows about
|
|
37
|
+
def self.acceptable_attribute_map
|
|
38
|
+
attribute_map
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
acceptable_attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'ndc' => :'String',
|
|
50
|
+
:'name' => :'String',
|
|
51
|
+
:'pre_orderable' => :'Boolean'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# List of attributes with nullable: true
|
|
56
|
+
def self.openapi_nullable
|
|
57
|
+
Set.new([
|
|
58
|
+
])
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Initializes the object
|
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
63
|
+
def initialize(attributes = {})
|
|
64
|
+
if (!attributes.is_a?(Hash))
|
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::CheckPhoneNumberAvailability200ResponseSoldOutAreasInner` initialize method"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
69
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
70
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
71
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
72
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::CheckPhoneNumberAvailability200ResponseSoldOutAreasInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
73
|
+
end
|
|
74
|
+
h[k.to_sym] = v
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'ndc')
|
|
78
|
+
self.ndc = attributes[:'ndc']
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'name')
|
|
82
|
+
self.name = attributes[:'name']
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
if attributes.key?(:'pre_orderable')
|
|
86
|
+
self.pre_orderable = attributes[:'pre_orderable']
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
91
|
+
# @return Array for valid properties with the reasons
|
|
92
|
+
def list_invalid_properties
|
|
93
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
94
|
+
invalid_properties = Array.new
|
|
95
|
+
invalid_properties
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Check to see if the all the properties in the model are valid
|
|
99
|
+
# @return true if the model is valid
|
|
100
|
+
def valid?
|
|
101
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
102
|
+
true
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
# Checks equality by comparing each attribute.
|
|
106
|
+
# @param [Object] Object to be compared
|
|
107
|
+
def ==(o)
|
|
108
|
+
return true if self.equal?(o)
|
|
109
|
+
self.class == o.class &&
|
|
110
|
+
ndc == o.ndc &&
|
|
111
|
+
name == o.name &&
|
|
112
|
+
pre_orderable == o.pre_orderable
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# @see the `==` method
|
|
116
|
+
# @param [Object] Object to be compared
|
|
117
|
+
def eql?(o)
|
|
118
|
+
self == o
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Calculates hash code according to all attributes.
|
|
122
|
+
# @return [Integer] Hash code
|
|
123
|
+
def hash
|
|
124
|
+
[ndc, name, pre_orderable].hash
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Builds the object from hash
|
|
128
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
129
|
+
# @return [Object] Returns the model itself
|
|
130
|
+
def self.build_from_hash(attributes)
|
|
131
|
+
return nil unless attributes.is_a?(Hash)
|
|
132
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
133
|
+
transformed_hash = {}
|
|
134
|
+
openapi_types.each_pair do |key, type|
|
|
135
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
136
|
+
transformed_hash["#{key}"] = nil
|
|
137
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
138
|
+
# check to ensure the input is an array given that the attribute
|
|
139
|
+
# is documented as an array but the input is not
|
|
140
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
141
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
142
|
+
end
|
|
143
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
144
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
new(transformed_hash)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Returns the object in the form of hash
|
|
151
|
+
# @return [Hash] Returns the object in the form of hash
|
|
152
|
+
def to_hash
|
|
153
|
+
hash = {}
|
|
154
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
155
|
+
value = self.send(attr)
|
|
156
|
+
if value.nil?
|
|
157
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
158
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
hash[param] = _to_hash(value)
|
|
162
|
+
end
|
|
163
|
+
hash
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
end
|
|
@@ -21,6 +21,9 @@ module Zernio
|
|
|
21
21
|
# Narrow the watch to one number type. Omit to be notified when any type in the country is back.
|
|
22
22
|
attr_accessor :number_type
|
|
23
23
|
|
|
24
|
+
# Narrow the watch to one area code (NDC). Requires numberType.
|
|
25
|
+
attr_accessor :area_code
|
|
26
|
+
|
|
24
27
|
class EnumAttributeValidator
|
|
25
28
|
attr_reader :datatype
|
|
26
29
|
attr_reader :allowable_values
|
|
@@ -47,7 +50,8 @@ module Zernio
|
|
|
47
50
|
def self.attribute_map
|
|
48
51
|
{
|
|
49
52
|
:'country' => :'country',
|
|
50
|
-
:'number_type' => :'numberType'
|
|
53
|
+
:'number_type' => :'numberType',
|
|
54
|
+
:'area_code' => :'areaCode'
|
|
51
55
|
}
|
|
52
56
|
end
|
|
53
57
|
|
|
@@ -65,7 +69,8 @@ module Zernio
|
|
|
65
69
|
def self.openapi_types
|
|
66
70
|
{
|
|
67
71
|
:'country' => :'String',
|
|
68
|
-
:'number_type' => :'String'
|
|
72
|
+
:'number_type' => :'String',
|
|
73
|
+
:'area_code' => :'String'
|
|
69
74
|
}
|
|
70
75
|
end
|
|
71
76
|
|
|
@@ -100,6 +105,10 @@ module Zernio
|
|
|
100
105
|
if attributes.key?(:'number_type')
|
|
101
106
|
self.number_type = attributes[:'number_type']
|
|
102
107
|
end
|
|
108
|
+
|
|
109
|
+
if attributes.key?(:'area_code')
|
|
110
|
+
self.area_code = attributes[:'area_code']
|
|
111
|
+
end
|
|
103
112
|
end
|
|
104
113
|
|
|
105
114
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -119,6 +128,11 @@ module Zernio
|
|
|
119
128
|
invalid_properties.push('invalid value for "country", the character length must be greater than or equal to 2.')
|
|
120
129
|
end
|
|
121
130
|
|
|
131
|
+
pattern = Regexp.new(/^\d{1,4}$/)
|
|
132
|
+
if !@area_code.nil? && @area_code !~ pattern
|
|
133
|
+
invalid_properties.push("invalid value for \"area_code\", must conform to the pattern #{pattern}.")
|
|
134
|
+
end
|
|
135
|
+
|
|
122
136
|
invalid_properties
|
|
123
137
|
end
|
|
124
138
|
|
|
@@ -131,6 +145,7 @@ module Zernio
|
|
|
131
145
|
return false if @country.to_s.length < 2
|
|
132
146
|
number_type_validator = EnumAttributeValidator.new('String', ["local", "mobile", "national", "toll_free"])
|
|
133
147
|
return false unless number_type_validator.valid?(@number_type)
|
|
148
|
+
return false if !@area_code.nil? && @area_code !~ Regexp.new(/^\d{1,4}$/)
|
|
134
149
|
true
|
|
135
150
|
end
|
|
136
151
|
|
|
@@ -162,13 +177,29 @@ module Zernio
|
|
|
162
177
|
@number_type = number_type
|
|
163
178
|
end
|
|
164
179
|
|
|
180
|
+
# Custom attribute writer method with validation
|
|
181
|
+
# @param [Object] area_code Value to be assigned
|
|
182
|
+
def area_code=(area_code)
|
|
183
|
+
if area_code.nil?
|
|
184
|
+
fail ArgumentError, 'area_code cannot be nil'
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
pattern = Regexp.new(/^\d{1,4}$/)
|
|
188
|
+
if area_code !~ pattern
|
|
189
|
+
fail ArgumentError, "invalid value for \"area_code\", must conform to the pattern #{pattern}."
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
@area_code = area_code
|
|
193
|
+
end
|
|
194
|
+
|
|
165
195
|
# Checks equality by comparing each attribute.
|
|
166
196
|
# @param [Object] Object to be compared
|
|
167
197
|
def ==(o)
|
|
168
198
|
return true if self.equal?(o)
|
|
169
199
|
self.class == o.class &&
|
|
170
200
|
country == o.country &&
|
|
171
|
-
number_type == o.number_type
|
|
201
|
+
number_type == o.number_type &&
|
|
202
|
+
area_code == o.area_code
|
|
172
203
|
end
|
|
173
204
|
|
|
174
205
|
# @see the `==` method
|
|
@@ -180,7 +211,7 @@ module Zernio
|
|
|
180
211
|
# Calculates hash code according to all attributes.
|
|
181
212
|
# @return [Integer] Hash code
|
|
182
213
|
def hash
|
|
183
|
-
[country, number_type].hash
|
|
214
|
+
[country, number_type, area_code].hash
|
|
184
215
|
end
|
|
185
216
|
|
|
186
217
|
# Builds the object from hash
|
|
@@ -25,6 +25,9 @@ module Zernio
|
|
|
25
25
|
# The watched number type, or null when the watch covers every type in the country.
|
|
26
26
|
attr_accessor :number_type
|
|
27
27
|
|
|
28
|
+
# The watched area code (NDC), or null when the watch covers every area.
|
|
29
|
+
attr_accessor :area_code
|
|
30
|
+
|
|
28
31
|
attr_accessor :created_at
|
|
29
32
|
|
|
30
33
|
class EnumAttributeValidator
|
|
@@ -56,6 +59,7 @@ module Zernio
|
|
|
56
59
|
:'country' => :'country',
|
|
57
60
|
:'country_name' => :'countryName',
|
|
58
61
|
:'number_type' => :'numberType',
|
|
62
|
+
:'area_code' => :'areaCode',
|
|
59
63
|
:'created_at' => :'createdAt'
|
|
60
64
|
}
|
|
61
65
|
end
|
|
@@ -77,6 +81,7 @@ module Zernio
|
|
|
77
81
|
:'country' => :'String',
|
|
78
82
|
:'country_name' => :'String',
|
|
79
83
|
:'number_type' => :'String',
|
|
84
|
+
:'area_code' => :'String',
|
|
80
85
|
:'created_at' => :'Time'
|
|
81
86
|
}
|
|
82
87
|
end
|
|
@@ -85,6 +90,7 @@ module Zernio
|
|
|
85
90
|
def self.openapi_nullable
|
|
86
91
|
Set.new([
|
|
87
92
|
:'number_type',
|
|
93
|
+
:'area_code',
|
|
88
94
|
])
|
|
89
95
|
end
|
|
90
96
|
|
|
@@ -128,6 +134,10 @@ module Zernio
|
|
|
128
134
|
self.number_type = nil
|
|
129
135
|
end
|
|
130
136
|
|
|
137
|
+
if attributes.key?(:'area_code')
|
|
138
|
+
self.area_code = attributes[:'area_code']
|
|
139
|
+
end
|
|
140
|
+
|
|
131
141
|
if attributes.key?(:'created_at')
|
|
132
142
|
self.created_at = attributes[:'created_at']
|
|
133
143
|
else
|
|
@@ -231,6 +241,7 @@ module Zernio
|
|
|
231
241
|
country == o.country &&
|
|
232
242
|
country_name == o.country_name &&
|
|
233
243
|
number_type == o.number_type &&
|
|
244
|
+
area_code == o.area_code &&
|
|
234
245
|
created_at == o.created_at
|
|
235
246
|
end
|
|
236
247
|
|
|
@@ -243,7 +254,7 @@ module Zernio
|
|
|
243
254
|
# Calculates hash code according to all attributes.
|
|
244
255
|
# @return [Integer] Hash code
|
|
245
256
|
def hash
|
|
246
|
-
[id, country, country_name, number_type, created_at].hash
|
|
257
|
+
[id, country, country_name, number_type, area_code, created_at].hash
|
|
247
258
|
end
|
|
248
259
|
|
|
249
260
|
# Builds the object from hash
|