late-sdk 0.0.1095 → 0.0.1096

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.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -0
  3. data/docs/GetPhoneNumberClaim200Response.md +24 -0
  4. data/docs/GetPhoneNumberClaim200ResponseArea.md +22 -0
  5. data/docs/GetPhoneNumberClaim200ResponseCountry.md +24 -0
  6. data/docs/PhoneNumbersApi.md +79 -12
  7. data/docs/PurchasePhoneNumber401Response.md +22 -0
  8. data/docs/PurchasePhoneNumber401ResponseDetails.md +20 -0
  9. data/docs/PurchasePhoneNumberRequest.md +2 -0
  10. data/docs/SearchAvailablePhoneNumbers200Response.md +9 -1
  11. data/docs/SearchAvailablePhoneNumbers200ResponseNumbersInner.md +9 -1
  12. data/lib/zernio-sdk/api/phone_numbers_api.rb +75 -9
  13. data/lib/zernio-sdk/models/get_phone_number_claim200_response.rb +177 -0
  14. data/lib/zernio-sdk/models/get_phone_number_claim200_response_area.rb +165 -0
  15. data/lib/zernio-sdk/models/get_phone_number_claim200_response_country.rb +176 -0
  16. data/lib/zernio-sdk/models/purchase_phone_number401_response.rb +165 -0
  17. data/lib/zernio-sdk/models/purchase_phone_number401_response_details.rb +156 -0
  18. data/lib/zernio-sdk/models/purchase_phone_number_request.rb +11 -1
  19. data/lib/zernio-sdk/models/search_available_phone_numbers200_response.rb +45 -4
  20. data/lib/zernio-sdk/models/search_available_phone_numbers200_response_numbers_inner.rb +44 -4
  21. data/lib/zernio-sdk/version.rb +1 -1
  22. data/lib/zernio-sdk.rb +5 -0
  23. data/openapi.yaml +1 -1
  24. data/spec/api/phone_numbers_api_spec.rb +17 -4
  25. data/spec/models/get_phone_number_claim200_response_area_spec.rb +48 -0
  26. data/spec/models/get_phone_number_claim200_response_country_spec.rb +54 -0
  27. data/spec/models/get_phone_number_claim200_response_spec.rb +54 -0
  28. data/spec/models/purchase_phone_number401_response_details_spec.rb +42 -0
  29. data/spec/models/purchase_phone_number401_response_spec.rb +48 -0
  30. data/spec/models/purchase_phone_number_request_spec.rb +6 -0
  31. data/spec/models/search_available_phone_numbers200_response_numbers_inner_spec.rb +24 -0
  32. data/spec/models/search_available_phone_numbers200_response_spec.rb +24 -0
  33. data/zernio-sdk-0.0.1096.gem +0 -0
  34. metadata +22 -2
  35. data/zernio-sdk-0.0.1095.gem +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7f749a031e24a96075926fd0c097e29deaa2c6b87770caa880ce0f93600a8965
4
- data.tar.gz: '095893c298190b4c7fc31a6cddce0ccf9a43ffa8bdac64d392f74834c386de98'
3
+ metadata.gz: d7cbc8da0b6b06fa5eee5c82f319625a54accd0fa303082cc670a8bf00357e10
4
+ data.tar.gz: 5f1cfc284d4d988f7d670319f621d8e53fd986318d4a198495fa2a1c51a83e12
5
5
  SHA512:
