zernio-sdk 0.0.555 → 0.0.557

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 030a3399a6d872a9f98f741053d87d2a129d70ee8a0d908a4137587e0fc17412
4
- data.tar.gz: ff9c216ca793ff273f6b15fa7611b2373e2b3769805a7276b71ae693bc4d30a1
3
+ metadata.gz: c773df01fa3d872887930b82b8cc50c3218f491096345aa1af5a95dd93f2cfd1
4
+ data.tar.gz: b7828a6bcf6ad20a6dd3e2a21c1a396c27cfb44c5c936df2ee6184f45823fc1c
5
5
  SHA512:
6
- metadata.gz: 11075faf7b7f4287420dfc5a2f9afe06930daea2b55a8448420d407e757c1a2ebb1e475b381547fa8840d8b08188672fdae7d9ecc63bbac49af2ccdd0e9338af
7
- data.tar.gz: 39262e6b6e4a464c1357872e4d01158c6f2df9e0fbe78081163d63fd06bf232c3e3e150a9b6e141e92b50631f1746e9bdf2ed29fbc5e0a031b6558f6ba2c40e0
6
+ metadata.gz: b1af2afebbf4fde4f0802583edf9c06ba6ed5520c11a031fd62b1834ef5f53408c55b0b7f6472e10ef6adc64e8be4d3cc6951b3a72855d3c5649d0b6ffe944d6
7
+ data.tar.gz: 514484dcc94ec4f41e5119430b76f505c01a14ab9b68b9530eb89d9c2092cc45ec7a16d9b8df51577e096f01e3fa1f2ee752bdea333ea821dcf078fe29e0fcaf
data/README.md CHANGED
@@ -374,12 +374,14 @@ Class | Method | HTTP request | Description
374
374
  *Zernio::PhoneNumbersApi* | [**purchase_phone_number**](docs/PhoneNumbersApi.md#purchase_phone_number) | **POST** /v1/phone-numbers/purchase | Purchase phone number
375
375
  *Zernio::PhoneNumbersApi* | [**release_phone_number**](docs/PhoneNumbersApi.md#release_phone_number) | **DELETE** /v1/phone-numbers/{id} | Release phone number
376
376
  *Zernio::PhoneNumbersApi* | [**remediate_phone_number**](docs/PhoneNumbersApi.md#remediate_phone_number) | **POST** /v1/phone-numbers/{id}/remediate | Resubmit a declined number
377
+ *Zernio::PhoneNumbersApi* | [**reply_to_phone_number_reviewer**](docs/PhoneNumbersApi.md#reply_to_phone_number_reviewer) | **POST** /v1/phone-numbers/{id}/remediate/reply | Reply to the regulatory reviewer
377
378
  *Zernio::PhoneNumbersApi* | [**review_phone_number_kyc_packet**](docs/PhoneNumbersApi.md#review_phone_number_kyc_packet) | **POST** /v1/phone-numbers/kyc/review-packet | Pre-review a KYC packet
378
379
  *Zernio::PhoneNumbersApi* | [**search_available_phone_numbers**](docs/PhoneNumbersApi.md#search_available_phone_numbers) | **GET** /v1/phone-numbers/available | Search available numbers
379
380
  *Zernio::PhoneNumbersApi* | [**submit_phone_number_kyc**](docs/PhoneNumbersApi.md#submit_phone_number_kyc) | **POST** /v1/phone-numbers/kyc | Submit KYC
380
381
  *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
382
  *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
383
  *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
384
+ *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
385
  *Zernio::PostsApi* | [**bulk_upload_posts**](docs/PostsApi.md#bulk_upload_posts) | **POST** /v1/posts/bulk-upload | Bulk upload from CSV
384
386
  *Zernio::PostsApi* | [**create_post**](docs/PostsApi.md#create_post) | **POST** /v1/posts | Create post
385
387
  *Zernio::PostsApi* | [**delete_post**](docs/PostsApi.md#delete_post) | **DELETE** /v1/posts/{postId} | Delete post
@@ -1180,6 +1182,7 @@ Class | Method | HTTP request | Description
1180
1182
  - [Zernio::GetPhoneNumberKycForm200ResponseReusable](docs/GetPhoneNumberKycForm200ResponseReusable.md)
1181
1183
  - [Zernio::GetPhoneNumberKycForm200ResponseReusableDetailsInner](docs/GetPhoneNumberKycForm200ResponseReusableDetailsInner.md)
1182
1184
  - [Zernio::GetPhoneNumberKycForm200ResponseReusableOptionsInner](docs/GetPhoneNumberKycForm200ResponseReusableOptionsInner.md)
1185
+ - [Zernio::GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner](docs/GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner.md)
1183
1186
  - [Zernio::GetPhoneNumberPortInOrderRequirements200Response](docs/GetPhoneNumberPortInOrderRequirements200Response.md)
1184
1187
  - [Zernio::GetPhoneNumberPortInOrderRequirements200ResponseRequirementsInner](docs/GetPhoneNumberPortInOrderRequirements200ResponseRequirementsInner.md)
1185
1188
  - [Zernio::GetPhoneNumberPortInRequirements200Response](docs/GetPhoneNumberPortInRequirements200Response.md)
@@ -1590,6 +1593,9 @@ Class | Method | HTTP request | Description
1590
1593
  - [Zernio::ReplyToInboxReviewRequest](docs/ReplyToInboxReviewRequest.md)
1591
1594
  - [Zernio::ReplyToMention200Response](docs/ReplyToMention200Response.md)
1592
1595
  - [Zernio::ReplyToMentionRequest](docs/ReplyToMentionRequest.md)
1596
+ - [Zernio::ReplyToPhoneNumberReviewer200Response](docs/ReplyToPhoneNumberReviewer200Response.md)
1597
+ - [Zernio::ReplyToPhoneNumberReviewerRequest](docs/ReplyToPhoneNumberReviewerRequest.md)
1598
+ - [Zernio::ReplyToPhoneNumberReviewerRequestAttachmentsInner](docs/ReplyToPhoneNumberReviewerRequestAttachmentsInner.md)
1593
1599
  - [Zernio::RequestSmsSenderIdLimitIncrease200Response](docs/RequestSmsSenderIdLimitIncrease200Response.md)
1594
1600
  - [Zernio::RequestSmsSenderIdLimitIncreaseRequest](docs/RequestSmsSenderIdLimitIncreaseRequest.md)
1595
1601
  - [Zernio::ResendSmsRegistrationOtp200Response](docs/ResendSmsRegistrationOtp200Response.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<GetPhoneNumberKycForm200ResponseReusableDetailsInner>**](GetPhoneNumberKycForm200ResponseReusableDetailsInner.md) | | [optional] |
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
+
@@ -20,12 +20,14 @@ All URIs are relative to *https://zernio.com/api*
20
20
  | [**purchase_phone_number**](PhoneNumbersApi.md#purchase_phone_number) | **POST** /v1/phone-numbers/purchase | Purchase phone number |
21
21
  | [**release_phone_number**](PhoneNumbersApi.md#release_phone_number) | **DELETE** /v1/phone-numbers/{id} | Release phone number |
22
22
  | [**remediate_phone_number**](PhoneNumbersApi.md#remediate_phone_number) | **POST** /v1/phone-numbers/{id}/remediate | Resubmit a declined number |
23
+ | [**reply_to_phone_number_reviewer**](PhoneNumbersApi.md#reply_to_phone_number_reviewer) | **POST** /v1/phone-numbers/{id}/remediate/reply | Reply to the regulatory reviewer |
23
24
  | [**review_phone_number_kyc_packet**](PhoneNumbersApi.md#review_phone_number_kyc_packet) | **POST** /v1/phone-numbers/kyc/review-packet | Pre-review a KYC packet |
24
25
  | [**search_available_phone_numbers**](PhoneNumbersApi.md#search_available_phone_numbers) | **GET** /v1/phone-numbers/available | Search available numbers |
25
26
  | [**submit_phone_number_kyc**](PhoneNumbersApi.md#submit_phone_number_kyc) | **POST** /v1/phone-numbers/kyc | Submit KYC |
26
27
  | [**upload_phone_number_kyc_document**](PhoneNumbersApi.md#upload_phone_number_kyc_document) | **POST** /v1/phone-numbers/kyc/upload-document | Upload a KYC document |
27
28
  | [**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
29
  | [**validate_phone_number_kyc_address**](PhoneNumbersApi.md#validate_phone_number_kyc_address) | **POST** /v1/phone-numbers/kyc/validate-address | Pre-validate KYC address |
30
+ | [**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
31
 
30
32
 
31
33
  ## cancel_phone_number_port_in
@@ -1144,6 +1146,77 @@ end
1144
1146
  - **Accept**: application/json
1145
1147
 
1146
1148
 
1149
+ ## reply_to_phone_number_reviewer
1150
+
1151
+ > <ReplyToPhoneNumberReviewer200Response> reply_to_phone_number_reviewer(id, reply_to_phone_number_reviewer_request)
1152
+
1153
+ Reply to the regulatory reviewer
1154
+
1155
+ Post a free-text reply (with optional file attachments) to the reviewer on a number awaiting remediation — for asks the structured form can't express (e.g. \"is this personal or business?\"). Attachments are stored by us and their links are added to the reviewer's comment thread (the carrier's number order takes no loose files). A reply to a comment-style ask moves the number back to \"in review\"; a reply on a formal decline is supplementary and you must still resubmit the fix. Requires text or at least one attachment.
1156
+
1157
+ ### Examples
1158
+
1159
+ ```ruby
1160
+ require 'time'
1161
+ require 'zernio-sdk'
1162
+ # setup authorization
1163
+ Zernio.configure do |config|
1164
+ # Configure Bearer authorization (JWT): bearerAuth
1165
+ config.access_token = 'YOUR_BEARER_TOKEN'
1166
+ end
1167
+
1168
+ api_instance = Zernio::PhoneNumbersApi.new
1169
+ id = 'id_example' # String |
1170
+ reply_to_phone_number_reviewer_request = Zernio::ReplyToPhoneNumberReviewerRequest.new # ReplyToPhoneNumberReviewerRequest |
1171
+
1172
+ begin
1173
+ # Reply to the regulatory reviewer
1174
+ result = api_instance.reply_to_phone_number_reviewer(id, reply_to_phone_number_reviewer_request)
1175
+ p result
1176
+ rescue Zernio::ApiError => e
1177
+ puts "Error when calling PhoneNumbersApi->reply_to_phone_number_reviewer: #{e}"
1178
+ end
1179
+ ```
1180
+
1181
+ #### Using the reply_to_phone_number_reviewer_with_http_info variant
1182
+
1183
+ This returns an Array which contains the response data, status code and headers.
1184
+
1185
+ > <Array(<ReplyToPhoneNumberReviewer200Response>, Integer, Hash)> reply_to_phone_number_reviewer_with_http_info(id, reply_to_phone_number_reviewer_request)
1186
+
1187
+ ```ruby
1188
+ begin
1189
+ # Reply to the regulatory reviewer
1190
+ data, status_code, headers = api_instance.reply_to_phone_number_reviewer_with_http_info(id, reply_to_phone_number_reviewer_request)
1191
+ p status_code # => 2xx
1192
+ p headers # => { ... }
1193
+ p data # => <ReplyToPhoneNumberReviewer200Response>
1194
+ rescue Zernio::ApiError => e
1195
+ puts "Error when calling PhoneNumbersApi->reply_to_phone_number_reviewer_with_http_info: #{e}"
1196
+ end
1197
+ ```
1198
+
1199
+ ### Parameters
1200
+
1201
+ | Name | Type | Description | Notes |
1202
+ | ---- | ---- | ----------- | ----- |
1203
+ | **id** | **String** | | |
1204
+ | **reply_to_phone_number_reviewer_request** | [**ReplyToPhoneNumberReviewerRequest**](ReplyToPhoneNumberReviewerRequest.md) | | |
1205
+
1206
+ ### Return type
1207
+
1208
+ [**ReplyToPhoneNumberReviewer200Response**](ReplyToPhoneNumberReviewer200Response.md)
1209
+
1210
+ ### Authorization
1211
+
1212
+ [bearerAuth](../README.md#bearerAuth)
1213
+
1214
+ ### HTTP request headers
1215
+
1216
+ - **Content-Type**: application/json
1217
+ - **Accept**: application/json
1218
+
1219
+
1147
1220
  ## review_phone_number_kyc_packet
1148
1221
 
1149
1222
  > <ReviewPhoneNumberKycPacket200Response> review_phone_number_kyc_packet(review_phone_number_kyc_packet_request)
@@ -1577,3 +1650,72 @@ end
1577
1650
  - **Content-Type**: application/json
1578
1651
  - **Accept**: application/json
1579
1652
 
1653
+
1654
+ ## view_phone_number_kyc_document
1655
+
1656
+ > File view_phone_number_kyc_document(document_id)
1657
+
1658
+ View a KYC document on file
1659
+
1660
+ 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`.
1661
+
1662
+ ### Examples
1663
+
1664
+ ```ruby
1665
+ require 'time'
1666
+ require 'zernio-sdk'
1667
+ # setup authorization
1668
+ Zernio.configure do |config|
1669
+ # Configure Bearer authorization (JWT): bearerAuth
1670
+ config.access_token = 'YOUR_BEARER_TOKEN'
1671
+ end
1672
+
1673
+ api_instance = Zernio::PhoneNumbersApi.new
1674
+ document_id = 'document_id_example' # String | The Telnyx document id (from `reusable.options[].details[].documentId`).
1675
+
1676
+ begin
1677
+ # View a KYC document on file
1678
+ result = api_instance.view_phone_number_kyc_document(document_id)
1679
+ p result
1680
+ rescue Zernio::ApiError => e
1681
+ puts "Error when calling PhoneNumbersApi->view_phone_number_kyc_document: #{e}"
1682
+ end
1683
+ ```
1684
+
1685
+ #### Using the view_phone_number_kyc_document_with_http_info variant
1686
+
1687
+ This returns an Array which contains the response data, status code and headers.
1688
+
1689
+ > <Array(File, Integer, Hash)> view_phone_number_kyc_document_with_http_info(document_id)
1690
+
1691
+ ```ruby
1692
+ begin
1693
+ # View a KYC document on file
1694
+ data, status_code, headers = api_instance.view_phone_number_kyc_document_with_http_info(document_id)
1695
+ p status_code # => 2xx
1696
+ p headers # => { ... }
1697
+ p data # => File
1698
+ rescue Zernio::ApiError => e
1699
+ puts "Error when calling PhoneNumbersApi->view_phone_number_kyc_document_with_http_info: #{e}"
1700
+ end
1701
+ ```
1702
+
1703
+ ### Parameters
1704
+
1705
+ | Name | Type | Description | Notes |
1706
+ | ---- | ---- | ----------- | ----- |
1707
+ | **document_id** | **String** | The Telnyx document id (from &#x60;reusable.options[].details[].documentId&#x60;). | |
1708
+
1709
+ ### Return type
1710
+
1711
+ **File**
1712
+
1713
+ ### Authorization
1714
+
1715
+ [bearerAuth](../README.md#bearerAuth)
1716
+
1717
+ ### HTTP request headers
1718
+
1719
+ - **Content-Type**: Not defined
1720
+ - **Accept**: application/pdf, application/json
1721
+
@@ -0,0 +1,20 @@
1
+ # Zernio::ReplyToPhoneNumberReviewer200Response
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **posted** | **Boolean** | | [optional] |
8
+ | **attachments** | **Integer** | Number of attachments uploaded. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::ReplyToPhoneNumberReviewer200Response.new(
16
+ posted: null,
17
+ attachments: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # Zernio::ReplyToPhoneNumberReviewerRequest
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **text** | **String** | The reply message to the reviewer. | [optional] |
8
+ | **attachments** | [**Array&lt;ReplyToPhoneNumberReviewerRequestAttachmentsInner&gt;**](ReplyToPhoneNumberReviewerRequestAttachmentsInner.md) | Files (PDF/JPG/PNG/WEBP, max 10 MB each) whose links are added to the reply. | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::ReplyToPhoneNumberReviewerRequest.new(
16
+ text: null,
17
+ attachments: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # Zernio::ReplyToPhoneNumberReviewerRequestAttachmentsInner
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **filename** | **String** | | |
8
+ | **base64** | **String** | Base64-encoded file bytes. | |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'zernio-sdk'
14
+
15
+ instance = Zernio::ReplyToPhoneNumberReviewerRequestAttachmentsInner.new(
16
+ filename: null,
17
+ base64: null
18
+ )
19
+ ```
20
+
@@ -1082,6 +1082,80 @@ module Zernio
1082
1082
  return data, status_code, headers
1083
1083
  end
1084
1084
 
1085
+ # Reply to the regulatory reviewer
1086
+ # Post a free-text reply (with optional file attachments) to the reviewer on a number awaiting remediation — for asks the structured form can't express (e.g. \"is this personal or business?\"). Attachments are stored by us and their links are added to the reviewer's comment thread (the carrier's number order takes no loose files). A reply to a comment-style ask moves the number back to \"in review\"; a reply on a formal decline is supplementary and you must still resubmit the fix. Requires text or at least one attachment.
1087
+ # @param id [String]
1088
+ # @param reply_to_phone_number_reviewer_request [ReplyToPhoneNumberReviewerRequest]
1089
+ # @param [Hash] opts the optional parameters
1090
+ # @return [ReplyToPhoneNumberReviewer200Response]
1091
+ def reply_to_phone_number_reviewer(id, reply_to_phone_number_reviewer_request, opts = {})
1092
+ data, _status_code, _headers = reply_to_phone_number_reviewer_with_http_info(id, reply_to_phone_number_reviewer_request, opts)
1093
+ data
1094
+ end
1095
+
1096
+ # Reply to the regulatory reviewer
1097
+ # Post a free-text reply (with optional file attachments) to the reviewer on a number awaiting remediation — for asks the structured form can&#39;t express (e.g. \&quot;is this personal or business?\&quot;). Attachments are stored by us and their links are added to the reviewer&#39;s comment thread (the carrier&#39;s number order takes no loose files). A reply to a comment-style ask moves the number back to \&quot;in review\&quot;; a reply on a formal decline is supplementary and you must still resubmit the fix. Requires text or at least one attachment.
1098
+ # @param id [String]
1099
+ # @param reply_to_phone_number_reviewer_request [ReplyToPhoneNumberReviewerRequest]
1100
+ # @param [Hash] opts the optional parameters
1101
+ # @return [Array<(ReplyToPhoneNumberReviewer200Response, Integer, Hash)>] ReplyToPhoneNumberReviewer200Response data, response status code and response headers
1102
+ def reply_to_phone_number_reviewer_with_http_info(id, reply_to_phone_number_reviewer_request, opts = {})
1103
+ if @api_client.config.debugging
1104
+ @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.reply_to_phone_number_reviewer ...'
1105
+ end
1106
+ # verify the required parameter 'id' is set
1107
+ if @api_client.config.client_side_validation && id.nil?
1108
+ fail ArgumentError, "Missing the required parameter 'id' when calling PhoneNumbersApi.reply_to_phone_number_reviewer"
1109
+ end
1110
+ # verify the required parameter 'reply_to_phone_number_reviewer_request' is set
1111
+ if @api_client.config.client_side_validation && reply_to_phone_number_reviewer_request.nil?
1112
+ fail ArgumentError, "Missing the required parameter 'reply_to_phone_number_reviewer_request' when calling PhoneNumbersApi.reply_to_phone_number_reviewer"
1113
+ end
1114
+ # resource path
1115
+ local_var_path = '/v1/phone-numbers/{id}/remediate/reply'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1116
+
1117
+ # query parameters
1118
+ query_params = opts[:query_params] || {}
1119
+
1120
+ # header parameters
1121
+ header_params = opts[:header_params] || {}
1122
+ # HTTP header 'Accept' (if needed)
1123
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1124
+ # HTTP header 'Content-Type'
1125
+ content_type = @api_client.select_header_content_type(['application/json'])
1126
+ if !content_type.nil?
1127
+ header_params['Content-Type'] = content_type
1128
+ end
1129
+
1130
+ # form parameters
1131
+ form_params = opts[:form_params] || {}
1132
+
1133
+ # http body (model)
1134
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(reply_to_phone_number_reviewer_request)
1135
+
1136
+ # return_type
1137
+ return_type = opts[:debug_return_type] || 'ReplyToPhoneNumberReviewer200Response'
1138
+
1139
+ # auth_names
1140
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1141
+
1142
+ new_options = opts.merge(
1143
+ :operation => :"PhoneNumbersApi.reply_to_phone_number_reviewer",
1144
+ :header_params => header_params,
1145
+ :query_params => query_params,
1146
+ :form_params => form_params,
1147
+ :body => post_body,
1148
+ :auth_names => auth_names,
1149
+ :return_type => return_type
1150
+ )
1151
+
1152
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1153
+ if @api_client.config.debugging
1154
+ @api_client.config.logger.debug "API called: PhoneNumbersApi#reply_to_phone_number_reviewer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1155
+ end
1156
+ return data, status_code, headers
1157
+ end
1158
+
1085
1159
  # Pre-review a KYC packet
1086
1160
  # Advisory dry-run of a regulated-KYC packet before submitting: reviews the exact documents the regulator will see (referenced by the ids from POST /v1/phone-numbers/kyc/upload-document) against the declared values and address, and returns plain-language advisories for likely decline reasons (wrong document type, mismatched address, one-sided ID scans). Non-blocking: advisories are warnings, submitting anyway is always allowed, and any review failure degrades to an empty list.
1087
1161
  # @param review_phone_number_kyc_packet_request [ReviewPhoneNumberKycPacketRequest]
@@ -1514,5 +1588,68 @@ module Zernio
1514
1588
  end
1515
1589
  return data, status_code, headers
1516
1590
  end
1591
+
1592
+ # View a KYC document on file
1593
+ # 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`.
1594
+ # @param document_id [String] The Telnyx document id (from &#x60;reusable.options[].details[].documentId&#x60;).
1595
+ # @param [Hash] opts the optional parameters
1596
+ # @return [File]
1597
+ def view_phone_number_kyc_document(document_id, opts = {})
1598
+ data, _status_code, _headers = view_phone_number_kyc_document_with_http_info(document_id, opts)
1599
+ data
1600
+ end
1601
+
1602
+ # View a KYC document on file
1603
+ # Stream a document backing a reusable verification (the &#x60;documentId&#x60; values from GET /v1/phone-numbers/kyc &#x60;reusable.options[].details[]&#x60;), so the account holder can see what&#39;s on file before reusing it. Returned inline as &#x60;application/pdf&#x60; (uploads are normalized to PDF). Auth-scoped: a document is viewable only when its id is referenced by one of the caller&#39;s own numbers — otherwise &#x60;404&#x60;.
1604
+ # @param document_id [String] The Telnyx document id (from &#x60;reusable.options[].details[].documentId&#x60;).
1605
+ # @param [Hash] opts the optional parameters
1606
+ # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
1607
+ def view_phone_number_kyc_document_with_http_info(document_id, opts = {})
1608
+ if @api_client.config.debugging
1609
+ @api_client.config.logger.debug 'Calling API: PhoneNumbersApi.view_phone_number_kyc_document ...'
1610
+ end
1611
+ # verify the required parameter 'document_id' is set
1612
+ if @api_client.config.client_side_validation && document_id.nil?
1613
+ fail ArgumentError, "Missing the required parameter 'document_id' when calling PhoneNumbersApi.view_phone_number_kyc_document"
1614
+ end
1615
+ # resource path
1616
+ local_var_path = '/v1/phone-numbers/kyc/document/{documentId}'.sub('{' + 'documentId' + '}', CGI.escape(document_id.to_s))
1617
+
1618
+ # query parameters
1619
+ query_params = opts[:query_params] || {}
1620
+
1621
+ # header parameters
1622
+ header_params = opts[:header_params] || {}
1623
+ # HTTP header 'Accept' (if needed)
1624
+ header_params['Accept'] = @api_client.select_header_accept(['application/pdf', 'application/json']) unless header_params['Accept']
1625
+
1626
+ # form parameters
1627
+ form_params = opts[:form_params] || {}
1628
+
1629
+ # http body (model)
1630
+ post_body = opts[:debug_body]
1631
+
1632
+ # return_type
1633
+ return_type = opts[:debug_return_type] || 'File'
1634
+
1635
+ # auth_names
1636
+ auth_names = opts[:debug_auth_names] || ['bearerAuth']
1637
+
1638
+ new_options = opts.merge(
1639
+ :operation => :"PhoneNumbersApi.view_phone_number_kyc_document",
1640
+ :header_params => header_params,
1641
+ :query_params => query_params,
1642
+ :form_params => form_params,
1643
+ :body => post_body,
1644
+ :auth_names => auth_names,
1645
+ :return_type => return_type
1646
+ )
1647
+
1648
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1649
+ if @api_client.config.debugging
1650
+ @api_client.config.logger.debug "API called: PhoneNumbersApi#view_phone_number_kyc_document\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1651
+ end
1652
+ return data, status_code, headers
1653
+ end
1517
1654
  end
1518
1655
  end
@@ -52,7 +52,7 @@ module Zernio
52
52
  :'id' => :'String',
53
53
  :'from_phone_number' => :'String',
54
54
  :'instant' => :'Boolean',
55
- :'details' => :'Array<GetPhoneNumberKycForm200ResponseReusableDetailsInner>'
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