late-sdk 0.0.569 → 0.0.570
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/CheckPhoneNumberAvailability200ResponseAreaOptionsInner.md +22 -0
- data/docs/CreatePhoneNumberKycLinkRequest.md +2 -0
- data/docs/PhoneNumbersApi.md +3 -1
- data/docs/PurchasePhoneNumberRequest.md +2 -0
- data/docs/SubmitPhoneNumberKycRequest.md +2 -0
- data/docs/SubmitWhatsAppNumberKycRequest.md +2 -0
- data/docs/WhatsAppPhoneNumbersApi.md +3 -1
- data/lib/zernio-sdk/api/phone_numbers_api.rb +3 -0
- data/lib/zernio-sdk/api/whats_app_phone_numbers_api.rb +3 -0
- data/lib/zernio-sdk/models/check_phone_number_availability200_response.rb +16 -4
- data/lib/zernio-sdk/models/check_phone_number_availability200_response_area_options_inner.rb +168 -0
- data/lib/zernio-sdk/models/create_phone_number_kyc_link_request.rb +32 -1
- data/lib/zernio-sdk/models/purchase_phone_number409_response.rb +2 -2
- data/lib/zernio-sdk/models/purchase_phone_number_request.rb +32 -1
- data/lib/zernio-sdk/models/submit_phone_number_kyc_request.rb +32 -1
- data/lib/zernio-sdk/models/submit_whats_app_number_kyc_request.rb +32 -1
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +1 -0
- data/openapi.yaml +59 -10
- data/spec/api/phone_numbers_api_spec.rb +1 -0
- data/spec/api/whats_app_phone_numbers_api_spec.rb +1 -0
- data/spec/models/check_phone_number_availability200_response_area_options_inner_spec.rb +48 -0
- data/spec/models/check_phone_number_availability200_response_spec.rb +6 -0
- data/spec/models/create_phone_number_kyc_link_request_spec.rb +6 -0
- data/spec/models/purchase_phone_number409_response_spec.rb +1 -1
- data/spec/models/purchase_phone_number_request_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/zernio-sdk-0.0.570.gem +0 -0
- metadata +6 -2
- data/zernio-sdk-0.0.569.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: c6662697b65680201c5406dc215197a7698d35f9eb962faaf4b131add23906cb
|
|
4
|
+
data.tar.gz: 53a2f69256a9bd88806d40e70be0aaa70bb415d5fccb72fa99c9ca9f8f6c0aa8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a794eb29b649101ab9b233ca322079b4141b15d7440222181ff56ff2f99a3320d6785abb4160d22770b9a5af7433a6e52f6f65a377d58c4299834fa1c7ec5322
|
|
7
|
+
data.tar.gz: e6ec84fb9678b5043b3edca764f0b1a3d4a140a84d127da39ea20591833a734bcc27ae57fb5094565c689e1d27cdd9bf1df1f8f79644e5cebe9e266fc5710614
|
data/README.md
CHANGED
|
@@ -695,6 +695,7 @@ Class | Method | HTTP request | Description
|
|
|
695
695
|
- [Zernio::CancelBroadcast200Response](docs/CancelBroadcast200Response.md)
|
|
696
696
|
- [Zernio::CancelPhoneNumberPortIn200Response](docs/CancelPhoneNumberPortIn200Response.md)
|
|
697
697
|
- [Zernio::CheckPhoneNumberAvailability200Response](docs/CheckPhoneNumberAvailability200Response.md)
|
|
698
|
+
- [Zernio::CheckPhoneNumberAvailability200ResponseAreaOptionsInner](docs/CheckPhoneNumberAvailability200ResponseAreaOptionsInner.md)
|
|
698
699
|
- [Zernio::CheckPhoneNumberPortability200Response](docs/CheckPhoneNumberPortability200Response.md)
|
|
699
700
|
- [Zernio::CheckPhoneNumberPortability200ResponseResultsInner](docs/CheckPhoneNumberPortability200ResponseResultsInner.md)
|
|
700
701
|
- [Zernio::CheckPhoneNumberPortabilityRequest](docs/CheckPhoneNumberPortabilityRequest.md)
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
| **available** | **Boolean** | Whether deliverable voice inventory exists right now. | [optional] |
|
|
10
10
|
| **address_constraint** | **String** | | [optional] |
|
|
11
11
|
| **areas** | **Array<String>** | For `geo` only — the area(s) the registered address must be in. | [optional] |
|
|
12
|
+
| **area_options** | [**Array<CheckPhoneNumberAvailability200ResponseAreaOptionsInner>**](CheckPhoneNumberAvailability200ResponseAreaOptionsInner.md) | Live inventory grouped by area code, largest stock first. 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] |
|
|
12
13
|
|
|
13
14
|
## Example
|
|
14
15
|
|
|
@@ -20,7 +21,8 @@ instance = Zernio::CheckPhoneNumberAvailability200Response.new(
|
|
|
20
21
|
number_type: null,
|
|
21
22
|
available: null,
|
|
22
23
|
address_constraint: null,
|
|
23
|
-
areas: null
|
|
24
|
+
areas: null,
|
|
25
|
+
area_options: null
|
|
24
26
|
)
|
|
25
27
|
```
|
|
26
28
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::CheckPhoneNumberAvailability200ResponseAreaOptionsInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **ndc** | **String** | Area code (national destination code), e.g. \"11\". | [optional] |
|
|
8
|
+
| **name** | **String** | Human-readable area name, e.g. \"Sao Paulo\". | [optional] |
|
|
9
|
+
| **count** | **Integer** | Deliverable numbers seen in this area on the latest inventory page. | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::CheckPhoneNumberAvailability200ResponseAreaOptionsInner.new(
|
|
17
|
+
ndc: null,
|
|
18
|
+
name: null,
|
|
19
|
+
count: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **profile_id** | **String** | | |
|
|
8
8
|
| **country** | **String** | ISO 3166-1 alpha-2 country code (must be a regulated/KYC country). | |
|
|
9
|
+
| **area_code** | **String** | Area code (NDC) the eventual number must be in. Hard constraint carried by the link; the end customer filling the form makes no area choice. Options come from GET /v1/phone-numbers/availability (areaOptions). | [optional] |
|
|
9
10
|
| **branding** | [**CreatePhoneNumberKycLinkRequestBranding**](CreatePhoneNumberKycLinkRequestBranding.md) | | [optional] |
|
|
10
11
|
| **redirect_url** | **String** | Where to send the end customer's browser after a successful submit. On completion Zernio appends `kyc=submitted` and `country=<ISO-2>` as query params. When omitted, the hosted page shows a built-in confirmation screen instead. | [optional] |
|
|
11
12
|
|
|
@@ -17,6 +18,7 @@ require 'zernio-sdk'
|
|
|
17
18
|
instance = Zernio::CreatePhoneNumberKycLinkRequest.new(
|
|
18
19
|
profile_id: null,
|
|
19
20
|
country: null,
|
|
21
|
+
area_code: null,
|
|
20
22
|
branding: null,
|
|
21
23
|
redirect_url: null
|
|
22
24
|
)
|
data/docs/PhoneNumbersApi.md
CHANGED
|
@@ -122,7 +122,8 @@ end
|
|
|
122
122
|
api_instance = Zernio::PhoneNumbersApi.new
|
|
123
123
|
country = 'country_example' # String | ISO-2 country code.
|
|
124
124
|
opts = {
|
|
125
|
-
number_type: 'local' # String | Check a specific offered type (stock and address constraints are per type). Omitted = the country's default type.
|
|
125
|
+
number_type: 'local', # String | Check a specific offered type (stock and address constraints are per type). Omitted = the country's default type.
|
|
126
|
+
sms: true # Boolean | Pass true when the buyer wants SMS: availability, areas, and areaOptions then describe the SMS-capable pool (an SMS purchase orders from it), not the wider voice-only pool.
|
|
126
127
|
}
|
|
127
128
|
|
|
128
129
|
begin
|
|
@@ -158,6 +159,7 @@ end
|
|
|
158
159
|
| ---- | ---- | ----------- | ----- |
|
|
159
160
|
| **country** | **String** | ISO-2 country code. | |
|
|
160
161
|
| **number_type** | **String** | Check a specific offered type (stock and address constraints are per type). Omitted = the country's default type. | [optional] |
|
|
162
|
+
| **sms** | **Boolean** | Pass true when the buyer wants SMS: availability, areas, and areaOptions then describe the SMS-capable pool (an SMS purchase orders from it), not the wider voice-only pool. | [optional] |
|
|
161
163
|
|
|
162
164
|
### Return type
|
|
163
165
|
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
| **profile_id** | **String** | Profile to associate the number with | |
|
|
8
8
|
| **country** | **String** | ISO 3166-1 alpha-2 country for the number (default US). International numbers require usage-based billing. Tier 3/4 countries return 202 { status: \"kyc_required\", kycUrl } — the customer must complete KYC at that URL before the number is ordered. See GET /v1/phone-numbers/countries. | [optional][default to 'US'] |
|
|
9
9
|
| **number_type** | **String** | Which of the country's offered number types to order (see `types[]` on GET /v1/phone-numbers/countries). Omitted = the country's default type, which is always the WhatsApp-safe choice. Capabilities, price, and KYC requirements are per (country, type): toll_free can never connect WhatsApp (400 when combined with connectWhatsapp:true), and wantsSms:true requires an SMS-capable type. | [optional] |
|
|
10
|
+
| **area_code** | **String** | Area code (national destination code, e.g. 11 for Sao Paulo) the number must be in. Hard constraint: when the area has no deliverable inventory the purchase fails with 409 code AREA_CODE_UNAVAILABLE instead of assigning a number from another area, and later replacements stay in this area too. Omit for any area. Get live options from GET /v1/phone-numbers/availability (areaOptions). | [optional] |
|
|
10
11
|
| **connect_whatsapp** | **Boolean** | A phone number is the unit; WhatsApp is one optional feature. Pass false to buy a STANDALONE number (Calls/SMS only): provisioning skips the Meta pre-verify/OTP steps and the number activates immediately. Omitted defaults to the WhatsApp provisioning path. WhatsApp can be connected to a standalone number later from the connect flow. | [optional][default to true] |
|
|
11
12
|
| **wants_sms** | **Boolean** | SMS capability is per-number, not per-country. Pass true to provision from the SMS-capable inventory pool so the number can actually text (see also GET /v1/phone-numbers/available with sms=true, and smsAvailable on GET /v1/phone-numbers/countries). | [optional][default to false] |
|
|
12
13
|
| **wants_whatsapp** | **Boolean** | Declare WhatsApp intent on a STANDALONE purchase (connectWhatsapp:false). The number still activates and bills immediately, but if WhatsApp's buy-time check rejects the assigned number, it is automatically swapped for a WhatsApp-eligible one during the purchase instead of being delivered with WhatsApp unavailable. Ignored on the WhatsApp provisioning path (connectWhatsapp omitted or true), which always delivers a WhatsApp-verified number. | [optional][default to false] |
|
|
@@ -22,6 +23,7 @@ instance = Zernio::PurchasePhoneNumberRequest.new(
|
|
|
22
23
|
profile_id: null,
|
|
23
24
|
country: null,
|
|
24
25
|
number_type: null,
|
|
26
|
+
area_code: null,
|
|
25
27
|
connect_whatsapp: null,
|
|
26
28
|
wants_sms: null,
|
|
27
29
|
wants_whatsapp: null,
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
| **reuse** | **Boolean** | Reuse a prior approved verification for this country (skips document/field collection; places the order immediately). | [optional] |
|
|
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 — prefer `reuseOptionId`. Omitted = the approved default. No match = 409. | [optional] |
|
|
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] |
|
|
14
15
|
| **end_user_first_name** | **String** | End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement. | [optional] |
|
|
15
16
|
| **end_user_last_name** | **String** | End user's legal last name. Same condition as endUserFirstName. | [optional] |
|
|
16
17
|
| **values** | **Hash<String, String>** | requirementId → textual value | [optional] |
|
|
@@ -30,6 +31,7 @@ instance = Zernio::SubmitPhoneNumberKycRequest.new(
|
|
|
30
31
|
reuse: null,
|
|
31
32
|
reuse_option_id: null,
|
|
32
33
|
reuse_from: null,
|
|
34
|
+
area_code: null,
|
|
33
35
|
end_user_first_name: null,
|
|
34
36
|
end_user_last_name: null,
|
|
35
37
|
values: null,
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
| **reuse** | **Boolean** | Reuse a prior approved verification for this country (skips document/field collection; places the order immediately). | [optional] |
|
|
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 — prefer `reuseOptionId`. Omitted = the approved default. No match = 409. | [optional] |
|
|
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] |
|
|
14
15
|
| **end_user_first_name** | **String** | End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement. | [optional] |
|
|
15
16
|
| **end_user_last_name** | **String** | End user's legal last name. Same condition as endUserFirstName. | [optional] |
|
|
16
17
|
| **values** | **Hash<String, String>** | requirementId → textual value | [optional] |
|
|
@@ -30,6 +31,7 @@ instance = Zernio::SubmitWhatsAppNumberKycRequest.new(
|
|
|
30
31
|
reuse: null,
|
|
31
32
|
reuse_option_id: null,
|
|
32
33
|
reuse_from: null,
|
|
34
|
+
area_code: null,
|
|
33
35
|
end_user_first_name: null,
|
|
34
36
|
end_user_last_name: null,
|
|
35
37
|
values: null,
|
|
@@ -43,7 +43,8 @@ end
|
|
|
43
43
|
api_instance = Zernio::WhatsAppPhoneNumbersApi.new
|
|
44
44
|
country = 'country_example' # String | ISO-2 country code.
|
|
45
45
|
opts = {
|
|
46
|
-
number_type: 'local' # String | Check a specific offered type (stock and address constraints are per type). Omitted = the country's default type.
|
|
46
|
+
number_type: 'local', # String | Check a specific offered type (stock and address constraints are per type). Omitted = the country's default type.
|
|
47
|
+
sms: true # Boolean | Pass true when the buyer wants SMS: availability, areas, and areaOptions then describe the SMS-capable pool (an SMS purchase orders from it), not the wider voice-only pool.
|
|
47
48
|
}
|
|
48
49
|
|
|
49
50
|
begin
|
|
@@ -79,6 +80,7 @@ end
|
|
|
79
80
|
| ---- | ---- | ----------- | ----- |
|
|
80
81
|
| **country** | **String** | ISO-2 country code. | |
|
|
81
82
|
| **number_type** | **String** | Check a specific offered type (stock and address constraints are per type). Omitted = the country's default type. | [optional] |
|
|
83
|
+
| **sms** | **Boolean** | Pass true when the buyer wants SMS: availability, areas, and areaOptions then describe the SMS-capable pool (an SMS purchase orders from it), not the wider voice-only pool. | [optional] |
|
|
82
84
|
|
|
83
85
|
### Return type
|
|
84
86
|
|
|
@@ -87,6 +87,7 @@ module Zernio
|
|
|
87
87
|
# @param country [String] ISO-2 country code.
|
|
88
88
|
# @param [Hash] opts the optional parameters
|
|
89
89
|
# @option opts [String] :number_type Check a specific offered type (stock and address constraints are per type). Omitted = the country's default type.
|
|
90
|
+
# @option opts [Boolean] :sms Pass true when the buyer wants SMS: availability, areas, and areaOptions then describe the SMS-capable pool (an SMS purchase orders from it), not the wider voice-only pool.
|
|
90
91
|
# @return [CheckPhoneNumberAvailability200Response]
|
|
91
92
|
def check_phone_number_availability(country, opts = {})
|
|
92
93
|
data, _status_code, _headers = check_phone_number_availability_with_http_info(country, opts)
|
|
@@ -98,6 +99,7 @@ module Zernio
|
|
|
98
99
|
# @param country [String] ISO-2 country code.
|
|
99
100
|
# @param [Hash] opts the optional parameters
|
|
100
101
|
# @option opts [String] :number_type Check a specific offered type (stock and address constraints are per type). Omitted = the country's default type.
|
|
102
|
+
# @option opts [Boolean] :sms Pass true when the buyer wants SMS: availability, areas, and areaOptions then describe the SMS-capable pool (an SMS purchase orders from it), not the wider voice-only pool.
|
|
101
103
|
# @return [Array<(CheckPhoneNumberAvailability200Response, Integer, Hash)>] CheckPhoneNumberAvailability200Response data, response status code and response headers
|
|
102
104
|
def check_phone_number_availability_with_http_info(country, opts = {})
|
|
103
105
|
if @api_client.config.debugging
|
|
@@ -118,6 +120,7 @@ module Zernio
|
|
|
118
120
|
query_params = opts[:query_params] || {}
|
|
119
121
|
query_params[:'country'] = country
|
|
120
122
|
query_params[:'numberType'] = opts[:'number_type'] if !opts[:'number_type'].nil?
|
|
123
|
+
query_params[:'sms'] = opts[:'sms'] if !opts[:'sms'].nil?
|
|
121
124
|
|
|
122
125
|
# header parameters
|
|
123
126
|
header_params = opts[:header_params] || {}
|
|
@@ -24,6 +24,7 @@ module Zernio
|
|
|
24
24
|
# @param country [String] ISO-2 country code.
|
|
25
25
|
# @param [Hash] opts the optional parameters
|
|
26
26
|
# @option opts [String] :number_type Check a specific offered type (stock and address constraints are per type). Omitted = the country's default type.
|
|
27
|
+
# @option opts [Boolean] :sms Pass true when the buyer wants SMS: availability, areas, and areaOptions then describe the SMS-capable pool (an SMS purchase orders from it), not the wider voice-only pool.
|
|
27
28
|
# @return [CheckPhoneNumberAvailability200Response]
|
|
28
29
|
def check_whats_app_number_availability(country, opts = {})
|
|
29
30
|
data, _status_code, _headers = check_whats_app_number_availability_with_http_info(country, opts)
|
|
@@ -35,6 +36,7 @@ module Zernio
|
|
|
35
36
|
# @param country [String] ISO-2 country code.
|
|
36
37
|
# @param [Hash] opts the optional parameters
|
|
37
38
|
# @option opts [String] :number_type Check a specific offered type (stock and address constraints are per type). Omitted = the country's default type.
|
|
39
|
+
# @option opts [Boolean] :sms Pass true when the buyer wants SMS: availability, areas, and areaOptions then describe the SMS-capable pool (an SMS purchase orders from it), not the wider voice-only pool.
|
|
38
40
|
# @return [Array<(CheckPhoneNumberAvailability200Response, Integer, Hash)>] CheckPhoneNumberAvailability200Response data, response status code and response headers
|
|
39
41
|
def check_whats_app_number_availability_with_http_info(country, opts = {})
|
|
40
42
|
if @api_client.config.debugging
|
|
@@ -55,6 +57,7 @@ module Zernio
|
|
|
55
57
|
query_params = opts[:query_params] || {}
|
|
56
58
|
query_params[:'country'] = country
|
|
57
59
|
query_params[:'numberType'] = opts[:'number_type'] if !opts[:'number_type'].nil?
|
|
60
|
+
query_params[:'sms'] = opts[:'sms'] if !opts[:'sms'].nil?
|
|
58
61
|
|
|
59
62
|
# header parameters
|
|
60
63
|
header_params = opts[:header_params] || {}
|
|
@@ -27,6 +27,9 @@ module Zernio
|
|
|
27
27
|
# For `geo` only — the area(s) the registered address must be in.
|
|
28
28
|
attr_accessor :areas
|
|
29
29
|
|
|
30
|
+
# Live inventory grouped by area code, largest stock first. 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.
|
|
31
|
+
attr_accessor :area_options
|
|
32
|
+
|
|
30
33
|
class EnumAttributeValidator
|
|
31
34
|
attr_reader :datatype
|
|
32
35
|
attr_reader :allowable_values
|
|
@@ -56,7 +59,8 @@ module Zernio
|
|
|
56
59
|
:'number_type' => :'numberType',
|
|
57
60
|
:'available' => :'available',
|
|
58
61
|
:'address_constraint' => :'addressConstraint',
|
|
59
|
-
:'areas' => :'areas'
|
|
62
|
+
:'areas' => :'areas',
|
|
63
|
+
:'area_options' => :'areaOptions'
|
|
60
64
|
}
|
|
61
65
|
end
|
|
62
66
|
|
|
@@ -77,7 +81,8 @@ module Zernio
|
|
|
77
81
|
:'number_type' => :'String',
|
|
78
82
|
:'available' => :'Boolean',
|
|
79
83
|
:'address_constraint' => :'String',
|
|
80
|
-
:'areas' => :'Array<String>'
|
|
84
|
+
:'areas' => :'Array<String>',
|
|
85
|
+
:'area_options' => :'Array<CheckPhoneNumberAvailability200ResponseAreaOptionsInner>'
|
|
81
86
|
}
|
|
82
87
|
end
|
|
83
88
|
|
|
@@ -124,6 +129,12 @@ module Zernio
|
|
|
124
129
|
self.areas = value
|
|
125
130
|
end
|
|
126
131
|
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'area_options')
|
|
134
|
+
if (value = attributes[:'area_options']).is_a?(Array)
|
|
135
|
+
self.area_options = value
|
|
136
|
+
end
|
|
137
|
+
end
|
|
127
138
|
end
|
|
128
139
|
|
|
129
140
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -162,7 +173,8 @@ module Zernio
|
|
|
162
173
|
number_type == o.number_type &&
|
|
163
174
|
available == o.available &&
|
|
164
175
|
address_constraint == o.address_constraint &&
|
|
165
|
-
areas == o.areas
|
|
176
|
+
areas == o.areas &&
|
|
177
|
+
area_options == o.area_options
|
|
166
178
|
end
|
|
167
179
|
|
|
168
180
|
# @see the `==` method
|
|
@@ -174,7 +186,7 @@ module Zernio
|
|
|
174
186
|
# Calculates hash code according to all attributes.
|
|
175
187
|
# @return [Integer] Hash code
|
|
176
188
|
def hash
|
|
177
|
-
[country, number_type, available, address_constraint, areas].hash
|
|
189
|
+
[country, number_type, available, address_constraint, areas, area_options].hash
|
|
178
190
|
end
|
|
179
191
|
|
|
180
192
|
# Builds the object from hash
|
|
@@ -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
|
|
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 CheckPhoneNumberAvailability200ResponseAreaOptionsInner < ApiModelBase
|
|
18
|
+
# Area code (national destination code), e.g. \"11\".
|
|
19
|
+
attr_accessor :ndc
|
|
20
|
+
|
|
21
|
+
# Human-readable area name, e.g. \"Sao Paulo\".
|
|
22
|
+
attr_accessor :name
|
|
23
|
+
|
|
24
|
+
# Deliverable numbers seen in this area on the latest inventory page.
|
|
25
|
+
attr_accessor :count
|
|
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
|
+
:'count' => :'count'
|
|
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
|
+
:'count' => :'Integer'
|
|
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::CheckPhoneNumberAvailability200ResponseAreaOptionsInner` 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::CheckPhoneNumberAvailability200ResponseAreaOptionsInner`. 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?(:'count')
|
|
86
|
+
self.count = attributes[:'count']
|
|
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
|
+
count == o.count
|
|
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, count].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
|
|
@@ -20,6 +20,9 @@ module Zernio
|
|
|
20
20
|
# ISO 3166-1 alpha-2 country code (must be a regulated/KYC country).
|
|
21
21
|
attr_accessor :country
|
|
22
22
|
|
|
23
|
+
# Area code (NDC) the eventual number must be in. Hard constraint carried by the link; the end customer filling the form makes no area choice. Options come from GET /v1/phone-numbers/availability (areaOptions).
|
|
24
|
+
attr_accessor :area_code
|
|
25
|
+
|
|
23
26
|
attr_accessor :branding
|
|
24
27
|
|
|
25
28
|
# Where to send the end customer's browser after a successful submit. On completion Zernio appends `kyc=submitted` and `country=<ISO-2>` as query params. When omitted, the hosted page shows a built-in confirmation screen instead.
|
|
@@ -30,6 +33,7 @@ module Zernio
|
|
|
30
33
|
{
|
|
31
34
|
:'profile_id' => :'profileId',
|
|
32
35
|
:'country' => :'country',
|
|
36
|
+
:'area_code' => :'areaCode',
|
|
33
37
|
:'branding' => :'branding',
|
|
34
38
|
:'redirect_url' => :'redirect_url'
|
|
35
39
|
}
|
|
@@ -50,6 +54,7 @@ module Zernio
|
|
|
50
54
|
{
|
|
51
55
|
:'profile_id' => :'String',
|
|
52
56
|
:'country' => :'String',
|
|
57
|
+
:'area_code' => :'String',
|
|
53
58
|
:'branding' => :'CreatePhoneNumberKycLinkRequestBranding',
|
|
54
59
|
:'redirect_url' => :'String'
|
|
55
60
|
}
|
|
@@ -89,6 +94,10 @@ module Zernio
|
|
|
89
94
|
self.country = nil
|
|
90
95
|
end
|
|
91
96
|
|
|
97
|
+
if attributes.key?(:'area_code')
|
|
98
|
+
self.area_code = attributes[:'area_code']
|
|
99
|
+
end
|
|
100
|
+
|
|
92
101
|
if attributes.key?(:'branding')
|
|
93
102
|
self.branding = attributes[:'branding']
|
|
94
103
|
end
|
|
@@ -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
|
|
|
@@ -130,6 +144,7 @@ module Zernio
|
|
|
130
144
|
return false if @country.nil?
|
|
131
145
|
return false if @country.to_s.length > 2
|
|
132
146
|
return false if @country.to_s.length < 2
|
|
147
|
+
return false if !@area_code.nil? && @area_code !~ Regexp.new(/^\d{1,4}$/)
|
|
133
148
|
true
|
|
134
149
|
end
|
|
135
150
|
|
|
@@ -161,6 +176,21 @@ module Zernio
|
|
|
161
176
|
@country = country
|
|
162
177
|
end
|
|
163
178
|
|
|
179
|
+
# Custom attribute writer method with validation
|
|
180
|
+
# @param [Object] area_code Value to be assigned
|
|
181
|
+
def area_code=(area_code)
|
|
182
|
+
if area_code.nil?
|
|
183
|
+
fail ArgumentError, 'area_code cannot be nil'
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
pattern = Regexp.new(/^\d{1,4}$/)
|
|
187
|
+
if area_code !~ pattern
|
|
188
|
+
fail ArgumentError, "invalid value for \"area_code\", must conform to the pattern #{pattern}."
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
@area_code = area_code
|
|
192
|
+
end
|
|
193
|
+
|
|
164
194
|
# Checks equality by comparing each attribute.
|
|
165
195
|
# @param [Object] Object to be compared
|
|
166
196
|
def ==(o)
|
|
@@ -168,6 +198,7 @@ module Zernio
|
|
|
168
198
|
self.class == o.class &&
|
|
169
199
|
profile_id == o.profile_id &&
|
|
170
200
|
country == o.country &&
|
|
201
|
+
area_code == o.area_code &&
|
|
171
202
|
branding == o.branding &&
|
|
172
203
|
redirect_url == o.redirect_url
|
|
173
204
|
end
|
|
@@ -181,7 +212,7 @@ module Zernio
|
|
|
181
212
|
# Calculates hash code according to all attributes.
|
|
182
213
|
# @return [Integer] Hash code
|
|
183
214
|
def hash
|
|
184
|
-
[profile_id, country, branding, redirect_url].hash
|
|
215
|
+
[profile_id, country, area_code, branding, redirect_url].hash
|
|
185
216
|
end
|
|
186
217
|
|
|
187
218
|
# Builds the object from hash
|
|
@@ -110,7 +110,7 @@ module Zernio
|
|
|
110
110
|
# @return true if the model is valid
|
|
111
111
|
def valid?
|
|
112
112
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
113
|
-
code_validator = EnumAttributeValidator.new('String', ["PURCHASE_VELOCITY"])
|
|
113
|
+
code_validator = EnumAttributeValidator.new('String', ["PURCHASE_VELOCITY", "AREA_CODE_UNAVAILABLE"])
|
|
114
114
|
return false unless code_validator.valid?(@code)
|
|
115
115
|
true
|
|
116
116
|
end
|
|
@@ -118,7 +118,7 @@ module Zernio
|
|
|
118
118
|
# Custom attribute writer method checking allowed values (enum).
|
|
119
119
|
# @param [Object] code Object to be assigned
|
|
120
120
|
def code=(code)
|
|
121
|
-
validator = EnumAttributeValidator.new('String', ["PURCHASE_VELOCITY"])
|
|
121
|
+
validator = EnumAttributeValidator.new('String', ["PURCHASE_VELOCITY", "AREA_CODE_UNAVAILABLE"])
|
|
122
122
|
unless validator.valid?(code)
|
|
123
123
|
fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}."
|
|
124
124
|
end
|
|
@@ -24,6 +24,9 @@ module Zernio
|
|
|
24
24
|
# Which of the country's offered number types to order (see `types[]` on GET /v1/phone-numbers/countries). Omitted = the country's default type, which is always the WhatsApp-safe choice. Capabilities, price, and KYC requirements are per (country, type): toll_free can never connect WhatsApp (400 when combined with connectWhatsapp:true), and wantsSms:true requires an SMS-capable type.
|
|
25
25
|
attr_accessor :number_type
|
|
26
26
|
|
|
27
|
+
# Area code (national destination code, e.g. 11 for Sao Paulo) the number must be in. Hard constraint: when the area has no deliverable inventory the purchase fails with 409 code AREA_CODE_UNAVAILABLE instead of assigning a number from another area, and later replacements stay in this area too. Omit for any area. Get live options from GET /v1/phone-numbers/availability (areaOptions).
|
|
28
|
+
attr_accessor :area_code
|
|
29
|
+
|
|
27
30
|
# A phone number is the unit; WhatsApp is one optional feature. Pass false to buy a STANDALONE number (Calls/SMS only): provisioning skips the Meta pre-verify/OTP steps and the number activates immediately. Omitted defaults to the WhatsApp provisioning path. WhatsApp can be connected to a standalone number later from the connect flow.
|
|
28
31
|
attr_accessor :connect_whatsapp
|
|
29
32
|
|
|
@@ -67,6 +70,7 @@ module Zernio
|
|
|
67
70
|
:'profile_id' => :'profileId',
|
|
68
71
|
:'country' => :'country',
|
|
69
72
|
:'number_type' => :'numberType',
|
|
73
|
+
:'area_code' => :'areaCode',
|
|
70
74
|
:'connect_whatsapp' => :'connectWhatsapp',
|
|
71
75
|
:'wants_sms' => :'wantsSms',
|
|
72
76
|
:'wants_whatsapp' => :'wantsWhatsapp',
|
|
@@ -91,6 +95,7 @@ module Zernio
|
|
|
91
95
|
:'profile_id' => :'String',
|
|
92
96
|
:'country' => :'String',
|
|
93
97
|
:'number_type' => :'String',
|
|
98
|
+
:'area_code' => :'String',
|
|
94
99
|
:'connect_whatsapp' => :'Boolean',
|
|
95
100
|
:'wants_sms' => :'Boolean',
|
|
96
101
|
:'wants_whatsapp' => :'Boolean',
|
|
@@ -137,6 +142,10 @@ module Zernio
|
|
|
137
142
|
self.number_type = attributes[:'number_type']
|
|
138
143
|
end
|
|
139
144
|
|
|
145
|
+
if attributes.key?(:'area_code')
|
|
146
|
+
self.area_code = attributes[:'area_code']
|
|
147
|
+
end
|
|
148
|
+
|
|
140
149
|
if attributes.key?(:'connect_whatsapp')
|
|
141
150
|
self.connect_whatsapp = attributes[:'connect_whatsapp']
|
|
142
151
|
else
|
|
@@ -175,6 +184,11 @@ module Zernio
|
|
|
175
184
|
invalid_properties.push('invalid value for "profile_id", profile_id cannot be nil.')
|
|
176
185
|
end
|
|
177
186
|
|
|
187
|
+
pattern = Regexp.new(/^\d{1,4}$/)
|
|
188
|
+
if !@area_code.nil? && @area_code !~ pattern
|
|
189
|
+
invalid_properties.push("invalid value for \"area_code\", must conform to the pattern #{pattern}.")
|
|
190
|
+
end
|
|
191
|
+
|
|
178
192
|
if !@purchase_intent_id.nil? && @purchase_intent_id.to_s.length > 100
|
|
179
193
|
invalid_properties.push('invalid value for "purchase_intent_id", the character length must be smaller than or equal to 100.')
|
|
180
194
|
end
|
|
@@ -189,6 +203,7 @@ module Zernio
|
|
|
189
203
|
return false if @profile_id.nil?
|
|
190
204
|
number_type_validator = EnumAttributeValidator.new('String', ["local", "mobile", "national", "toll_free"])
|
|
191
205
|
return false unless number_type_validator.valid?(@number_type)
|
|
206
|
+
return false if !@area_code.nil? && @area_code !~ Regexp.new(/^\d{1,4}$/)
|
|
192
207
|
return false if !@purchase_intent_id.nil? && @purchase_intent_id.to_s.length > 100
|
|
193
208
|
true
|
|
194
209
|
end
|
|
@@ -213,6 +228,21 @@ module Zernio
|
|
|
213
228
|
@number_type = number_type
|
|
214
229
|
end
|
|
215
230
|
|
|
231
|
+
# Custom attribute writer method with validation
|
|
232
|
+
# @param [Object] area_code Value to be assigned
|
|
233
|
+
def area_code=(area_code)
|
|
234
|
+
if area_code.nil?
|
|
235
|
+
fail ArgumentError, 'area_code cannot be nil'
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
pattern = Regexp.new(/^\d{1,4}$/)
|
|
239
|
+
if area_code !~ pattern
|
|
240
|
+
fail ArgumentError, "invalid value for \"area_code\", must conform to the pattern #{pattern}."
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
@area_code = area_code
|
|
244
|
+
end
|
|
245
|
+
|
|
216
246
|
# Custom attribute writer method with validation
|
|
217
247
|
# @param [Object] purchase_intent_id Value to be assigned
|
|
218
248
|
def purchase_intent_id=(purchase_intent_id)
|
|
@@ -235,6 +265,7 @@ module Zernio
|
|
|
235
265
|
profile_id == o.profile_id &&
|
|
236
266
|
country == o.country &&
|
|
237
267
|
number_type == o.number_type &&
|
|
268
|
+
area_code == o.area_code &&
|
|
238
269
|
connect_whatsapp == o.connect_whatsapp &&
|
|
239
270
|
wants_sms == o.wants_sms &&
|
|
240
271
|
wants_whatsapp == o.wants_whatsapp &&
|
|
@@ -251,7 +282,7 @@ module Zernio
|
|
|
251
282
|
# Calculates hash code according to all attributes.
|
|
252
283
|
# @return [Integer] Hash code
|
|
253
284
|
def hash
|
|
254
|
-
[profile_id, country, number_type, connect_whatsapp, wants_sms, wants_whatsapp, purchase_intent_id, allow_multiple].hash
|
|
285
|
+
[profile_id, country, number_type, area_code, connect_whatsapp, wants_sms, wants_whatsapp, purchase_intent_id, allow_multiple].hash
|
|
255
286
|
end
|
|
256
287
|
|
|
257
288
|
# Builds the object from hash
|
|
@@ -34,6 +34,9 @@ module Zernio
|
|
|
34
34
|
# Legacy fallback for `reuseOptionId`: the source phone number (GET reusable.options[].fromPhoneNumber). Ambiguous when a number labels two verifications — prefer `reuseOptionId`. Omitted = the approved default. No match = 409.
|
|
35
35
|
attr_accessor :reuse_from
|
|
36
36
|
|
|
37
|
+
# 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.
|
|
38
|
+
attr_accessor :area_code
|
|
39
|
+
|
|
37
40
|
# End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement.
|
|
38
41
|
attr_accessor :end_user_first_name
|
|
39
42
|
|
|
@@ -58,6 +61,7 @@ module Zernio
|
|
|
58
61
|
:'reuse' => :'reuse',
|
|
59
62
|
:'reuse_option_id' => :'reuseOptionId',
|
|
60
63
|
:'reuse_from' => :'reuseFrom',
|
|
64
|
+
:'area_code' => :'areaCode',
|
|
61
65
|
:'end_user_first_name' => :'endUserFirstName',
|
|
62
66
|
:'end_user_last_name' => :'endUserLastName',
|
|
63
67
|
:'values' => :'values',
|
|
@@ -86,6 +90,7 @@ module Zernio
|
|
|
86
90
|
:'reuse' => :'Boolean',
|
|
87
91
|
:'reuse_option_id' => :'String',
|
|
88
92
|
:'reuse_from' => :'String',
|
|
93
|
+
:'area_code' => :'String',
|
|
89
94
|
:'end_user_first_name' => :'String',
|
|
90
95
|
:'end_user_last_name' => :'String',
|
|
91
96
|
:'values' => :'Hash<String, String>',
|
|
@@ -150,6 +155,10 @@ module Zernio
|
|
|
150
155
|
self.reuse_from = attributes[:'reuse_from']
|
|
151
156
|
end
|
|
152
157
|
|
|
158
|
+
if attributes.key?(:'area_code')
|
|
159
|
+
self.area_code = attributes[:'area_code']
|
|
160
|
+
end
|
|
161
|
+
|
|
153
162
|
if attributes.key?(:'end_user_first_name')
|
|
154
163
|
self.end_user_first_name = attributes[:'end_user_first_name']
|
|
155
164
|
end
|
|
@@ -196,6 +205,11 @@ module Zernio
|
|
|
196
205
|
invalid_properties.push('invalid value for "quantity", must be greater than or equal to 1.')
|
|
197
206
|
end
|
|
198
207
|
|
|
208
|
+
pattern = Regexp.new(/^\d{1,4}$/)
|
|
209
|
+
if !@area_code.nil? && @area_code !~ pattern
|
|
210
|
+
invalid_properties.push("invalid value for \"area_code\", must conform to the pattern #{pattern}.")
|
|
211
|
+
end
|
|
212
|
+
|
|
199
213
|
invalid_properties
|
|
200
214
|
end
|
|
201
215
|
|
|
@@ -207,6 +221,7 @@ module Zernio
|
|
|
207
221
|
return false if @country.nil?
|
|
208
222
|
return false if !@quantity.nil? && @quantity > 5
|
|
209
223
|
return false if !@quantity.nil? && @quantity < 1
|
|
224
|
+
return false if !@area_code.nil? && @area_code !~ Regexp.new(/^\d{1,4}$/)
|
|
210
225
|
true
|
|
211
226
|
end
|
|
212
227
|
|
|
@@ -248,6 +263,21 @@ module Zernio
|
|
|
248
263
|
@quantity = quantity
|
|
249
264
|
end
|
|
250
265
|
|
|
266
|
+
# Custom attribute writer method with validation
|
|
267
|
+
# @param [Object] area_code Value to be assigned
|
|
268
|
+
def area_code=(area_code)
|
|
269
|
+
if area_code.nil?
|
|
270
|
+
fail ArgumentError, 'area_code cannot be nil'
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
pattern = Regexp.new(/^\d{1,4}$/)
|
|
274
|
+
if area_code !~ pattern
|
|
275
|
+
fail ArgumentError, "invalid value for \"area_code\", must conform to the pattern #{pattern}."
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
@area_code = area_code
|
|
279
|
+
end
|
|
280
|
+
|
|
251
281
|
# Checks equality by comparing each attribute.
|
|
252
282
|
# @param [Object] Object to be compared
|
|
253
283
|
def ==(o)
|
|
@@ -260,6 +290,7 @@ module Zernio
|
|
|
260
290
|
reuse == o.reuse &&
|
|
261
291
|
reuse_option_id == o.reuse_option_id &&
|
|
262
292
|
reuse_from == o.reuse_from &&
|
|
293
|
+
area_code == o.area_code &&
|
|
263
294
|
end_user_first_name == o.end_user_first_name &&
|
|
264
295
|
end_user_last_name == o.end_user_last_name &&
|
|
265
296
|
values == o.values &&
|
|
@@ -276,7 +307,7 @@ module Zernio
|
|
|
276
307
|
# Calculates hash code according to all attributes.
|
|
277
308
|
# @return [Integer] Hash code
|
|
278
309
|
def hash
|
|
279
|
-
[profile_id, country, submission_id, quantity, reuse, reuse_option_id, reuse_from, end_user_first_name, end_user_last_name, values, documents, address].hash
|
|
310
|
+
[profile_id, country, submission_id, quantity, reuse, reuse_option_id, reuse_from, area_code, end_user_first_name, end_user_last_name, values, documents, address].hash
|
|
280
311
|
end
|
|
281
312
|
|
|
282
313
|
# Builds the object from hash
|
|
@@ -34,6 +34,9 @@ module Zernio
|
|
|
34
34
|
# Legacy fallback for `reuseOptionId`: the source phone number (GET reusable.options[].fromPhoneNumber). Ambiguous when a number labels two verifications — prefer `reuseOptionId`. Omitted = the approved default. No match = 409.
|
|
35
35
|
attr_accessor :reuse_from
|
|
36
36
|
|
|
37
|
+
# 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.
|
|
38
|
+
attr_accessor :area_code
|
|
39
|
+
|
|
37
40
|
# End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement.
|
|
38
41
|
attr_accessor :end_user_first_name
|
|
39
42
|
|
|
@@ -58,6 +61,7 @@ module Zernio
|
|
|
58
61
|
:'reuse' => :'reuse',
|
|
59
62
|
:'reuse_option_id' => :'reuseOptionId',
|
|
60
63
|
:'reuse_from' => :'reuseFrom',
|
|
64
|
+
:'area_code' => :'areaCode',
|
|
61
65
|
:'end_user_first_name' => :'endUserFirstName',
|
|
62
66
|
:'end_user_last_name' => :'endUserLastName',
|
|
63
67
|
:'values' => :'values',
|
|
@@ -86,6 +90,7 @@ module Zernio
|
|
|
86
90
|
:'reuse' => :'Boolean',
|
|
87
91
|
:'reuse_option_id' => :'String',
|
|
88
92
|
:'reuse_from' => :'String',
|
|
93
|
+
:'area_code' => :'String',
|
|
89
94
|
:'end_user_first_name' => :'String',
|
|
90
95
|
:'end_user_last_name' => :'String',
|
|
91
96
|
:'values' => :'Hash<String, String>',
|
|
@@ -150,6 +155,10 @@ module Zernio
|
|
|
150
155
|
self.reuse_from = attributes[:'reuse_from']
|
|
151
156
|
end
|
|
152
157
|
|
|
158
|
+
if attributes.key?(:'area_code')
|
|
159
|
+
self.area_code = attributes[:'area_code']
|
|
160
|
+
end
|
|
161
|
+
|
|
153
162
|
if attributes.key?(:'end_user_first_name')
|
|
154
163
|
self.end_user_first_name = attributes[:'end_user_first_name']
|
|
155
164
|
end
|
|
@@ -196,6 +205,11 @@ module Zernio
|
|
|
196
205
|
invalid_properties.push('invalid value for "quantity", must be greater than or equal to 1.')
|
|
197
206
|
end
|
|
198
207
|
|
|
208
|
+
pattern = Regexp.new(/^\d{1,4}$/)
|
|
209
|
+
if !@area_code.nil? && @area_code !~ pattern
|
|
210
|
+
invalid_properties.push("invalid value for \"area_code\", must conform to the pattern #{pattern}.")
|
|
211
|
+
end
|
|
212
|
+
|
|
199
213
|
invalid_properties
|
|
200
214
|
end
|
|
201
215
|
|
|
@@ -207,6 +221,7 @@ module Zernio
|
|
|
207
221
|
return false if @country.nil?
|
|
208
222
|
return false if !@quantity.nil? && @quantity > 5
|
|
209
223
|
return false if !@quantity.nil? && @quantity < 1
|
|
224
|
+
return false if !@area_code.nil? && @area_code !~ Regexp.new(/^\d{1,4}$/)
|
|
210
225
|
true
|
|
211
226
|
end
|
|
212
227
|
|
|
@@ -248,6 +263,21 @@ module Zernio
|
|
|
248
263
|
@quantity = quantity
|
|
249
264
|
end
|
|
250
265
|
|
|
266
|
+
# Custom attribute writer method with validation
|
|
267
|
+
# @param [Object] area_code Value to be assigned
|
|
268
|
+
def area_code=(area_code)
|
|
269
|
+
if area_code.nil?
|
|
270
|
+
fail ArgumentError, 'area_code cannot be nil'
|
|
271
|
+
end
|
|
272
|
+
|
|
273
|
+
pattern = Regexp.new(/^\d{1,4}$/)
|
|
274
|
+
if area_code !~ pattern
|
|
275
|
+
fail ArgumentError, "invalid value for \"area_code\", must conform to the pattern #{pattern}."
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
@area_code = area_code
|
|
279
|
+
end
|
|
280
|
+
|
|
251
281
|
# Checks equality by comparing each attribute.
|
|
252
282
|
# @param [Object] Object to be compared
|
|
253
283
|
def ==(o)
|
|
@@ -260,6 +290,7 @@ module Zernio
|
|
|
260
290
|
reuse == o.reuse &&
|
|
261
291
|
reuse_option_id == o.reuse_option_id &&
|
|
262
292
|
reuse_from == o.reuse_from &&
|
|
293
|
+
area_code == o.area_code &&
|
|
263
294
|
end_user_first_name == o.end_user_first_name &&
|
|
264
295
|
end_user_last_name == o.end_user_last_name &&
|
|
265
296
|
values == o.values &&
|
|
@@ -276,7 +307,7 @@ module Zernio
|
|
|
276
307
|
# Calculates hash code according to all attributes.
|
|
277
308
|
# @return [Integer] Hash code
|
|
278
309
|
def hash
|
|
279
|
-
[profile_id, country, submission_id, quantity, reuse, reuse_option_id, reuse_from, end_user_first_name, end_user_last_name, values, documents, address].hash
|
|
310
|
+
[profile_id, country, submission_id, quantity, reuse, reuse_option_id, reuse_from, area_code, end_user_first_name, end_user_last_name, values, documents, address].hash
|
|
280
311
|
end
|
|
281
312
|
|
|
282
313
|
# Builds the object from hash
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -124,6 +124,7 @@ require 'zernio-sdk/models/call_record_transcript_inner'
|
|
|
124
124
|
require 'zernio-sdk/models/cancel_broadcast200_response'
|
|
125
125
|
require 'zernio-sdk/models/cancel_phone_number_port_in200_response'
|
|
126
126
|
require 'zernio-sdk/models/check_phone_number_availability200_response'
|
|
127
|
+
require 'zernio-sdk/models/check_phone_number_availability200_response_area_options_inner'
|
|
127
128
|
require 'zernio-sdk/models/check_phone_number_portability200_response'
|
|
128
129
|
require 'zernio-sdk/models/check_phone_number_portability200_response_results_inner'
|
|
129
130
|
require 'zernio-sdk/models/check_phone_number_portability_request'
|
data/openapi.yaml
CHANGED
|
@@ -27899,6 +27899,17 @@ paths:
|
|
|
27899
27899
|
connect WhatsApp (400 when combined with
|
|
27900
27900
|
connectWhatsapp:true), and wantsSms:true requires an
|
|
27901
27901
|
SMS-capable type.
|
|
27902
|
+
areaCode:
|
|
27903
|
+
type: string
|
|
27904
|
+
pattern: '^\d{1,4}$'
|
|
27905
|
+
description: >
|
|
27906
|
+
Area code (national destination code, e.g. 11 for Sao
|
|
27907
|
+
Paulo) the number must be in. Hard constraint: when the
|
|
27908
|
+
area has no deliverable inventory the purchase fails with
|
|
27909
|
+
409 code AREA_CODE_UNAVAILABLE instead of assigning a
|
|
27910
|
+
number from another area, and later replacements stay in
|
|
27911
|
+
this area too. Omit for any area. Get live options from
|
|
27912
|
+
GET /v1/phone-numbers/availability (areaOptions).
|
|
27902
27913
|
connectWhatsapp:
|
|
27903
27914
|
type: boolean
|
|
27904
27915
|
default: true
|
|
@@ -27990,16 +28001,18 @@ paths:
|
|
|
27990
28001
|
'403': { description: A paid plan is required }
|
|
27991
28002
|
'409':
|
|
27992
28003
|
description: >
|
|
27993
|
-
|
|
27994
|
-
|
|
27995
|
-
true to confirm the
|
|
28004
|
+
Either duplicate-purchase protection (code PURCHASE_VELOCITY:
|
|
28005
|
+
another number was purchased within the last 10 minutes; retry
|
|
28006
|
+
with allowMultiple: true to confirm), or the requested areaCode
|
|
28007
|
+
has no deliverable inventory right now (code
|
|
28008
|
+
AREA_CODE_UNAVAILABLE: pick another area or omit areaCode).
|
|
27996
28009
|
content:
|
|
27997
28010
|
application/json:
|
|
27998
28011
|
schema:
|
|
27999
28012
|
type: object
|
|
28000
28013
|
properties:
|
|
28001
28014
|
error: { type: string }
|
|
28002
|
-
code: { type: string, enum: [PURCHASE_VELOCITY] }
|
|
28015
|
+
code: { type: string, enum: [PURCHASE_VELOCITY, AREA_CODE_UNAVAILABLE] }
|
|
28003
28016
|
'202':
|
|
28004
28017
|
description: Country requires end-user KYC before the number can be ordered.
|
|
28005
28018
|
content:
|
|
@@ -28132,6 +28145,7 @@ paths:
|
|
|
28132
28145
|
parameters:
|
|
28133
28146
|
- { name: country, in: query, required: true, schema: { type: string }, description: ISO-2 country code. }
|
|
28134
28147
|
- { name: numberType, in: query, required: false, schema: { type: string, enum: [local, mobile, national, toll_free] }, description: "Check a specific offered type (stock and address constraints are per type). Omitted = the country's default type." }
|
|
28148
|
+
- { name: sms, in: query, required: false, schema: { type: boolean }, description: 'Pass true when the buyer wants SMS: availability, areas, and areaOptions then describe the SMS-capable pool (an SMS purchase orders from it), not the wider voice-only pool.' }
|
|
28135
28149
|
responses:
|
|
28136
28150
|
'200':
|
|
28137
28151
|
description: Availability + address constraint.
|
|
@@ -28148,6 +28162,20 @@ paths:
|
|
|
28148
28162
|
type: array
|
|
28149
28163
|
description: For `geo` only — the area(s) the registered address must be in.
|
|
28150
28164
|
items: { type: string }
|
|
28165
|
+
areaOptions:
|
|
28166
|
+
type: array
|
|
28167
|
+
description: >
|
|
28168
|
+
Live inventory grouped by area code, largest stock
|
|
28169
|
+
first. Empty when out of stock (or the area lookup
|
|
28170
|
+
failed). Pass a chosen `ndc` as `areaCode` on POST
|
|
28171
|
+
/v1/phone-numbers/purchase (or on the KYC submit for
|
|
28172
|
+
regulated countries) to require that area.
|
|
28173
|
+
items:
|
|
28174
|
+
type: object
|
|
28175
|
+
properties:
|
|
28176
|
+
ndc: { type: string, description: 'Area code (national destination code), e.g. "11".' }
|
|
28177
|
+
name: { type: string, description: 'Human-readable area name, e.g. "Sao Paulo".' }
|
|
28178
|
+
count: { type: integer, description: Deliverable numbers seen in this area on the latest inventory page. }
|
|
28151
28179
|
'400': { description: Country not offerable }
|
|
28152
28180
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
28153
28181
|
|
|
@@ -28356,16 +28384,18 @@ paths:
|
|
|
28356
28384
|
'403': { description: A paid plan is required }
|
|
28357
28385
|
'409':
|
|
28358
28386
|
description: >
|
|
28359
|
-
|
|
28360
|
-
|
|
28361
|
-
true to confirm the
|
|
28387
|
+
Either duplicate-purchase protection (code PURCHASE_VELOCITY:
|
|
28388
|
+
another number was purchased within the last 10 minutes; retry
|
|
28389
|
+
with allowMultiple: true to confirm), or the requested areaCode
|
|
28390
|
+
has no deliverable inventory right now (code
|
|
28391
|
+
AREA_CODE_UNAVAILABLE: pick another area or omit areaCode).
|
|
28362
28392
|
content:
|
|
28363
28393
|
application/json:
|
|
28364
28394
|
schema:
|
|
28365
28395
|
type: object
|
|
28366
28396
|
properties:
|
|
28367
28397
|
error: { type: string }
|
|
28368
|
-
code: { type: string, enum: [PURCHASE_VELOCITY] }
|
|
28398
|
+
code: { type: string, enum: [PURCHASE_VELOCITY, AREA_CODE_UNAVAILABLE] }
|
|
28369
28399
|
'202':
|
|
28370
28400
|
description: Country requires end-user KYC before the number can be ordered.
|
|
28371
28401
|
content:
|
|
@@ -28481,6 +28511,7 @@ paths:
|
|
|
28481
28511
|
parameters:
|
|
28482
28512
|
- { name: country, in: query, required: true, schema: { type: string }, description: ISO-2 country code. }
|
|
28483
28513
|
- { name: numberType, in: query, required: false, schema: { type: string, enum: [local, mobile, national, toll_free] }, description: "Check a specific offered type (stock and address constraints are per type). Omitted = the country's default type." }
|
|
28514
|
+
- { name: sms, in: query, required: false, schema: { type: boolean }, description: 'Pass true when the buyer wants SMS: availability, areas, and areaOptions then describe the SMS-capable pool (an SMS purchase orders from it), not the wider voice-only pool.' }
|
|
28484
28515
|
responses:
|
|
28485
28516
|
'200':
|
|
28486
28517
|
description: Availability + address constraint.
|
|
@@ -28497,6 +28528,20 @@ paths:
|
|
|
28497
28528
|
type: array
|
|
28498
28529
|
description: For `geo` only — the area(s) the registered address must be in.
|
|
28499
28530
|
items: { type: string }
|
|
28531
|
+
areaOptions:
|
|
28532
|
+
type: array
|
|
28533
|
+
description: >
|
|
28534
|
+
Live inventory grouped by area code, largest stock
|
|
28535
|
+
first. Empty when out of stock (or the area lookup
|
|
28536
|
+
failed). Pass a chosen `ndc` as `areaCode` on POST
|
|
28537
|
+
/v1/phone-numbers/purchase (or on the KYC submit for
|
|
28538
|
+
regulated countries) to require that area.
|
|
28539
|
+
items:
|
|
28540
|
+
type: object
|
|
28541
|
+
properties:
|
|
28542
|
+
ndc: { type: string, description: 'Area code (national destination code), e.g. "11".' }
|
|
28543
|
+
name: { type: string, description: 'Human-readable area name, e.g. "Sao Paulo".' }
|
|
28544
|
+
count: { type: integer, description: Deliverable numbers seen in this area on the latest inventory page. }
|
|
28500
28545
|
'400': { description: Country not offerable }
|
|
28501
28546
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
28502
28547
|
|
|
@@ -28607,6 +28652,7 @@ paths:
|
|
|
28607
28652
|
reuse: { type: boolean, description: Reuse a prior approved verification for this country (skips document/field collection; places the order immediately). }
|
|
28608
28653
|
reuseOptionId: { type: string, description: 'Which reusable verification to use (GET reusable.options[].id). The unambiguous selection key. Omitted = the approved default. No match = 409.' }
|
|
28609
28654
|
reuseFrom: { type: string, description: 'Legacy fallback for `reuseOptionId`: the source phone number (GET reusable.options[].fromPhoneNumber). Ambiguous when a number labels two verifications — prefer `reuseOptionId`. Omitted = the approved default. No match = 409.' }
|
|
28655
|
+
areaCode: { type: string, pattern: '^\d{1,4}$', description: '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.' }
|
|
28610
28656
|
endUserFirstName: { type: string, description: End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement. }
|
|
28611
28657
|
endUserLastName: { type: string, description: End user's legal last name. Same condition as endUserFirstName. }
|
|
28612
28658
|
values:
|
|
@@ -28668,7 +28714,7 @@ paths:
|
|
|
28668
28714
|
phoneNumber: { type: string }
|
|
28669
28715
|
country: { type: string }
|
|
28670
28716
|
'400': { description: "Validation error (e.g. address not in-country, file too large)" }
|
|
28671
|
-
'409': { description: reuse requested but no prior approved verification exists for this country }
|
|
28717
|
+
'409': { description: 'Either reuse was requested but no prior approved verification exists for this country, or the requested areaCode has no deliverable inventory right now (code: area_code_unavailable; pick another area and resubmit).' }
|
|
28672
28718
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
28673
28719
|
|
|
28674
28720
|
/v1/phone-numbers/kyc/document/{documentId}:
|
|
@@ -28831,6 +28877,7 @@ paths:
|
|
|
28831
28877
|
properties:
|
|
28832
28878
|
profileId: { type: string }
|
|
28833
28879
|
country: { type: string, minLength: 2, maxLength: 2, description: ISO 3166-1 alpha-2 country code (must be a regulated/KYC country). }
|
|
28880
|
+
areaCode: { type: string, pattern: '^\d{1,4}$', description: 'Area code (NDC) the eventual number must be in. Hard constraint carried by the link; the end customer filling the form makes no area choice. Options come from GET /v1/phone-numbers/availability (areaOptions).' }
|
|
28834
28881
|
branding:
|
|
28835
28882
|
type: object
|
|
28836
28883
|
description: Optional white-label of the hosted page the end customer sees.
|
|
@@ -29577,6 +29624,7 @@ paths:
|
|
|
29577
29624
|
reuse: { type: boolean, description: Reuse a prior approved verification for this country (skips document/field collection; places the order immediately). }
|
|
29578
29625
|
reuseOptionId: { type: string, description: 'Which reusable verification to use (GET reusable.options[].id). The unambiguous selection key. Omitted = the approved default. No match = 409.' }
|
|
29579
29626
|
reuseFrom: { type: string, description: 'Legacy fallback for `reuseOptionId`: the source phone number (GET reusable.options[].fromPhoneNumber). Ambiguous when a number labels two verifications — prefer `reuseOptionId`. Omitted = the approved default. No match = 409.' }
|
|
29627
|
+
areaCode: { type: string, pattern: '^\d{1,4}$', description: '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.' }
|
|
29580
29628
|
endUserFirstName: { type: string, description: End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement. }
|
|
29581
29629
|
endUserLastName: { type: string, description: End user's legal last name. Same condition as endUserFirstName. }
|
|
29582
29630
|
values:
|
|
@@ -29638,7 +29686,7 @@ paths:
|
|
|
29638
29686
|
phoneNumber: { type: string }
|
|
29639
29687
|
country: { type: string }
|
|
29640
29688
|
'400': { description: "Validation error (e.g. address not in-country, file too large)" }
|
|
29641
|
-
'409': { description: reuse requested but no prior approved verification exists for this country }
|
|
29689
|
+
'409': { description: 'Either reuse was requested but no prior approved verification exists for this country, or the requested areaCode has no deliverable inventory right now (code: area_code_unavailable; pick another area and resubmit).' }
|
|
29642
29690
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
29643
29691
|
|
|
29644
29692
|
/v1/whatsapp/phone-numbers/kyc/upload-document:
|
|
@@ -29785,6 +29833,7 @@ paths:
|
|
|
29785
29833
|
properties:
|
|
29786
29834
|
profileId: { type: string }
|
|
29787
29835
|
country: { type: string, minLength: 2, maxLength: 2, description: ISO 3166-1 alpha-2 country code (must be a regulated/KYC country). }
|
|
29836
|
+
areaCode: { type: string, pattern: '^\d{1,4}$', description: 'Area code (NDC) the eventual number must be in. Hard constraint carried by the link; the end customer filling the form makes no area choice. Options come from GET /v1/phone-numbers/availability (areaOptions).' }
|
|
29788
29837
|
branding:
|
|
29789
29838
|
type: object
|
|
29790
29839
|
description: Optional white-label of the hosted page the end customer sees.
|
|
@@ -50,6 +50,7 @@ describe 'PhoneNumbersApi' do
|
|
|
50
50
|
# @param country ISO-2 country code.
|
|
51
51
|
# @param [Hash] opts the optional parameters
|
|
52
52
|
# @option opts [String] :number_type Check a specific offered type (stock and address constraints are per type). Omitted = the country's default type.
|
|
53
|
+
# @option opts [Boolean] :sms Pass true when the buyer wants SMS: availability, areas, and areaOptions then describe the SMS-capable pool (an SMS purchase orders from it), not the wider voice-only pool.
|
|
53
54
|
# @return [CheckPhoneNumberAvailability200Response]
|
|
54
55
|
describe 'check_phone_number_availability test' do
|
|
55
56
|
it 'should work' do
|
|
@@ -38,6 +38,7 @@ describe 'WhatsAppPhoneNumbersApi' do
|
|
|
38
38
|
# @param country ISO-2 country code.
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
40
|
# @option opts [String] :number_type Check a specific offered type (stock and address constraints are per type). Omitted = the country's default type.
|
|
41
|
+
# @option opts [Boolean] :sms Pass true when the buyer wants SMS: availability, areas, and areaOptions then describe the SMS-capable pool (an SMS purchase orders from it), not the wider voice-only pool.
|
|
41
42
|
# @return [CheckPhoneNumberAvailability200Response]
|
|
42
43
|
describe 'check_whats_app_number_availability test' do
|
|
43
44
|
it 'should work' do
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Zernio API
|
|
3
|
+
|
|
4
|
+
#API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
|
|
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 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for Zernio::CheckPhoneNumberAvailability200ResponseAreaOptionsInner
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::CheckPhoneNumberAvailability200ResponseAreaOptionsInner do
|
|
21
|
+
#let(:instance) { Zernio::CheckPhoneNumberAvailability200ResponseAreaOptionsInner.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of CheckPhoneNumberAvailability200ResponseAreaOptionsInner' do
|
|
24
|
+
it 'should create an instance of CheckPhoneNumberAvailability200ResponseAreaOptionsInner' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::CheckPhoneNumberAvailability200ResponseAreaOptionsInner)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "ndc"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "name"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
describe 'test attribute "count"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
end
|
|
@@ -61,4 +61,10 @@ describe Zernio::CheckPhoneNumberAvailability200Response do
|
|
|
61
61
|
end
|
|
62
62
|
end
|
|
63
63
|
|
|
64
|
+
describe 'test attribute "area_options"' do
|
|
65
|
+
it 'should work' do
|
|
66
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
64
70
|
end
|
|
@@ -39,6 +39,12 @@ describe Zernio::CreatePhoneNumberKycLinkRequest do
|
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
+
describe 'test attribute "area_code"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
42
48
|
describe 'test attribute "branding"' do
|
|
43
49
|
it 'should work' do
|
|
44
50
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -36,7 +36,7 @@ describe Zernio::PurchasePhoneNumber409Response do
|
|
|
36
36
|
describe 'test attribute "code"' do
|
|
37
37
|
it 'should work' do
|
|
38
38
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["PURCHASE_VELOCITY"])
|
|
39
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["PURCHASE_VELOCITY", "AREA_CODE_UNAVAILABLE"])
|
|
40
40
|
# validator.allowable_values.each do |value|
|
|
41
41
|
# expect { instance.code = value }.not_to raise_error
|
|
42
42
|
# end
|
|
@@ -49,6 +49,12 @@ describe Zernio::PurchasePhoneNumberRequest do
|
|
|
49
49
|
end
|
|
50
50
|
end
|
|
51
51
|
|
|
52
|
+
describe 'test attribute "area_code"' do
|
|
53
|
+
it 'should work' do
|
|
54
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
52
58
|
describe 'test attribute "connect_whatsapp"' do
|
|
53
59
|
it 'should work' do
|
|
54
60
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -69,6 +69,12 @@ describe Zernio::SubmitPhoneNumberKycRequest do
|
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
71
|
|
|
72
|
+
describe 'test attribute "area_code"' do
|
|
73
|
+
it 'should work' do
|
|
74
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
72
78
|
describe 'test attribute "end_user_first_name"' do
|
|
73
79
|
it 'should work' do
|
|
74
80
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -69,6 +69,12 @@ describe Zernio::SubmitWhatsAppNumberKycRequest do
|
|
|
69
69
|
end
|
|
70
70
|
end
|
|
71
71
|
|
|
72
|
+
describe 'test attribute "area_code"' do
|
|
73
|
+
it 'should work' do
|
|
74
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
72
78
|
describe 'test attribute "end_user_first_name"' do
|
|
73
79
|
it 'should work' do
|
|
74
80
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: late-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.570
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
@@ -182,6 +182,7 @@ files:
|
|
|
182
182
|
- docs/CancelBroadcast200Response.md
|
|
183
183
|
- docs/CancelPhoneNumberPortIn200Response.md
|
|
184
184
|
- docs/CheckPhoneNumberAvailability200Response.md
|
|
185
|
+
- docs/CheckPhoneNumberAvailability200ResponseAreaOptionsInner.md
|
|
185
186
|
- docs/CheckPhoneNumberPortability200Response.md
|
|
186
187
|
- docs/CheckPhoneNumberPortability200ResponseResultsInner.md
|
|
187
188
|
- docs/CheckPhoneNumberPortabilityRequest.md
|
|
@@ -1800,6 +1801,7 @@ files:
|
|
|
1800
1801
|
- lib/zernio-sdk/models/cancel_broadcast200_response.rb
|
|
1801
1802
|
- lib/zernio-sdk/models/cancel_phone_number_port_in200_response.rb
|
|
1802
1803
|
- lib/zernio-sdk/models/check_phone_number_availability200_response.rb
|
|
1804
|
+
- lib/zernio-sdk/models/check_phone_number_availability200_response_area_options_inner.rb
|
|
1803
1805
|
- lib/zernio-sdk/models/check_phone_number_portability200_response.rb
|
|
1804
1806
|
- lib/zernio-sdk/models/check_phone_number_portability200_response_results_inner.rb
|
|
1805
1807
|
- lib/zernio-sdk/models/check_phone_number_portability_request.rb
|
|
@@ -3361,6 +3363,7 @@ files:
|
|
|
3361
3363
|
- spec/models/call_record_transcript_inner_spec.rb
|
|
3362
3364
|
- spec/models/cancel_broadcast200_response_spec.rb
|
|
3363
3365
|
- spec/models/cancel_phone_number_port_in200_response_spec.rb
|
|
3366
|
+
- spec/models/check_phone_number_availability200_response_area_options_inner_spec.rb
|
|
3364
3367
|
- spec/models/check_phone_number_availability200_response_spec.rb
|
|
3365
3368
|
- spec/models/check_phone_number_portability200_response_results_inner_spec.rb
|
|
3366
3369
|
- spec/models/check_phone_number_portability200_response_spec.rb
|
|
@@ -4754,7 +4757,7 @@ files:
|
|
|
4754
4757
|
- spec/models/you_tube_video_retention_response_retention_curve_inner_spec.rb
|
|
4755
4758
|
- spec/models/you_tube_video_retention_response_spec.rb
|
|
4756
4759
|
- spec/spec_helper.rb
|
|
4757
|
-
- zernio-sdk-0.0.
|
|
4760
|
+
- zernio-sdk-0.0.570.gem
|
|
4758
4761
|
- zernio-sdk.gemspec
|
|
4759
4762
|
homepage: https://openapi-generator.tech
|
|
4760
4763
|
licenses:
|
|
@@ -5165,6 +5168,7 @@ test_files:
|
|
|
5165
5168
|
- spec/models/webhook_payload_review_new_spec.rb
|
|
5166
5169
|
- spec/models/get_inbox_top_accounts200_response_accounts_inner_spec.rb
|
|
5167
5170
|
- spec/models/boost_post_request_tracking_spec.rb
|
|
5171
|
+
- spec/models/check_phone_number_availability200_response_area_options_inner_spec.rb
|
|
5168
5172
|
- spec/models/request_sms_sender_id_limit_increase_request_spec.rb
|
|
5169
5173
|
- spec/models/get_whats_app_number_remediation200_response_spec.rb
|
|
5170
5174
|
- spec/models/get_ad_comments200_response_meta_spec.rb
|
data/zernio-sdk-0.0.569.gem
DELETED
|
Binary file
|