6
- metadata.gz: 2cd949a11afaf95f2d6627f5757ca9c2cf2b0601098d9d2936f3cda44d0a551172f31e46a2dc32676af6e98ae1ac1a07f55029bf22c239aa5625a6c819a640a9
7
- data.tar.gz: b6d983d193ef0d41e12a2adee019e9980604c69b042955ee11f27aa286ab579ff79469772902b1718149e25d1f103515fca19df914965c9984faa4cae5466f71
6
+ metadata.gz: c425ae21a295921dddd40f4f81f3adfba661c52ff662b35747fa1eacc46a767761f870288b1934673def80205e7a58c578b3cc5d1ff526f400f943f673231ea4
7
+ data.tar.gz: d23f98c5e1374c65dd9f5a5acebb6c220619173b9c06b051be158a83eb114962d7de6dca225d67df46b129a2fdec985ba869e050076f1665ef8c86098ce17600
data/README.md CHANGED
@@ -580,6 +580,7 @@ Class | Method | HTTP request | Description
580
580
  *Zernio::PhoneNumbersApi* | [**create_phone_number_stock_watch**](docs/PhoneNumbersApi.md#create_phone_number_stock_watch) | **POST** /v1/phone-numbers/stock-watches | Watch an out-of-stock country
581
581
  *Zernio::PhoneNumbersApi* | [**delete_phone_number_stock_watch**](docs/PhoneNumbersApi.md#delete_phone_number_stock_watch) | **DELETE** /v1/phone-numbers/stock-watches/{id} | Stop watching a country
582
582
  *Zernio::PhoneNumbersApi* | [**get_phone_number**](docs/PhoneNumbersApi.md#get_phone_number) | **GET** /v1/phone-numbers/{id} | Get phone number
583
+ *Zernio::PhoneNumbersApi* | [**get_phone_number_claim**](docs/PhoneNumbersApi.md#get_phone_number_claim) | **GET** /v1/phone-numbers/claims/{claimId} | Resolve a number claim
583
584
  *Zernio::PhoneNumbersApi* | [**get_phone_number_kyc_form**](docs/PhoneNumbersApi.md#get_phone_number_kyc_form) | **GET** /v1/phone-numbers/kyc | Get KYC form spec
584
585
  *Zernio::PhoneNumbersApi* | [**get_phone_number_port_in_order_requirements**](docs/PhoneNumbersApi.md#get_phone_number_port_in_order_requirements) | **GET** /v1/phone-numbers/port-in/{id}/requirements | A port-in order's pending requirements
585
586
  *Zernio::PhoneNumbersApi* | [**get_phone_number_port_in_requirements**](docs/PhoneNumbersApi.md#get_phone_number_port_in_requirements) | **GET** /v1/phone-numbers/port-in/requirements | Country porting requirements
@@ -1698,6 +1699,9 @@ Class | Method | HTTP request | Description
1698
1699
  - [Zernio::GetPendingOAuthData200ResponseOrganizationsInner](docs/GetPendingOAuthData200ResponseOrganizationsInner.md)
1699
1700
  - [Zernio::GetPhoneNumber200Response](docs/GetPhoneNumber200Response.md)
1700
1701
  - [Zernio::GetPhoneNumber200ResponsePhoneNumber](docs/GetPhoneNumber200ResponsePhoneNumber.md)
1702
+ - [Zernio::GetPhoneNumberClaim200Response](docs/GetPhoneNumberClaim200Response.md)
1703
+ - [Zernio::GetPhoneNumberClaim200ResponseArea](docs/GetPhoneNumberClaim200ResponseArea.md)
1704
+ - [Zernio::GetPhoneNumberClaim200ResponseCountry](docs/GetPhoneNumberClaim200ResponseCountry.md)
1701
1705
  - [Zernio::GetPhoneNumberKycForm200Response](docs/GetPhoneNumberKycForm200Response.md)
1702
1706
  - [Zernio::GetPhoneNumberKycForm200ResponseFieldsInner](docs/GetPhoneNumberKycForm200ResponseFieldsInner.md)
1703
1707
  - [Zernio::GetPhoneNumberKycForm200ResponseReusable](docs/GetPhoneNumberKycForm200ResponseReusable.md)
@@ -2283,6 +2287,8 @@ Class | Method | HTTP request | Description
2283
2287
  - [Zernio::PurchasePhoneNumber200ResponseOneOf1PhoneNumber](docs/PurchasePhoneNumber200ResponseOneOf1PhoneNumber.md)
2284
2288
  - [Zernio::PurchasePhoneNumber200ResponseOneOf2](docs/PurchasePhoneNumber200ResponseOneOf2.md)
2285
2289
  - [Zernio::PurchasePhoneNumber202Response](docs/PurchasePhoneNumber202Response.md)
2290
+ - [Zernio::PurchasePhoneNumber401Response](docs/PurchasePhoneNumber401Response.md)
2291
+ - [Zernio::PurchasePhoneNumber401ResponseDetails](docs/PurchasePhoneNumber401ResponseDetails.md)
2286
2292
  - [Zernio::PurchasePhoneNumber409Response](docs/PurchasePhoneNumber409Response.md)
2287
2293
  - [Zernio::PurchasePhoneNumber503Response](docs/PurchasePhoneNumber503Response.md)
2288
2294
  - [Zernio::PurchasePhoneNumberRequest](docs/PurchasePhoneNumberRequest.md)
@@ -0,0 +1,24 @@
1
+ # Zernio::GetPhoneNumberClaim200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **country** | [**GetPhoneNumberClaim200ResponseCountry**](GetPhoneNumberClaim200ResponseCountry.md) | | [optional] |
8
+ | **type** | **Object** | The claimed number type, in the shape of `types[]` on GET /v1/phone-numbers/countries. | [optional] |
9
+ | **area** | [**GetPhoneNumberClaim200ResponseArea**](GetPhoneNumberClaim200ResponseArea.md) | | [optional] |
10
+ | **phone_number** | **String** | E.164, or null for an any-number claim. | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'zernio-sdk'
16
+
17
+ instance = Zernio::GetPhoneNumberClaim200Response.new(
18
+ country: null,
19
+ type: null,
20
+ area: null,
21
+ phone_number: null
22
+ )
23
+ ```
24
+
@@ -0,0 +1,22 @@
1
+ # Zernio::GetPhoneNumberClaim200ResponseArea
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **ndc** | **String** | | [optional] |
8
+ | **name** | **String** | | [optional] |
9
+ | **count** | **Integer** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zernio-sdk'
15
+
16
+ instance = Zernio::GetPhoneNumberClaim200ResponseArea.new(
17
+ ndc: null,
18
+ name: null,
19
+ count: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,24 @@
1
+ # Zernio::GetPhoneNumberClaim200ResponseCountry
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **code** | **String** | | [optional] |
8
+ | **needs_kyc** | **Boolean** | | [optional] |
9
+ | **monthly_cents** | **Integer** | | [optional] |
10
+ | **types** | **Array<Object>** | | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'zernio-sdk'
16
+
17
+ instance = Zernio::GetPhoneNumberClaim200ResponseCountry.new(
18
+ code: null,
19
+ needs_kyc: null,
20
+ monthly_cents: null,
21
+ types: null
22
+ )
23
+ ```
24
+
@@ -12,6 +12,7 @@ All URIs are relative to *https://zernio.com/api*
12
12
  | [**create_phone_number_stock_watch**](PhoneNumbersApi.md#create_phone_number_stock_watch) | **POST** /v1/phone-numbers/stock-watches | Watch an out-of-stock country |
13
13
  | [**delete_phone_number_stock_watch**](PhoneNumbersApi.md#delete_phone_number_stock_watch) | **DELETE** /v1/phone-numbers/stock-watches/{id} | Stop watching a country |
14
14
  | [**get_phone_number**](PhoneNumbersApi.md#get_phone_number) | **GET** /v1/phone-numbers/{id} | Get phone number |
15
+ | [**get_phone_number_claim**](PhoneNumbersApi.md#get_phone_number_claim) | **GET** /v1/phone-numbers/claims/{claimId} | Resolve a number claim |
15
16
  | [**get_phone_number_kyc_form**](PhoneNumbersApi.md#get_phone_number_kyc_form) | **GET** /v1/phone-numbers/kyc | Get KYC form spec |
16
17
  | [**get_phone_number_port_in_order_requirements**](PhoneNumbersApi.md#get_phone_number_port_in_order_requirements) | **GET** /v1/phone-numbers/port-in/{id}/requirements | A port-in order's pending requirements |
17
18
  | [**get_phone_number_port_in_requirements**](PhoneNumbersApi.md#get_phone_number_port_in_requirements) | **GET** /v1/phone-numbers/port-in/requirements | Country porting requirements |
@@ -109,7 +110,7 @@ end
109
110
 
110
111
  Check country availability
111
112
 
112
- Pre-purchase check, so you can warn BEFORE a customer invests in KYC (regulated review is async, 1-3 days). Tells you whether we have deliverable inventory, and what address the customer needs: - `addressConstraint: geo` → the registered address MUST be in one of the returned `areas` (the only place we have stock). A different-area address passes pre-approval but the number can never be assigned. - `addressConstraint: country` → any in-country address works. - `addressConstraint: none` → field-only / instant country, no address. Call this before starting the KYC form for regulated countries.
113
+ Pre-purchase check, so you can warn BEFORE a customer invests in KYC (regulated review is async, 1-3 days). Tells you whether we have deliverable inventory, and what address the customer needs: - `addressConstraint: geo` → the registered address MUST be in one of the returned `areas` (the only place we have stock). A different-area address passes pre-approval but the number can never be assigned. - `addressConstraint: country` → any in-country address works. - `addressConstraint: none` → field-only / instant country, no address. Call this before starting the KYC form for regulated countries. Without an API key it answers from cache only and returns just `country`, `numberType` and `areaOptions`, for building an area picker before signup.
113
114
 
114
115
  ### Examples
115
116
 
@@ -590,6 +591,75 @@ end
590
591
  - **Accept**: application/json
591
592
 
592
593
 
594
+ ## get_phone_number_claim
595
+
596
+ > <GetPhoneNumberClaim200Response> get_phone_number_claim(claim_id)
597
+
598
+ Resolve a number claim
599
+
600
+ Resolves a `claimId` from a keyless search or purchase into the selection it carries (country, number type, area and exact number) priced at today's rate. The dashboard calls it when a person lands from a `claimUrl`. The number is not held, so buying it can still fail with 409 PHONE_NUMBER_UNAVAILABLE.
601
+
602
+ ### Examples
603
+
604
+ ```ruby
605
+ require 'time'
606
+ require 'zernio-sdk'
607
+ # setup authorization
608
+ Zernio.configure do |config|
609
+ # Configure Bearer authorization (JWT): bearerAuth
610
+ config.access_token = 'YOUR_BEARER_TOKEN'
611
+ end
612
+
613
+ api_instance = Zernio::PhoneNumbersApi.new
614
+ claim_id = 'claim_id_example' # String |
615
+
616
+ begin
617
+ # Resolve a number claim
618
+ result = api_instance.get_phone_number_claim(claim_id)
619
+ p result
620
+ rescue Zernio::ApiError => e
621
+ puts "Error when calling PhoneNumbersApi->get_phone_number_claim: #{e}"
622
+ end
623
+ ```
624
+
625
+ #### Using the get_phone_number_claim_with_http_info variant
626
+
627
+ This returns an Array which contains the response data, status code and headers.
628
+
629
+ > <Array(<GetPhoneNumberClaim200Response>, Integer, Hash)> get_phone_number_claim_with_http_info(claim_id)
630
+
631
+ ```ruby
632
+ begin
633
+ # Resolve a number claim
634
+ data, status_code, headers = api_instance.get_phone_number_claim_with_http_info(claim_id)
635
+ p status_code # => 2xx
636
+ p headers # => { ... }
637
+ p data # => <GetPhoneNumberClaim200Response>
638
+ rescue Zernio::ApiError => e
639
+ puts "Error when calling PhoneNumbersApi->get_phone_number_claim_with_http_info: #{e}"
640
+ end
641
+ ```
642
+
643
+ ### Parameters
644
+
645
+ | Name | Type | Description | Notes |
646
+ | ---- | ---- | ----------- | ----- |
647
+ | **claim_id** | **String** | | |
648
+
649
+ ### Return type
650
+
651
+ [**GetPhoneNumberClaim200Response**](GetPhoneNumberClaim200Response.md)
652
+
653
+ ### Authorization
654
+
655
+ [bearerAuth](../README.md#bearerAuth)
656
+
657
+ ### HTTP request headers
658
+
659
+ - **Content-Type**: Not defined
660
+ - **Accept**: application/json
661
+
662
+
593
663
  ## get_phone_number_kyc_form
594
664
 
595
665
  > <GetPhoneNumberKycForm200Response> get_phone_number_kyc_form(country, opts)
@@ -880,18 +950,13 @@ end
880
950
 
881
951
  List offerable number countries
882
952
 
883
- The phone number countries available to purchase, each with its flat monthly price (cents), regulatory tier, whether it needs end-user KYC (Tier 3/4), and per-feature availability (PSTN calls, WhatsApp, SMS, and WhatsApp Business Calling outbound). Drives the country picker. Tier-4 countries appear only when enabled.
953
+ The phone number countries available to purchase, each with its flat monthly price (cents), regulatory tier, whether it needs end-user KYC (Tier 3/4), and per-feature availability (PSTN calls, WhatsApp, SMS, and WhatsApp Business Calling outbound). Drives the country picker. Tier-4 countries appear only when enabled. No API key needed: the catalog is public so you can browse it before you have an account.
884
954
 
885
955
  ### Examples
886
956
 
887
957
  ```ruby
888
958
  require 'time'
889
959
  require 'zernio-sdk'
890
- # setup authorization
891
- Zernio.configure do |config|
892
- # Configure Bearer authorization (JWT): bearerAuth
893
- config.access_token = 'YOUR_BEARER_TOKEN'
894
- end
895
960
 
896
961
  api_instance = Zernio::PhoneNumbersApi.new
897
962
 
@@ -932,7 +997,7 @@ This endpoint does not need any parameter.
932
997
 
933
998
  ### Authorization
934
999
 
935
- [bearerAuth](../README.md#bearerAuth)
1000
+ No authorization required
936
1001
 
937
1002
  ### HTTP request headers
938
1003
 
@@ -1569,7 +1634,7 @@ end
1569
1634
 
1570
1635
  Search available numbers
1571
1636
 
1572
- Search the provider's inventory for numbers available to purchase in a country (default US). Optional filters narrow the results. The country must be offerable (see GET /v1/phone-numbers/countries). Voice capability is always required; pass `sms=true` to only see numbers that can also text (SMS support is per-number, not per-country). Numbers a purchase would refuse are left out, and any result's `phoneNumber` can be bought exactly by passing it to POST /v1/phone-numbers/purchase.
1637
+ Search the provider's inventory for numbers available to purchase in a country (default US). Optional filters narrow the results. The country must be offerable (see GET /v1/phone-numbers/countries). Voice capability is always required; pass `sms=true` to only see numbers that can also text (SMS support is per-number, not per-country). Numbers a purchase would refuse are left out, and any result's `phoneNumber` can be bought exactly by passing it to POST /v1/phone-numbers/purchase. Works without an API key. Keyless calls get up to 12 results with the middle digits masked (`maskedNumber`), each with a `claimId` and a `claimUrl`: a signup link that lands a person on the dashboard's confirm step with that number picked, so an agent can search for a user and hand them one link. Keyless calls are rate limited per IP and results are cached for a few minutes. With an API key you get full numbers and no claim fields.
1573
1638
 
1574
1639
  ### Examples
1575
1640
 
@@ -1584,7 +1649,7 @@ end
1584
1649
 
1585
1650
  api_instance = Zernio::PhoneNumbersApi.new
1586
1651
  opts = {
1587
- country: 'country_example', # String |
1652
+ country: 'country_example', # String | ISO code, or `auto` on the keyless shape to search the caller's own country (from their IP) near their city, falling back to US.
1588
1653
  number_type: 'local', # String | Number type; defaults to the country's WhatsApp-safe type (the same name as on purchase, availability and kyc)
1589
1654
  area_code: 'area_code_example', # String | Area code or national dialing code the number must start with, e.g. 415 or 91
1590
1655
  type: 'type_example', # String | Alias of numberType, kept for existing callers
@@ -1592,7 +1657,8 @@ opts = {
1592
1657
  locality: 'locality_example', # String | City
1593
1658
  contains: 'contains_example', # String | Pattern to match within the number
1594
1659
  sms: true, # Boolean | true narrows the pool to SMS-capable numbers. Each result still carries its full `features` list for per-number capability badging.
1595
- limit: 56 # Integer |
1660
+ limit: 56, # Integer |
1661
+ masked: true # Boolean | true returns the keyless shape (masked numbers with claimId and claimUrl) even when you send an API key, e.g. to hand a user a signup link for a number.
1596
1662
  }
1597
1663
 
1598
1664
  begin
@@ -1626,7 +1692,7 @@ end
1626
1692
 
1627
1693
  | Name | Type | Description | Notes |
1628
1694
  | ---- | ---- | ----------- | ----- |
1629
- | **country** | **String** | | [optional][default to &#39;US&#39;] |
1695
+ | **country** | **String** | ISO code, or &#x60;auto&#x60; on the keyless shape to search the caller&#39;s own country (from their IP) near their city, falling back to US. | [optional][default to &#39;US&#39;] |
1630
1696
  | **number_type** | **String** | Number type; defaults to the country&#39;s WhatsApp-safe type (the same name as on purchase, availability and kyc) | [optional] |
1631
1697
  | **area_code** | **String** | Area code or national dialing code the number must start with, e.g. 415 or 91 | [optional] |
1632
1698
  | **type** | **String** | Alias of numberType, kept for existing callers | [optional] |
@@ -1635,6 +1701,7 @@ end
1635
1701
  | **contains** | **String** | Pattern to match within the number | [optional] |
1636
1702
  | **sms** | **Boolean** | true narrows the pool to SMS-capable numbers. Each result still carries its full &#x60;features&#x60; list for per-number capability badging. | [optional] |
1637
1703
  | **limit** | **Integer** | | [optional][default to 20] |
1704
+ | **masked** | **Boolean** | true returns the keyless shape (masked numbers with claimId and claimUrl) even when you send an API key, e.g. to hand a user a signup link for a number. | [optional] |
1638
1705
 
1639
1706
  ### Return type
1640
1707
 
@@ -0,0 +1,22 @@
1
+ # Zernio::PurchasePhoneNumber401Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **error** | **String** | | [optional] |
8
+ | **code** | **String** | | [optional] |
9
+ | **details** | [**PurchasePhoneNumber401ResponseDetails**](PurchasePhoneNumber401ResponseDetails.md) | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'zernio-sdk'
15
+
16
+ instance = Zernio::PurchasePhoneNumber401Response.new(
17
+ error: null,
18
+ code: null,
19
+ details: null
20
+ )
21
+ ```
22
+
@@ -0,0 +1,20 @@
1
+ # Zernio::PurchasePhoneNumber401ResponseDetails
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **claim_id** | **String** | | [optional] |
8
+ | **claim_url** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::PurchasePhoneNumber401ResponseDetails.new(
16
+ claim_id: null,
17
+ claim_url: null
18
+ )
19
+ ```
20
+
@@ -8,6 +8,7 @@
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: \&quot;kyc_required\&quot;, kycUrl }. The customer must complete KYC at that URL before the number is ordered. See GET /v1/phone-numbers/countries. | [optional][default to &#39;US&#39;] |
9
9
  | **number_type** | **String** | Which of the country&#39;s offered number types to order (see &#x60;types[]&#x60; on GET /v1/phone-numbers/countries). Omitted &#x3D; the country&#39;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
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] |
11
+ | **claim_id** | **String** | Keyless calls only: a &#x60;claimId&#x60; from a keyless GET /v1/phone-numbers/available. The 401 then carries a &#x60;claimUrl&#x60; for that exact number. Ignored when an API key is sent. | [optional] |
11
12
  | **phone_number** | **String** | One exact number to buy, in E.164, taken from GET /v1/phone-numbers/available. Hard constraint: when it is no longer available (bought by someone else, or WhatsApp&#39;s buy-time check rejects it) the purchase fails with 409 code PHONE_NUMBER_UNAVAILABLE instead of assigning another number; search again and pick another. Only for countries and types that activate instantly: a regulated one (202 kyc_required) returns 400 when phoneNumber is set. | [optional] |
12
13
  | **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] |
13
14
  | **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&#x3D;true, and smsAvailable on GET /v1/phone-numbers/countries). | [optional][default to false] |
@@ -25,6 +26,7 @@ instance = Zernio::PurchasePhoneNumberRequest.new(
25
26
  country: null,
26
27
  number_type: null,
27
28
  area_code: null,
29
+ claim_id: null,
28
30
  phone_number: null,
29
31
  connect_whatsapp: null,
30
32
  wants_sms: null,
@@ -8,6 +8,10 @@
8
8
  | **number_type** | **String** | | [optional] |
9
9
  | **require_sms** | **Boolean** | Echo of the &#x60;sms&#x60; filter applied to this search. | [optional] |
10
10
  | **numbers** | [**Array&lt;SearchAvailablePhoneNumbers200ResponseNumbersInner&gt;**](SearchAvailablePhoneNumbers200ResponseNumbersInner.md) | | [optional] |
11
+ | **masked** | **Boolean** | true on keyless calls. | [optional] |
12
+ | **near** | **String** | With &#x60;country&#x3D;auto&#x60;: the caller&#39;s city the results were narrowed to, or null when there was no stock there. | [optional] |
13
+ | **claim_id** | **String** | Keyless calls only: a claim for any number matching this search&#39;s country, type and area. | [optional] |
14
+ | **claim_url** | **String** | Keyless calls only: signup link for any number matching this search. | [optional] |
11
15
 
12
16
  ## Example
13
17
 
@@ -18,7 +22,11 @@ instance = Zernio::SearchAvailablePhoneNumbers200Response.new(
18
22
  country: null,
19
23
  number_type: null,
20
24
  require_sms: null,
21
- numbers: null
25
+ numbers: null,
26
+ masked: null,
27
+ near: null,
28
+ claim_id: null,
29
+ claim_url: null
22
30
  )
23
31
  ```
24
32
 
@@ -8,6 +8,10 @@
8
8
  | **features** | **Array&lt;String&gt;** | Provider capability list for this number (e.g. voice, sms, mms). | [optional] |
9
9
  | **locality** | **String** | Town or rate center the number belongs to, as the carrier names it (e.g. WACO). | [optional] |
10
10
  | **best_effort** | **Boolean** | true when the carrier added this number because too few matched your filters, so it may be outside the requested prefix or locality. | [optional] |
11
+ | **masked_number** | **String** | Keyless calls only, in place of &#x60;phoneNumber&#x60;: the number with its middle digits masked, e.g. +44 20 •••• 0123. | [optional] |
12
+ | **number_type** | **String** | Keyless calls only. Without a &#x60;numberType&#x60; filter a keyless search mixes every type the country sells, so each result names its own. | [optional] |
13
+ | **claim_id** | **String** | Keyless calls only. Opaque, expires after 7 days. Pass it as &#x60;claimId&#x60; on a keyless POST /v1/phone-numbers/purchase. | [optional] |
14
+ | **claim_url** | **String** | Keyless calls only. Signup link that opens the dashboard&#39;s confirm step for this number. The number is not held: if it is gone by then, the buyer picks another in the same area. | [optional] |
11
15
 
12
16
  ## Example
13
17
 
@@ -18,7 +22,11 @@ instance = Zernio::SearchAvailablePhoneNumbers200ResponseNumbersInner.new(
18
22
  phone_number: null,
19
23
  features: null,
20
24
  locality: null,
21
- best_effort: null
25
+ best_effort: null,
26
+ masked_number: null,
27
+ number_type: null,
28
+ claim_id: null,
29
+ claim_url: null
22
30
  )
23
31
  ```
24
32
 
@@ -83,7 +83,7 @@ module Zernio
83
83
  end
84
84
 
85
85
  # Check country availability
86
- # Pre-purchase check, so you can warn BEFORE a customer invests in KYC (regulated review is async, 1-3 days). Tells you whether we have deliverable inventory, and what address the customer needs: - `addressConstraint: geo` → the registered address MUST be in one of the returned `areas` (the only place we have stock). A different-area address passes pre-approval but the number can never be assigned. - `addressConstraint: country` → any in-country address works. - `addressConstraint: none` → field-only / instant country, no address. Call this before starting the KYC form for regulated countries.
86
+ # Pre-purchase check, so you can warn BEFORE a customer invests in KYC (regulated review is async, 1-3 days). Tells you whether we have deliverable inventory, and what address the customer needs: - `addressConstraint: geo` → the registered address MUST be in one of the returned `areas` (the only place we have stock). A different-area address passes pre-approval but the number can never be assigned. - `addressConstraint: country` → any in-country address works. - `addressConstraint: none` → field-only / instant country, no address. Call this before starting the KYC form for regulated countries. Without an API key it answers from cache only and returns just `country`, `numberType` and `areaOptions`, for building an area picker before signup.
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 &#x3D; the country&#39;s default type.
@@ -95,7 +95,7 @@ module Zernio
95
95
  end
96
96
 
97
97
  # Check country availability
98
- # Pre-purchase check, so you can warn BEFORE a customer invests in KYC (regulated review is async, 1-3 days). Tells you whether we have deliverable inventory, and what address the customer needs: - &#x60;addressConstraint: geo&#x60; → the registered address MUST be in one of the returned &#x60;areas&#x60; (the only place we have stock). A different-area address passes pre-approval but the number can never be assigned. - &#x60;addressConstraint: country&#x60; → any in-country address works. - &#x60;addressConstraint: none&#x60; → field-only / instant country, no address. Call this before starting the KYC form for regulated countries.
98
+ # Pre-purchase check, so you can warn BEFORE a customer invests in KYC (regulated review is async, 1-3 days). Tells you whether we have deliverable inventory, and what address the customer needs: - &#x60;addressConstraint: geo&#x60; → the registered address MUST be in one of the returned &#x60;areas&#x60; (the only place we have stock). A different-area address passes pre-approval but the number can never be assigned. - &#x60;addressConstraint: country&#x60; → any in-country address works. - &#x60;addressConstraint: none&#x60; → field-only / instant country, no address. Call this before starting the KYC form for regulated countries. Without an API key it answers from cache only and returns just &#x60;country&#x60;, &#x60;numberType&#x60; and &#x60;areaOptions&#x60;, for building an area picker before signup.
99
99
  # @param country [String] ISO-2 country code.
100
100
  # @param [Hash] opts the optional parameters
101
101
  # @option opts [String] :number_type Check a specific offered type (stock and address constraints are per type). Omitted &#x3D; the country&#39;s default type.
@@ -552,6 +552,69 @@ module Zernio
552
552
  return data, status_code, headers
553
553
  end
554
554
 
555
+ # Resolve a number claim
556
+ # Resolves a `claimId` from a keyless search or purchase into the selection it carries (country, number type, area and exact number) priced at today's rate. The dashboard calls it when a person lands from a `claimUrl`. The number is not held, so buying it can still fail with 409 PHONE_NUMBER_UNAVAILABLE.
557
+ # @param claim_id [String]
558
+ # @param [Hash] opts the optional parameters
559
+ # @return [GetPhoneNumberClaim200Response]
560
+ def get_phone_number_claim(claim_id, opts = {})
561
+ data, _status_code, _headers = get_phone_number_claim_with_http_info(claim_id, opts)
562
+ data
563
+ end
564
+
565
+ # Resolve a number claim
566
+ # Resolves a &#x60;claimId&#x60; from a keyless search or purchase into the selection it carries (country, number type, area and exact number) priced at today&#39;s rate. The dashboard calls it when a person lands from a &#x60;claimUrl&#x60;. The number is not held, so buying it can still fail with 409 PHONE_NUMBER_UNAVAILABLE.
567
+ # @param claim_id [String]
568
+ # @param [Hash] opts the optional parameters
569
+ # @return [Array<(GetPhoneNumberClaim200Response, Integer, Hash)>] GetPhoneNumberClaim200Response data, response status code and response headers
570
+ def get_phone_number_claim_with_http_info(claim_id, opts = {})
571
+ if @api_client.config.debugging
572
+ @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.get_phone_number_claim ...'
573
+ end
574
+ # verify the required parameter 'claim_id' is set
575
+ if @api_client.config.client_side_validation && claim_id.nil?
576
+ fail ArgumentError, "Missing the required parameter 'claim_id' when calling PhoneNumbersApi.get_phone_number_claim"
577
+ end
578
+ # resource path
579
+ local_var_path = '/v1/phone-numbers/claims/{claimId}'.sub('{' + 'claimId' + '}', CGI.escape(claim_id.to_s))
580
+
581
+ # query parameters
582
+ query_params = opts[:query_params] || {}
583
+
584
+ # header parameters
585
+ header_params = opts[:header_params] || {}
586
+ # HTTP header 'Accept' (if needed)
587
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
588
+
589
+ # form parameters
590
+ form_params = opts[:form_params] || {}
591
+
592
+ # http body (model)
593
+ post_body = opts[:debug_body]
594
+
595
+ # return_type
596
+ return_type = opts[:debug_return_type] || 'GetPhoneNumberClaim200Response'
597
+
598
+ # auth_names
599
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
600
+
601
+ new_options = opts.merge(
602
+ :operation => :"PhoneNumbersApi.get_phone_number_claim",
603
+ :header_params => header_params,
604
+ :query_params => query_params,
605
+ :form_params => form_params,
606
+ :body => post_body,
607
+ :auth_names => auth_names,
608
+ :return_type => return_type
609
+ )
610
+
611
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
612
+ if @api_client.config.debugging
613
+ @api_client.config.logger.debug "API called: PhoneNumbersApi#get_phone_number_claim\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
614
+ end
615
+ return data, status_code, headers
616
+ end
617
+
555
618
  # Get KYC form spec
556
619
  # For a Tier 3/4 country, the fields the end customer must provide (Telnyx regulatory requirements) before a number can be ordered: text, date, address, or file (document) per requirement.
557
620
  # @param country [String]
@@ -829,7 +892,7 @@ module Zernio
829
892
  end
830
893
 
831
894
  # List offerable number countries
832
- # The phone number countries available to purchase, each with its flat monthly price (cents), regulatory tier, whether it needs end-user KYC (Tier 3/4), and per-feature availability (PSTN calls, WhatsApp, SMS, and WhatsApp Business Calling outbound). Drives the country picker. Tier-4 countries appear only when enabled.
895
+ # The phone number countries available to purchase, each with its flat monthly price (cents), regulatory tier, whether it needs end-user KYC (Tier 3/4), and per-feature availability (PSTN calls, WhatsApp, SMS, and WhatsApp Business Calling outbound). Drives the country picker. Tier-4 countries appear only when enabled. No API key needed: the catalog is public so you can browse it before you have an account.
833
896
  # @param [Hash] opts the optional parameters
834
897
  # @return [ListPhoneNumberCountries200Response]
835
898
  def list_phone_number_countries(opts = {})
@@ -838,7 +901,7 @@ module Zernio
838
901
  end
839
902
 
840
903
  # List offerable number countries
841
- # The phone number countries available to purchase, each with its flat monthly price (cents), regulatory tier, whether it needs end-user KYC (Tier 3/4), and per-feature availability (PSTN calls, WhatsApp, SMS, and WhatsApp Business Calling outbound). Drives the country picker. Tier-4 countries appear only when enabled.
904
+ # The phone number countries available to purchase, each with its flat monthly price (cents), regulatory tier, whether it needs end-user KYC (Tier 3/4), and per-feature availability (PSTN calls, WhatsApp, SMS, and WhatsApp Business Calling outbound). Drives the country picker. Tier-4 countries appear only when enabled. No API key needed: the catalog is public so you can browse it before you have an account.
842
905
  # @param [Hash] opts the optional parameters
843
906
  # @return [Array<(ListPhoneNumberCountries200Response, Integer, Hash)>] ListPhoneNumberCountries200Response data, response status code and response headers
844
907
  def list_phone_number_countries_with_http_info(opts = {})
@@ -866,7 +929,7 @@ module Zernio
866
929
  return_type = opts[:debug_return_type] || 'ListPhoneNumberCountries200Response'
867
930
 
868
931
  # auth_names
869
- auth_names = opts[:debug_auth_names] || ['bearerAuth']
932
+ auth_names = opts[:debug_auth_names] || []
870
933
 
871
934
  new_options = opts.merge(
872
935
  :operation => :"PhoneNumbersApi.list_phone_number_countries",
@@ -1486,9 +1549,9 @@ module Zernio
1486
1549
  end
1487
1550
 
1488
1551
  # Search available numbers
1489
- # Search the provider's inventory for numbers available to purchase in a country (default US). Optional filters narrow the results. The country must be offerable (see GET /v1/phone-numbers/countries). Voice capability is always required; pass `sms=true` to only see numbers that can also text (SMS support is per-number, not per-country). Numbers a purchase would refuse are left out, and any result's `phoneNumber` can be bought exactly by passing it to POST /v1/phone-numbers/purchase.
1552
+ # Search the provider's inventory for numbers available to purchase in a country (default US). Optional filters narrow the results. The country must be offerable (see GET /v1/phone-numbers/countries). Voice capability is always required; pass `sms=true` to only see numbers that can also text (SMS support is per-number, not per-country). Numbers a purchase would refuse are left out, and any result's `phoneNumber` can be bought exactly by passing it to POST /v1/phone-numbers/purchase. Works without an API key. Keyless calls get up to 12 results with the middle digits masked (`maskedNumber`), each with a `claimId` and a `claimUrl`: a signup link that lands a person on the dashboard's confirm step with that number picked, so an agent can search for a user and hand them one link. Keyless calls are rate limited per IP and results are cached for a few minutes. With an API key you get full numbers and no claim fields.
1490
1553
  # @param [Hash] opts the optional parameters
1491
- # @option opts [String] :country (default to 'US')
1554
+ # @option opts [String] :country ISO code, or &#x60;auto&#x60; on the keyless shape to search the caller&#39;s own country (from their IP) near their city, falling back to US. (default to 'US')
1492
1555
  # @option opts [String] :number_type Number type; defaults to the country&#39;s WhatsApp-safe type (the same name as on purchase, availability and kyc)
1493
1556
  # @option opts [String] :area_code Area code or national dialing code the number must start with, e.g. 415 or 91
1494
1557
  # @option opts [String] :type Alias of numberType, kept for existing callers
@@ -1497,6 +1560,7 @@ module Zernio
1497
1560
  # @option opts [String] :contains Pattern to match within the number
1498
1561
  # @option opts [Boolean] :sms true narrows the pool to SMS-capable numbers. Each result still carries its full &#x60;features&#x60; list for per-number capability badging.
1499
1562
  # @option opts [Integer] :limit (default to 20)
1563
+ # @option opts [Boolean] :masked true returns the keyless shape (masked numbers with claimId and claimUrl) even when you send an API key, e.g. to hand a user a signup link for a number.
1500
1564
  # @return [SearchAvailablePhoneNumbers200Response]
1501
1565
  def search_available_phone_numbers(opts = {})
1502
1566
  data, _status_code, _headers = search_available_phone_numbers_with_http_info(opts)
@@ -1504,9 +1568,9 @@ module Zernio
1504
1568
  end
1505
1569
 
1506
1570
  # Search available numbers
1507
- # Search the provider&#39;s inventory for numbers available to purchase in a country (default US). Optional filters narrow the results. The country must be offerable (see GET /v1/phone-numbers/countries). Voice capability is always required; pass &#x60;sms&#x3D;true&#x60; to only see numbers that can also text (SMS support is per-number, not per-country). Numbers a purchase would refuse are left out, and any result&#39;s &#x60;phoneNumber&#x60; can be bought exactly by passing it to POST /v1/phone-numbers/purchase.
1571
+ # Search the provider&#39;s inventory for numbers available to purchase in a country (default US). Optional filters narrow the results. The country must be offerable (see GET /v1/phone-numbers/countries). Voice capability is always required; pass &#x60;sms&#x3D;true&#x60; to only see numbers that can also text (SMS support is per-number, not per-country). Numbers a purchase would refuse are left out, and any result&#39;s &#x60;phoneNumber&#x60; can be bought exactly by passing it to POST /v1/phone-numbers/purchase. Works without an API key. Keyless calls get up to 12 results with the middle digits masked (&#x60;maskedNumber&#x60;), each with a &#x60;claimId&#x60; and a &#x60;claimUrl&#x60;: a signup link that lands a person on the dashboard&#39;s confirm step with that number picked, so an agent can search for a user and hand them one link. Keyless calls are rate limited per IP and results are cached for a few minutes. With an API key you get full numbers and no claim fields.
1508
1572
  # @param [Hash] opts the optional parameters
1509
- # @option opts [String] :country (default to 'US')
1573
+ # @option opts [String] :country ISO code, or &#x60;auto&#x60; on the keyless shape to search the caller&#39;s own country (from their IP) near their city, falling back to US. (default to 'US')
1510
1574
  # @option opts [String] :number_type Number type; defaults to the country&#39;s WhatsApp-safe type (the same name as on purchase, availability and kyc)
1511
1575
  # @option opts [String] :area_code Area code or national dialing code the number must start with, e.g. 415 or 91
1512
1576
  # @option opts [String] :type Alias of numberType, kept for existing callers
@@ -1515,6 +1579,7 @@ module Zernio
1515
1579
  # @option opts [String] :contains Pattern to match within the number
1516
1580
  # @option opts [Boolean] :sms true narrows the pool to SMS-capable numbers. Each result still carries its full &#x60;features&#x60; list for per-number capability badging.
1517
1581
  # @option opts [Integer] :limit (default to 20)
1582
+ # @option opts [Boolean] :masked true returns the keyless shape (masked numbers with claimId and claimUrl) even when you send an API key, e.g. to hand a user a signup link for a number.
1518
1583
  # @return [Array<(SearchAvailablePhoneNumbers200Response, Integer, Hash)>] SearchAvailablePhoneNumbers200Response data, response status code and response headers
1519
1584
  def search_available_phone_numbers_with_http_info(opts = {})
1520
1585
  if @api_client.config.debugging
@@ -1542,6 +1607,7 @@ module Zernio
1542
1607
  query_params[:'contains'] = opts[:'contains'] if !opts[:'contains'].nil?
1543
1608
  query_params[:'sms'] = opts[:'sms'] if !opts[:'sms'].nil?
1544
1609
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1610
+ query_params[:'masked'] = opts[:'masked'] if !opts[:'masked'].nil?
1545
1611
 
1546
1612
  # header parameters
1547
1613
  header_params = opts[:header_params] || {}