zernio-sdk 0.0.554 → 0.0.556
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 +2 -0
- data/docs/GetPhoneNumberKycForm200ResponseReusableOptionsInner.md +6 -2
- data/docs/GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner.md +22 -0
- data/docs/PhoneNumbersApi.md +70 -0
- data/docs/SubmitPhoneNumberKycRequest.md +3 -1
- data/docs/SubmitWhatsAppNumberKycRequest.md +3 -1
- data/lib/zernio-sdk/api/phone_numbers_api.rb +63 -0
- data/lib/zernio-sdk/models/get_phone_number_kyc_form200_response_reusable.rb +1 -1
- data/lib/zernio-sdk/models/get_phone_number_kyc_form200_response_reusable_options_inner.rb +23 -2
- data/lib/zernio-sdk/models/get_phone_number_kyc_form200_response_reusable_options_inner_details_inner.rb +166 -0
- data/lib/zernio-sdk/models/submit_phone_number_kyc_request.rb +12 -2
- data/lib/zernio-sdk/models/submit_whats_app_number_kyc_request.rb +12 -2
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +1 -0
- data/openapi.yaml +42 -6
- data/spec/api/phone_numbers_api_spec.rb +12 -0
- data/spec/models/get_phone_number_kyc_form200_response_reusable_options_inner_details_inner_spec.rb +48 -0
- data/spec/models/get_phone_number_kyc_form200_response_reusable_options_inner_spec.rb +12 -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
- metadata +1485 -1481
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 784e6cc160994ca9f53ea86b12777d2ca34ff07ddbb3ea18a907a8df5c92525b
|
|
4
|
+
data.tar.gz: 5f2da5babdb04fa73350f46cedd5bd51dd96844bc503a083a8ec29e8d01cde02
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ad24d4f24f6aaa1127c09c40ed3a8bc6ff18a4de49d229c0d7579906fa4faf46ec7f09ae86e4d6e595174fa0ac63f477533a26b2f87f1b9ad37d937f4e7f19c2
|
|
7
|
+
data.tar.gz: c3d61011fa293fc7eb5bed55ddd4f9ce7c693490a51e48131dc1d18f5937561e88544237356ea1f93cf620021dcc95a20e40f94ba7a64f64a568224e8efd4877
|
data/README.md
CHANGED
|
@@ -380,6 +380,7 @@ Class | Method | HTTP request | Description
|
|
|
380
380
|
*Zernio::PhoneNumbersApi* | [**upload_phone_number_kyc_document**](docs/PhoneNumbersApi.md#upload_phone_number_kyc_document) | **POST** /v1/phone-numbers/kyc/upload-document | Upload a KYC document
|
|
381
381
|
*Zernio::PhoneNumbersApi* | [**upload_phone_number_port_in_document**](docs/PhoneNumbersApi.md#upload_phone_number_port_in_document) | **POST** /v1/phone-numbers/port-in/documents | Upload a porting document
|
|
382
382
|
*Zernio::PhoneNumbersApi* | [**validate_phone_number_kyc_address**](docs/PhoneNumbersApi.md#validate_phone_number_kyc_address) | **POST** /v1/phone-numbers/kyc/validate-address | Pre-validate KYC address
|
|
383
|
+
*Zernio::PhoneNumbersApi* | [**view_phone_number_kyc_document**](docs/PhoneNumbersApi.md#view_phone_number_kyc_document) | **GET** /v1/phone-numbers/kyc/document/{documentId} | View a KYC document on file
|
|
383
384
|
*Zernio::PostsApi* | [**bulk_upload_posts**](docs/PostsApi.md#bulk_upload_posts) | **POST** /v1/posts/bulk-upload | Bulk upload from CSV
|
|
384
385
|
*Zernio::PostsApi* | [**create_post**](docs/PostsApi.md#create_post) | **POST** /v1/posts | Create post
|
|
385
386
|
*Zernio::PostsApi* | [**delete_post**](docs/PostsApi.md#delete_post) | **DELETE** /v1/posts/{postId} | Delete post
|
|
@@ -1180,6 +1181,7 @@ Class | Method | HTTP request | Description
|
|
|
1180
1181
|
- [Zernio::GetPhoneNumberKycForm200ResponseReusable](docs/GetPhoneNumberKycForm200ResponseReusable.md)
|
|
1181
1182
|
- [Zernio::GetPhoneNumberKycForm200ResponseReusableDetailsInner](docs/GetPhoneNumberKycForm200ResponseReusableDetailsInner.md)
|
|
1182
1183
|
- [Zernio::GetPhoneNumberKycForm200ResponseReusableOptionsInner](docs/GetPhoneNumberKycForm200ResponseReusableOptionsInner.md)
|
|
1184
|
+
- [Zernio::GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner](docs/GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner.md)
|
|
1183
1185
|
- [Zernio::GetPhoneNumberPortInOrderRequirements200Response](docs/GetPhoneNumberPortInOrderRequirements200Response.md)
|
|
1184
1186
|
- [Zernio::GetPhoneNumberPortInOrderRequirements200ResponseRequirementsInner](docs/GetPhoneNumberPortInOrderRequirements200ResponseRequirementsInner.md)
|
|
1185
1187
|
- [Zernio::GetPhoneNumberPortInRequirements200Response](docs/GetPhoneNumberPortInRequirements200Response.md)
|
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **
|
|
8
|
-
| **
|
|
7
|
+
| **id** | **String** | Opaque option id — pass as `reuseOptionId` on POST. Stable selection key (a phone number is not unique across verifications). | [optional] |
|
|
8
|
+
| **from_phone_number** | **String** | Display only — the number this verification was submitted for. Not a selection key. | [optional] |
|
|
9
|
+
| **instant** | **Boolean** | true = group-approved, a new order activates in minutes; false = documents are reused but the order still queues for carrier review (1-3 days). | [optional] |
|
|
10
|
+
| **details** | [**Array<GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner>**](GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner.md) | | [optional] |
|
|
9
11
|
|
|
10
12
|
## Example
|
|
11
13
|
|
|
@@ -13,7 +15,9 @@
|
|
|
13
15
|
require 'zernio-sdk'
|
|
14
16
|
|
|
15
17
|
instance = Zernio::GetPhoneNumberKycForm200ResponseReusableOptionsInner.new(
|
|
18
|
+
id: null,
|
|
16
19
|
from_phone_number: null,
|
|
20
|
+
instant: null,
|
|
17
21
|
details: null
|
|
18
22
|
)
|
|
19
23
|
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zernio::GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **label** | **String** | | [optional] |
|
|
8
|
+
| **value** | **String** | | [optional] |
|
|
9
|
+
| **document_id** | **String** | Present on document rows — the Telnyx document id. GET /v1/whatsapp/phone-numbers/kyc/document/{documentId} streams it (auth-scoped, inline PDF). | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zernio-sdk'
|
|
15
|
+
|
|
16
|
+
instance = Zernio::GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner.new(
|
|
17
|
+
label: null,
|
|
18
|
+
value: null,
|
|
19
|
+
document_id: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
data/docs/PhoneNumbersApi.md
CHANGED
|
@@ -26,6 +26,7 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
26
26
|
| [**upload_phone_number_kyc_document**](PhoneNumbersApi.md#upload_phone_number_kyc_document) | **POST** /v1/phone-numbers/kyc/upload-document | Upload a KYC document |
|
|
27
27
|
| [**upload_phone_number_port_in_document**](PhoneNumbersApi.md#upload_phone_number_port_in_document) | **POST** /v1/phone-numbers/port-in/documents | Upload a porting document |
|
|
28
28
|
| [**validate_phone_number_kyc_address**](PhoneNumbersApi.md#validate_phone_number_kyc_address) | **POST** /v1/phone-numbers/kyc/validate-address | Pre-validate KYC address |
|
|
29
|
+
| [**view_phone_number_kyc_document**](PhoneNumbersApi.md#view_phone_number_kyc_document) | **GET** /v1/phone-numbers/kyc/document/{documentId} | View a KYC document on file |
|
|
29
30
|
|
|
30
31
|
|
|
31
32
|
## cancel_phone_number_port_in
|
|
@@ -1577,3 +1578,72 @@ end
|
|
|
1577
1578
|
- **Content-Type**: application/json
|
|
1578
1579
|
- **Accept**: application/json
|
|
1579
1580
|
|
|
1581
|
+
|
|
1582
|
+
## view_phone_number_kyc_document
|
|
1583
|
+
|
|
1584
|
+
> File view_phone_number_kyc_document(document_id)
|
|
1585
|
+
|
|
1586
|
+
View a KYC document on file
|
|
1587
|
+
|
|
1588
|
+
Stream a document backing a reusable verification (the `documentId` values from GET /v1/phone-numbers/kyc `reusable.options[].details[]`), so the account holder can see what's on file before reusing it. Returned inline as `application/pdf` (uploads are normalized to PDF). Auth-scoped: a document is viewable only when its id is referenced by one of the caller's own numbers — otherwise `404`.
|
|
1589
|
+
|
|
1590
|
+
### Examples
|
|
1591
|
+
|
|
1592
|
+
```ruby
|
|
1593
|
+
require 'time'
|
|
1594
|
+
require 'zernio-sdk'
|
|
1595
|
+
# setup authorization
|
|
1596
|
+
Zernio.configure do |config|
|
|
1597
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
1598
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1599
|
+
end
|
|
1600
|
+
|
|
1601
|
+
api_instance = Zernio::PhoneNumbersApi.new
|
|
1602
|
+
document_id = 'document_id_example' # String | The Telnyx document id (from `reusable.options[].details[].documentId`).
|
|
1603
|
+
|
|
1604
|
+
begin
|
|
1605
|
+
# View a KYC document on file
|
|
1606
|
+
result = api_instance.view_phone_number_kyc_document(document_id)
|
|
1607
|
+
p result
|
|
1608
|
+
rescue Zernio::ApiError => e
|
|
1609
|
+
puts "Error when calling PhoneNumbersApi->view_phone_number_kyc_document: #{e}"
|
|
1610
|
+
end
|
|
1611
|
+
```
|
|
1612
|
+
|
|
1613
|
+
#### Using the view_phone_number_kyc_document_with_http_info variant
|
|
1614
|
+
|
|
1615
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1616
|
+
|
|
1617
|
+
> <Array(File, Integer, Hash)> view_phone_number_kyc_document_with_http_info(document_id)
|
|
1618
|
+
|
|
1619
|
+
```ruby
|
|
1620
|
+
begin
|
|
1621
|
+
# View a KYC document on file
|
|
1622
|
+
data, status_code, headers = api_instance.view_phone_number_kyc_document_with_http_info(document_id)
|
|
1623
|
+
p status_code # => 2xx
|
|
1624
|
+
p headers # => { ... }
|
|
1625
|
+
p data # => File
|
|
1626
|
+
rescue Zernio::ApiError => e
|
|
1627
|
+
puts "Error when calling PhoneNumbersApi->view_phone_number_kyc_document_with_http_info: #{e}"
|
|
1628
|
+
end
|
|
1629
|
+
```
|
|
1630
|
+
|
|
1631
|
+
### Parameters
|
|
1632
|
+
|
|
1633
|
+
| Name | Type | Description | Notes |
|
|
1634
|
+
| ---- | ---- | ----------- | ----- |
|
|
1635
|
+
| **document_id** | **String** | The Telnyx document id (from `reusable.options[].details[].documentId`). | |
|
|
1636
|
+
|
|
1637
|
+
### Return type
|
|
1638
|
+
|
|
1639
|
+
**File**
|
|
1640
|
+
|
|
1641
|
+
### Authorization
|
|
1642
|
+
|
|
1643
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
1644
|
+
|
|
1645
|
+
### HTTP request headers
|
|
1646
|
+
|
|
1647
|
+
- **Content-Type**: Not defined
|
|
1648
|
+
- **Accept**: application/pdf, application/json
|
|
1649
|
+
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
| **submission_id** | **String** | Idempotency token for this submission attempt. A retry/double-submit with the same token returns the same number; omit and each call creates a new number. | [optional] |
|
|
10
10
|
| **quantity** | **Integer** | Provision several same-country numbers from one submission (1-5). The single verification covers all of them; each number is billed only when it activates. Numbers that fail to order are skipped (best-effort). | [optional][default to 1] |
|
|
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
|
+
| **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] |
|
|
13
14
|
| **end_user_first_name** | **String** | End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement. | [optional] |
|
|
14
15
|
| **end_user_last_name** | **String** | End user's legal last name. Same condition as endUserFirstName. | [optional] |
|
|
15
16
|
| **values** | **Hash<String, String>** | requirementId → textual value | [optional] |
|
|
@@ -27,6 +28,7 @@ instance = Zernio::SubmitPhoneNumberKycRequest.new(
|
|
|
27
28
|
submission_id: null,
|
|
28
29
|
quantity: null,
|
|
29
30
|
reuse: null,
|
|
31
|
+
reuse_option_id: null,
|
|
30
32
|
reuse_from: null,
|
|
31
33
|
end_user_first_name: null,
|
|
32
34
|
end_user_last_name: null,
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
| **submission_id** | **String** | Idempotency token for this submission attempt. A retry/double-submit with the same token returns the same number; omit and each call creates a new number. | [optional] |
|
|
10
10
|
| **quantity** | **Integer** | Provision several same-country numbers from one submission (1-5). The single verification covers all of them; each number is billed only when it activates. Numbers that fail to order are skipped (best-effort). | [optional][default to 1] |
|
|
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
|
+
| **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] |
|
|
13
14
|
| **end_user_first_name** | **String** | End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement. | [optional] |
|
|
14
15
|
| **end_user_last_name** | **String** | End user's legal last name. Same condition as endUserFirstName. | [optional] |
|
|
15
16
|
| **values** | **Hash<String, String>** | requirementId → textual value | [optional] |
|
|
@@ -27,6 +28,7 @@ instance = Zernio::SubmitWhatsAppNumberKycRequest.new(
|
|
|
27
28
|
submission_id: null,
|
|
28
29
|
quantity: null,
|
|
29
30
|
reuse: null,
|
|
31
|
+
reuse_option_id: null,
|
|
30
32
|
reuse_from: null,
|
|
31
33
|
end_user_first_name: null,
|
|
32
34
|
end_user_last_name: null,
|
|
@@ -1514,5 +1514,68 @@ module Zernio
|
|
|
1514
1514
|
end
|
|
1515
1515
|
return data, status_code, headers
|
|
1516
1516
|
end
|
|
1517
|
+
|
|
1518
|
+
# View a KYC document on file
|
|
1519
|
+
# Stream a document backing a reusable verification (the `documentId` values from GET /v1/phone-numbers/kyc `reusable.options[].details[]`), so the account holder can see what's on file before reusing it. Returned inline as `application/pdf` (uploads are normalized to PDF). Auth-scoped: a document is viewable only when its id is referenced by one of the caller's own numbers — otherwise `404`.
|
|
1520
|
+
# @param document_id [String] The Telnyx document id (from `reusable.options[].details[].documentId`).
|
|
1521
|
+
# @param [Hash] opts the optional parameters
|
|
1522
|
+
# @return [File]
|
|
1523
|
+
def view_phone_number_kyc_document(document_id, opts = {})
|
|
1524
|
+
data, _status_code, _headers = view_phone_number_kyc_document_with_http_info(document_id, opts)
|
|
1525
|
+
data
|
|
1526
|
+
end
|
|
1527
|
+
|
|
1528
|
+
# View a KYC document on file
|
|
1529
|
+
# Stream a document backing a reusable verification (the `documentId` values from GET /v1/phone-numbers/kyc `reusable.options[].details[]`), so the account holder can see what's on file before reusing it. Returned inline as `application/pdf` (uploads are normalized to PDF). Auth-scoped: a document is viewable only when its id is referenced by one of the caller's own numbers — otherwise `404`.
|
|
1530
|
+
# @param document_id [String] The Telnyx document id (from `reusable.options[].details[].documentId`).
|
|
1531
|
+
# @param [Hash] opts the optional parameters
|
|
1532
|
+
# @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
|
|
1533
|
+
def view_phone_number_kyc_document_with_http_info(document_id, opts = {})
|
|
1534
|
+
if @api_client.config.debugging
|
|
1535
|
+
@api_client.config.logger.debug 'Calling API: PhoneNumbersApi.view_phone_number_kyc_document ...'
|
|
1536
|
+
end
|
|
1537
|
+
# verify the required parameter 'document_id' is set
|
|
1538
|
+
if @api_client.config.client_side_validation && document_id.nil?
|
|
1539
|
+
fail ArgumentError, "Missing the required parameter 'document_id' when calling PhoneNumbersApi.view_phone_number_kyc_document"
|
|
1540
|
+
end
|
|
1541
|
+
# resource path
|
|
1542
|
+
local_var_path = '/v1/phone-numbers/kyc/document/{documentId}'.sub('{' + 'documentId' + '}', CGI.escape(document_id.to_s))
|
|
1543
|
+
|
|
1544
|
+
# query parameters
|
|
1545
|
+
query_params = opts[:query_params] || {}
|
|
1546
|
+
|
|
1547
|
+
# header parameters
|
|
1548
|
+
header_params = opts[:header_params] || {}
|
|
1549
|
+
# HTTP header 'Accept' (if needed)
|
|
1550
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/pdf', 'application/json']) unless header_params['Accept']
|
|
1551
|
+
|
|
1552
|
+
# form parameters
|
|
1553
|
+
form_params = opts[:form_params] || {}
|
|
1554
|
+
|
|
1555
|
+
# http body (model)
|
|
1556
|
+
post_body = opts[:debug_body]
|
|
1557
|
+
|
|
1558
|
+
# return_type
|
|
1559
|
+
return_type = opts[:debug_return_type] || 'File'
|
|
1560
|
+
|
|
1561
|
+
# auth_names
|
|
1562
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
1563
|
+
|
|
1564
|
+
new_options = opts.merge(
|
|
1565
|
+
:operation => :"PhoneNumbersApi.view_phone_number_kyc_document",
|
|
1566
|
+
:header_params => header_params,
|
|
1567
|
+
:query_params => query_params,
|
|
1568
|
+
:form_params => form_params,
|
|
1569
|
+
:body => post_body,
|
|
1570
|
+
:auth_names => auth_names,
|
|
1571
|
+
:return_type => return_type
|
|
1572
|
+
)
|
|
1573
|
+
|
|
1574
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1575
|
+
if @api_client.config.debugging
|
|
1576
|
+
@api_client.config.logger.debug "API called: PhoneNumbersApi#view_phone_number_kyc_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1577
|
+
end
|
|
1578
|
+
return data, status_code, headers
|
|
1579
|
+
end
|
|
1517
1580
|
end
|
|
1518
1581
|
end
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
|
-
# Present when this account already has
|
|
17
|
+
# Present when this account already has a reusable verification for the country (skip the form). `fromPhoneNumber`/`details` mirror the first option; `options` lists ALL reusable verifications (agencies hold one per end client), approved-first. Pass the chosen option's `id` as `reuseOptionId` on POST. Each option's `instant` says whether it activates in minutes (group-approved) or still queues for carrier review (1-3 days).
|
|
18
18
|
class GetPhoneNumberKycForm200ResponseReusable < ApiModelBase
|
|
19
19
|
attr_accessor :available
|
|
20
20
|
|
|
@@ -15,14 +15,23 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
17
|
class GetPhoneNumberKycForm200ResponseReusableOptionsInner < ApiModelBase
|
|
18
|
+
# Opaque option id — pass as `reuseOptionId` on POST. Stable selection key (a phone number is not unique across verifications).
|
|
19
|
+
attr_accessor :id
|
|
20
|
+
|
|
21
|
+
# Display only — the number this verification was submitted for. Not a selection key.
|
|
18
22
|
attr_accessor :from_phone_number
|
|
19
23
|
|
|
24
|
+
# true = group-approved, a new order activates in minutes; false = documents are reused but the order still queues for carrier review (1-3 days).
|
|
25
|
+
attr_accessor :instant
|
|
26
|
+
|
|
20
27
|
attr_accessor :details
|
|
21
28
|
|
|
22
29
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
30
|
def self.attribute_map
|
|
24
31
|
{
|
|
32
|
+
:'id' => :'id',
|
|
25
33
|
:'from_phone_number' => :'fromPhoneNumber',
|
|
34
|
+
:'instant' => :'instant',
|
|
26
35
|
:'details' => :'details'
|
|
27
36
|
}
|
|
28
37
|
end
|
|
@@ -40,8 +49,10 @@ module Zernio
|
|
|
40
49
|
# Attribute type mapping.
|
|
41
50
|
def self.openapi_types
|
|
42
51
|
{
|
|
52
|
+
:'id' => :'String',
|
|
43
53
|
:'from_phone_number' => :'String',
|
|
44
|
-
:'
|
|
54
|
+
:'instant' => :'Boolean',
|
|
55
|
+
:'details' => :'Array<GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner>'
|
|
45
56
|
}
|
|
46
57
|
end
|
|
47
58
|
|
|
@@ -67,10 +78,18 @@ module Zernio
|
|
|
67
78
|
h[k.to_sym] = v
|
|
68
79
|
}
|
|
69
80
|
|
|
81
|
+
if attributes.key?(:'id')
|
|
82
|
+
self.id = attributes[:'id']
|
|
83
|
+
end
|
|
84
|
+
|
|
70
85
|
if attributes.key?(:'from_phone_number')
|
|
71
86
|
self.from_phone_number = attributes[:'from_phone_number']
|
|
72
87
|
end
|
|
73
88
|
|
|
89
|
+
if attributes.key?(:'instant')
|
|
90
|
+
self.instant = attributes[:'instant']
|
|
91
|
+
end
|
|
92
|
+
|
|
74
93
|
if attributes.key?(:'details')
|
|
75
94
|
if (value = attributes[:'details']).is_a?(Array)
|
|
76
95
|
self.details = value
|
|
@@ -98,7 +117,9 @@ module Zernio
|
|
|
98
117
|
def ==(o)
|
|
99
118
|
return true if self.equal?(o)
|
|
100
119
|
self.class == o.class &&
|
|
120
|
+
id == o.id &&
|
|
101
121
|
from_phone_number == o.from_phone_number &&
|
|
122
|
+
instant == o.instant &&
|
|
102
123
|
details == o.details
|
|
103
124
|
end
|
|
104
125
|
|
|
@@ -111,7 +132,7 @@ module Zernio
|
|
|
111
132
|
# Calculates hash code according to all attributes.
|
|
112
133
|
# @return [Integer] Hash code
|
|
113
134
|
def hash
|
|
114
|
-
[from_phone_number, details].hash
|
|
135
|
+
[id, from_phone_number, instant, details].hash
|
|
115
136
|
end
|
|
116
137
|
|
|
117
138
|
# Builds the object from hash
|
|
@@ -0,0 +1,166 @@
|
|
|
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 GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner < ApiModelBase
|
|
18
|
+
attr_accessor :label
|
|
19
|
+
|
|
20
|
+
attr_accessor :value
|
|
21
|
+
|
|
22
|
+
# Present on document rows — the Telnyx document id. GET /v1/whatsapp/phone-numbers/kyc/document/{documentId} streams it (auth-scoped, inline PDF).
|
|
23
|
+
attr_accessor :document_id
|
|
24
|
+
|
|
25
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
26
|
+
def self.attribute_map
|
|
27
|
+
{
|
|
28
|
+
:'label' => :'label',
|
|
29
|
+
:'value' => :'value',
|
|
30
|
+
:'document_id' => :'documentId'
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Returns attribute mapping this model knows about
|
|
35
|
+
def self.acceptable_attribute_map
|
|
36
|
+
attribute_map
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Returns all the JSON keys this model knows about
|
|
40
|
+
def self.acceptable_attributes
|
|
41
|
+
acceptable_attribute_map.values
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Attribute type mapping.
|
|
45
|
+
def self.openapi_types
|
|
46
|
+
{
|
|
47
|
+
:'label' => :'String',
|
|
48
|
+
:'value' => :'String',
|
|
49
|
+
:'document_id' => :'String'
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# List of attributes with nullable: true
|
|
54
|
+
def self.openapi_nullable
|
|
55
|
+
Set.new([
|
|
56
|
+
])
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Initializes the object
|
|
60
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
61
|
+
def initialize(attributes = {})
|
|
62
|
+
if (!attributes.is_a?(Hash))
|
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner` initialize method"
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
67
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
68
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
69
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
71
|
+
end
|
|
72
|
+
h[k.to_sym] = v
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'label')
|
|
76
|
+
self.label = attributes[:'label']
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'value')
|
|
80
|
+
self.value = attributes[:'value']
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
if attributes.key?(:'document_id')
|
|
84
|
+
self.document_id = attributes[:'document_id']
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
89
|
+
# @return Array for valid properties with the reasons
|
|
90
|
+
def list_invalid_properties
|
|
91
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
92
|
+
invalid_properties = Array.new
|
|
93
|
+
invalid_properties
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Check to see if the all the properties in the model are valid
|
|
97
|
+
# @return true if the model is valid
|
|
98
|
+
def valid?
|
|
99
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
100
|
+
true
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Checks equality by comparing each attribute.
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def ==(o)
|
|
106
|
+
return true if self.equal?(o)
|
|
107
|
+
self.class == o.class &&
|
|
108
|
+
label == o.label &&
|
|
109
|
+
value == o.value &&
|
|
110
|
+
document_id == o.document_id
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# @see the `==` method
|
|
114
|
+
# @param [Object] Object to be compared
|
|
115
|
+
def eql?(o)
|
|
116
|
+
self == o
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Calculates hash code according to all attributes.
|
|
120
|
+
# @return [Integer] Hash code
|
|
121
|
+
def hash
|
|
122
|
+
[label, value, document_id].hash
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Builds the object from hash
|
|
126
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
127
|
+
# @return [Object] Returns the model itself
|
|
128
|
+
def self.build_from_hash(attributes)
|
|
129
|
+
return nil unless attributes.is_a?(Hash)
|
|
130
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
131
|
+
transformed_hash = {}
|
|
132
|
+
openapi_types.each_pair do |key, type|
|
|
133
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
134
|
+
transformed_hash["#{key}"] = nil
|
|
135
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
136
|
+
# check to ensure the input is an array given that the attribute
|
|
137
|
+
# is documented as an array but the input is not
|
|
138
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
139
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
140
|
+
end
|
|
141
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
142
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
new(transformed_hash)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# Returns the object in the form of hash
|
|
149
|
+
# @return [Hash] Returns the object in the form of hash
|
|
150
|
+
def to_hash
|
|
151
|
+
hash = {}
|
|
152
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
153
|
+
value = self.send(attr)
|
|
154
|
+
if value.nil?
|
|
155
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
156
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
hash[param] = _to_hash(value)
|
|
160
|
+
end
|
|
161
|
+
hash
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
end
|
|
@@ -28,7 +28,10 @@ module Zernio
|
|
|
28
28
|
# Reuse a prior approved verification for this country (skips document/field collection; places the order immediately).
|
|
29
29
|
attr_accessor :reuse
|
|
30
30
|
|
|
31
|
-
# Which
|
|
31
|
+
# Which reusable verification to use (GET reusable.options[].id). The unambiguous selection key. Omitted = the approved default. No match = 409.
|
|
32
|
+
attr_accessor :reuse_option_id
|
|
33
|
+
|
|
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.
|
|
32
35
|
attr_accessor :reuse_from
|
|
33
36
|
|
|
34
37
|
# End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement.
|
|
@@ -53,6 +56,7 @@ module Zernio
|
|
|
53
56
|
:'submission_id' => :'submissionId',
|
|
54
57
|
:'quantity' => :'quantity',
|
|
55
58
|
:'reuse' => :'reuse',
|
|
59
|
+
:'reuse_option_id' => :'reuseOptionId',
|
|
56
60
|
:'reuse_from' => :'reuseFrom',
|
|
57
61
|
:'end_user_first_name' => :'endUserFirstName',
|
|
58
62
|
:'end_user_last_name' => :'endUserLastName',
|
|
@@ -80,6 +84,7 @@ module Zernio
|
|
|
80
84
|
:'submission_id' => :'String',
|
|
81
85
|
:'quantity' => :'Integer',
|
|
82
86
|
:'reuse' => :'Boolean',
|
|
87
|
+
:'reuse_option_id' => :'String',
|
|
83
88
|
:'reuse_from' => :'String',
|
|
84
89
|
:'end_user_first_name' => :'String',
|
|
85
90
|
:'end_user_last_name' => :'String',
|
|
@@ -137,6 +142,10 @@ module Zernio
|
|
|
137
142
|
self.reuse = attributes[:'reuse']
|
|
138
143
|
end
|
|
139
144
|
|
|
145
|
+
if attributes.key?(:'reuse_option_id')
|
|
146
|
+
self.reuse_option_id = attributes[:'reuse_option_id']
|
|
147
|
+
end
|
|
148
|
+
|
|
140
149
|
if attributes.key?(:'reuse_from')
|
|
141
150
|
self.reuse_from = attributes[:'reuse_from']
|
|
142
151
|
end
|
|
@@ -249,6 +258,7 @@ module Zernio
|
|
|
249
258
|
submission_id == o.submission_id &&
|
|
250
259
|
quantity == o.quantity &&
|
|
251
260
|
reuse == o.reuse &&
|
|
261
|
+
reuse_option_id == o.reuse_option_id &&
|
|
252
262
|
reuse_from == o.reuse_from &&
|
|
253
263
|
end_user_first_name == o.end_user_first_name &&
|
|
254
264
|
end_user_last_name == o.end_user_last_name &&
|
|
@@ -266,7 +276,7 @@ module Zernio
|
|
|
266
276
|
# Calculates hash code according to all attributes.
|
|
267
277
|
# @return [Integer] Hash code
|
|
268
278
|
def hash
|
|
269
|
-
[profile_id, country, submission_id, quantity, reuse, reuse_from, end_user_first_name, end_user_last_name, values, documents, address].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
|
|
270
280
|
end
|
|
271
281
|
|
|
272
282
|
# Builds the object from hash
|
|
@@ -28,7 +28,10 @@ module Zernio
|
|
|
28
28
|
# Reuse a prior approved verification for this country (skips document/field collection; places the order immediately).
|
|
29
29
|
attr_accessor :reuse
|
|
30
30
|
|
|
31
|
-
# Which
|
|
31
|
+
# Which reusable verification to use (GET reusable.options[].id). The unambiguous selection key. Omitted = the approved default. No match = 409.
|
|
32
|
+
attr_accessor :reuse_option_id
|
|
33
|
+
|
|
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.
|
|
32
35
|
attr_accessor :reuse_from
|
|
33
36
|
|
|
34
37
|
# End user's legal first name. Required when the country has an action/ID-verification (Onfido) requirement.
|
|
@@ -53,6 +56,7 @@ module Zernio
|
|
|
53
56
|
:'submission_id' => :'submissionId',
|
|
54
57
|
:'quantity' => :'quantity',
|
|
55
58
|
:'reuse' => :'reuse',
|
|
59
|
+
:'reuse_option_id' => :'reuseOptionId',
|
|
56
60
|
:'reuse_from' => :'reuseFrom',
|
|
57
61
|
:'end_user_first_name' => :'endUserFirstName',
|
|
58
62
|
:'end_user_last_name' => :'endUserLastName',
|
|
@@ -80,6 +84,7 @@ module Zernio
|
|
|
80
84
|
:'submission_id' => :'String',
|
|
81
85
|
:'quantity' => :'Integer',
|
|
82
86
|
:'reuse' => :'Boolean',
|
|
87
|
+
:'reuse_option_id' => :'String',
|
|
83
88
|
:'reuse_from' => :'String',
|
|
84
89
|
:'end_user_first_name' => :'String',
|
|
85
90
|
:'end_user_last_name' => :'String',
|
|
@@ -137,6 +142,10 @@ module Zernio
|
|
|
137
142
|
self.reuse = attributes[:'reuse']
|
|
138
143
|
end
|
|
139
144
|
|
|
145
|
+
if attributes.key?(:'reuse_option_id')
|
|
146
|
+
self.reuse_option_id = attributes[:'reuse_option_id']
|
|
147
|
+
end
|
|
148
|
+
|
|
140
149
|
if attributes.key?(:'reuse_from')
|
|
141
150
|
self.reuse_from = attributes[:'reuse_from']
|
|
142
151
|
end
|
|
@@ -249,6 +258,7 @@ module Zernio
|
|
|
249
258
|
submission_id == o.submission_id &&
|
|
250
259
|
quantity == o.quantity &&
|
|
251
260
|
reuse == o.reuse &&
|
|
261
|
+
reuse_option_id == o.reuse_option_id &&
|
|
252
262
|
reuse_from == o.reuse_from &&
|
|
253
263
|
end_user_first_name == o.end_user_first_name &&
|
|
254
264
|
end_user_last_name == o.end_user_last_name &&
|
|
@@ -266,7 +276,7 @@ module Zernio
|
|
|
266
276
|
# Calculates hash code according to all attributes.
|
|
267
277
|
# @return [Integer] Hash code
|
|
268
278
|
def hash
|
|
269
|
-
[profile_id, country, submission_id, quantity, reuse, reuse_from, end_user_first_name, end_user_last_name, values, documents, address].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
|
|
270
280
|
end
|
|
271
281
|
|
|
272
282
|
# Builds the object from hash
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -612,6 +612,7 @@ require 'zernio-sdk/models/get_phone_number_kyc_form200_response_fields_inner'
|
|
|
612
612
|
require 'zernio-sdk/models/get_phone_number_kyc_form200_response_reusable'
|
|
613
613
|
require 'zernio-sdk/models/get_phone_number_kyc_form200_response_reusable_details_inner'
|
|
614
614
|
require 'zernio-sdk/models/get_phone_number_kyc_form200_response_reusable_options_inner'
|
|
615
|
+
require 'zernio-sdk/models/get_phone_number_kyc_form200_response_reusable_options_inner_details_inner'
|
|
615
616
|
require 'zernio-sdk/models/get_phone_number_port_in_order_requirements200_response'
|
|
616
617
|
require 'zernio-sdk/models/get_phone_number_port_in_order_requirements200_response_requirements_inner'
|
|
617
618
|
require 'zernio-sdk/models/get_phone_number_port_in_requirements200_response'
|