zernio-sdk 0.0.555 → 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 +1 -1
- data/docs/GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner.md +22 -0
- data/docs/PhoneNumbersApi.md +70 -0
- data/lib/zernio-sdk/api/phone_numbers_api.rb +63 -0
- data/lib/zernio-sdk/models/get_phone_number_kyc_form200_response_reusable_options_inner.rb +1 -1
- data/lib/zernio-sdk/models/get_phone_number_kyc_form200_response_reusable_options_inner_details_inner.rb +166 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +1 -0
- data/openapi.yaml +30 -0
- 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
- metadata +5 -1
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)
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
| **id** | **String** | Opaque option id — pass as `reuseOptionId` on POST. Stable selection key (a phone number is not unique across verifications). | [optional] |
|
|
8
8
|
| **from_phone_number** | **String** | Display only — the number this verification was submitted for. Not a selection key. | [optional] |
|
|
9
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<
|
|
10
|
+
| **details** | [**Array<GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner>**](GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner.md) | | [optional] |
|
|
11
11
|
|
|
12
12
|
## Example
|
|
13
13
|
|
|
@@ -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
|
+
|
|
@@ -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
|
|
@@ -52,7 +52,7 @@ module Zernio
|
|
|
52
52
|
:'id' => :'String',
|
|
53
53
|
:'from_phone_number' => :'String',
|
|
54
54
|
:'instant' => :'Boolean',
|
|
55
|
-
:'details' => :'Array<
|
|
55
|
+
:'details' => :'Array<GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner>'
|
|
56
56
|
}
|
|
57
57
|
end
|
|
58
58
|
|
|
@@ -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
|
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'
|
data/openapi.yaml
CHANGED
|
@@ -28497,6 +28497,7 @@ paths:
|
|
|
28497
28497
|
properties:
|
|
28498
28498
|
label: { type: string }
|
|
28499
28499
|
value: { type: string }
|
|
28500
|
+
documentId: { type: string, description: 'Present on document rows — the Telnyx document id. GET /v1/whatsapp/phone-numbers/kyc/document/{documentId} streams it (auth-scoped, inline PDF).' }
|
|
28500
28501
|
'400': { description: Country not available }
|
|
28501
28502
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
28502
28503
|
post:
|
|
@@ -28602,6 +28603,34 @@ paths:
|
|
|
28602
28603
|
'409': { description: reuse requested but no prior approved verification exists for this country }
|
|
28603
28604
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
28604
28605
|
|
|
28606
|
+
/v1/phone-numbers/kyc/document/{documentId}:
|
|
28607
|
+
get:
|
|
28608
|
+
operationId: viewPhoneNumberKycDocument
|
|
28609
|
+
tags: [Phone Numbers]
|
|
28610
|
+
summary: View a KYC document on file
|
|
28611
|
+
description: |
|
|
28612
|
+
Stream a document backing a reusable verification (the `documentId`
|
|
28613
|
+
values from GET /v1/phone-numbers/kyc `reusable.options[].details[]`), so
|
|
28614
|
+
the account holder can see what's on file before reusing it. Returned
|
|
28615
|
+
inline as `application/pdf` (uploads are normalized to PDF). Auth-scoped:
|
|
28616
|
+
a document is viewable only when its id is referenced by one of the
|
|
28617
|
+
caller's own numbers — otherwise `404`.
|
|
28618
|
+
parameters:
|
|
28619
|
+
- name: documentId
|
|
28620
|
+
in: path
|
|
28621
|
+
required: true
|
|
28622
|
+
schema: { type: string }
|
|
28623
|
+
description: The Telnyx document id (from `reusable.options[].details[].documentId`).
|
|
28624
|
+
responses:
|
|
28625
|
+
'200':
|
|
28626
|
+
description: The document, streamed inline.
|
|
28627
|
+
content:
|
|
28628
|
+
application/pdf:
|
|
28629
|
+
schema: { type: string, format: binary }
|
|
28630
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
28631
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
28632
|
+
'404': { description: No such document for this account. }
|
|
28633
|
+
|
|
28605
28634
|
/v1/phone-numbers/kyc/upload-document:
|
|
28606
28635
|
post:
|
|
28607
28636
|
operationId: uploadPhoneNumberKycDocument
|
|
@@ -29305,6 +29334,7 @@ paths:
|
|
|
29305
29334
|
properties:
|
|
29306
29335
|
label: { type: string }
|
|
29307
29336
|
value: { type: string }
|
|
29337
|
+
documentId: { type: string, description: 'Present on document rows — the Telnyx document id. GET /v1/whatsapp/phone-numbers/kyc/document/{documentId} streams it (auth-scoped, inline PDF).' }
|
|
29308
29338
|
'400': { description: Country not available }
|
|
29309
29339
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
29310
29340
|
post:
|
|
@@ -307,4 +307,16 @@ describe 'PhoneNumbersApi' do
|
|
|
307
307
|
end
|
|
308
308
|
end
|
|
309
309
|
|
|
310
|
+
# unit tests for view_phone_number_kyc_document
|
|
311
|
+
# View a KYC document on file
|
|
312
|
+
# 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`.
|
|
313
|
+
# @param document_id The Telnyx document id (from `reusable.options[].details[].documentId`).
|
|
314
|
+
# @param [Hash] opts the optional parameters
|
|
315
|
+
# @return [File]
|
|
316
|
+
describe 'view_phone_number_kyc_document test' do
|
|
317
|
+
it 'should work' do
|
|
318
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
319
|
+
end
|
|
320
|
+
end
|
|
321
|
+
|
|
310
322
|
end
|
data/spec/models/get_phone_number_kyc_form200_response_reusable_options_inner_details_inner_spec.rb
ADDED
|
@@ -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::GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner do
|
|
21
|
+
#let(:instance) { Zernio::GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner' do
|
|
24
|
+
it 'should create an instance of GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "label"' 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 "value"' 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 "document_id"' 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
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zernio-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.556
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
@@ -685,6 +685,7 @@ files:
|
|
|
685
685
|
- docs/GetPhoneNumberKycForm200ResponseReusable.md
|
|
686
686
|
- docs/GetPhoneNumberKycForm200ResponseReusableDetailsInner.md
|
|
687
687
|
- docs/GetPhoneNumberKycForm200ResponseReusableOptionsInner.md
|
|
688
|
+
- docs/GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner.md
|
|
688
689
|
- docs/GetPhoneNumberPortInOrderRequirements200Response.md
|
|
689
690
|
- docs/GetPhoneNumberPortInOrderRequirements200ResponseRequirementsInner.md
|
|
690
691
|
- docs/GetPhoneNumberPortInRequirements200Response.md
|
|
@@ -2279,6 +2280,7 @@ files:
|
|
|
2279
2280
|
- lib/zernio-sdk/models/get_phone_number_kyc_form200_response_reusable.rb
|
|
2280
2281
|
- lib/zernio-sdk/models/get_phone_number_kyc_form200_response_reusable_details_inner.rb
|
|
2281
2282
|
- lib/zernio-sdk/models/get_phone_number_kyc_form200_response_reusable_options_inner.rb
|
|
2283
|
+
- lib/zernio-sdk/models/get_phone_number_kyc_form200_response_reusable_options_inner_details_inner.rb
|
|
2282
2284
|
- lib/zernio-sdk/models/get_phone_number_port_in_order_requirements200_response.rb
|
|
2283
2285
|
- lib/zernio-sdk/models/get_phone_number_port_in_order_requirements200_response_requirements_inner.rb
|
|
2284
2286
|
- lib/zernio-sdk/models/get_phone_number_port_in_requirements200_response.rb
|
|
@@ -3830,6 +3832,7 @@ files:
|
|
|
3830
3832
|
- spec/models/get_phone_number200_response_spec.rb
|
|
3831
3833
|
- spec/models/get_phone_number_kyc_form200_response_fields_inner_spec.rb
|
|
3832
3834
|
- spec/models/get_phone_number_kyc_form200_response_reusable_details_inner_spec.rb
|
|
3835
|
+
- spec/models/get_phone_number_kyc_form200_response_reusable_options_inner_details_inner_spec.rb
|
|
3833
3836
|
- spec/models/get_phone_number_kyc_form200_response_reusable_options_inner_spec.rb
|
|
3834
3837
|
- spec/models/get_phone_number_kyc_form200_response_reusable_spec.rb
|
|
3835
3838
|
- spec/models/get_phone_number_kyc_form200_response_spec.rb
|
|
@@ -5832,6 +5835,7 @@ test_files:
|
|
|
5832
5835
|
- spec/models/create_contact_request_spec.rb
|
|
5833
5836
|
- spec/models/usage_metering_days_inner_spec.rb
|
|
5834
5837
|
- spec/models/edit_inbox_comment200_response_spec.rb
|
|
5838
|
+
- spec/models/get_phone_number_kyc_form200_response_reusable_options_inner_details_inner_spec.rb
|
|
5835
5839
|
- spec/models/send_inbox_message_request_contacts_inner_phones_inner_spec.rb
|
|
5836
5840
|
- spec/models/update_ad_set_request_platform_specific_data_spec.rb
|
|
5837
5841
|
- spec/models/list_whats_app_flow_versions200_response_spec.rb
|