zernio-sdk 0.0.556 → 0.0.558
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 +4 -0
- data/docs/CreateStandaloneAd200Response.md +1 -1
- data/docs/PhoneNumbersApi.md +72 -0
- data/docs/ReplyToPhoneNumberReviewer200Response.md +20 -0
- data/docs/ReplyToPhoneNumberReviewerRequest.md +20 -0
- data/docs/ReplyToPhoneNumberReviewerRequestAttachmentsInner.md +20 -0
- data/lib/zernio-sdk/api/phone_numbers_api.rb +74 -0
- data/lib/zernio-sdk/models/create_standalone_ad200_response.rb +1 -34
- data/lib/zernio-sdk/models/reply_to_phone_number_reviewer200_response.rb +157 -0
- data/lib/zernio-sdk/models/reply_to_phone_number_reviewer_request.rb +198 -0
- data/lib/zernio-sdk/models/reply_to_phone_number_reviewer_request_attachments_inner.rb +191 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +3 -0
- data/openapi.yaml +53 -1
- data/spec/api/phone_numbers_api_spec.rb +13 -0
- data/spec/models/create_standalone_ad200_response_spec.rb +0 -4
- data/spec/models/reply_to_phone_number_reviewer200_response_spec.rb +42 -0
- data/spec/models/reply_to_phone_number_reviewer_request_attachments_inner_spec.rb +42 -0
- data/spec/models/reply_to_phone_number_reviewer_request_spec.rb +42 -0
- metadata +13 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 95b819606f8aa6f719429e45eb155a7f80139d338d97666f789560d210f691b0
|
|
4
|
+
data.tar.gz: ef93873a14de4cfeaf1ef26cc3ed9003a8278ee130f1a00ac85d931e5b288759
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4d39a820634b7047a18a835ce192297eeb7843b00a0f65c2004d396f183a7cecbd89e6162c6303cd7dc077ab69d3d93b688816d0941dd4305fdab42ed54404b1
|
|
7
|
+
data.tar.gz: 31f9620161b4a8c22797586445fc6c6c765340ac49c5585058b9c43adf8953a854382e0bdaf88c0c53d093c2e856ab2b19cc5afa48e80e2e2dc6d98251ebc5d4
|
data/README.md
CHANGED
|
@@ -374,6 +374,7 @@ 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
|
|
@@ -1592,6 +1593,9 @@ Class | Method | HTTP request | Description
|
|
|
1592
1593
|
- [Zernio::ReplyToInboxReviewRequest](docs/ReplyToInboxReviewRequest.md)
|
|
1593
1594
|
- [Zernio::ReplyToMention200Response](docs/ReplyToMention200Response.md)
|
|
1594
1595
|
- [Zernio::ReplyToMentionRequest](docs/ReplyToMentionRequest.md)
|
|
1596
|
+
- [Zernio::ReplyToPhoneNumberReviewer200Response](docs/ReplyToPhoneNumberReviewer200Response.md)
|
|
1597
|
+
- [Zernio::ReplyToPhoneNumberReviewerRequest](docs/ReplyToPhoneNumberReviewerRequest.md)
|
|
1598
|
+
- [Zernio::ReplyToPhoneNumberReviewerRequestAttachmentsInner](docs/ReplyToPhoneNumberReviewerRequestAttachmentsInner.md)
|
|
1595
1599
|
- [Zernio::RequestSmsSenderIdLimitIncrease200Response](docs/RequestSmsSenderIdLimitIncrease200Response.md)
|
|
1596
1600
|
- [Zernio::RequestSmsSenderIdLimitIncreaseRequest](docs/RequestSmsSenderIdLimitIncreaseRequest.md)
|
|
1597
1601
|
- [Zernio::ResendSmsRegistrationOtp200Response](docs/ResendSmsRegistrationOtp200Response.md)
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **validate_only** | **Boolean** |
|
|
7
|
+
| **validate_only** | **Boolean** | Always true in a validate-only response. | [optional] |
|
|
8
8
|
| **results** | [**Array<CreateStandaloneAd200ResponseResultsInner>**](CreateStandaloneAd200ResponseResultsInner.md) | | [optional] |
|
|
9
9
|
| **message** | **String** | | [optional] |
|
|
10
10
|
|
data/docs/PhoneNumbersApi.md
CHANGED
|
@@ -20,6 +20,7 @@ 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 |
|
|
@@ -1145,6 +1146,77 @@ end
|
|
|
1145
1146
|
- **Accept**: application/json
|
|
1146
1147
|
|
|
1147
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
|
+
|
|
1148
1220
|
## review_phone_number_kyc_packet
|
|
1149
1221
|
|
|
1150
1222
|
> <ReviewPhoneNumberKycPacket200Response> review_phone_number_kyc_packet(review_phone_number_kyc_packet_request)
|
|
@@ -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<ReplyToPhoneNumberReviewerRequestAttachmentsInner>**](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'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.
|
|
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]
|
|
@@ -15,34 +15,13 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
17
|
class CreateStandaloneAd200Response < ApiModelBase
|
|
18
|
+
# Always true in a validate-only response.
|
|
18
19
|
attr_accessor :validate_only
|
|
19
20
|
|
|
20
21
|
attr_accessor :results
|
|
21
22
|
|
|
22
23
|
attr_accessor :message
|
|
23
24
|
|
|
24
|
-
class EnumAttributeValidator
|
|
25
|
-
attr_reader :datatype
|
|
26
|
-
attr_reader :allowable_values
|
|
27
|
-
|
|
28
|
-
def initialize(datatype, allowable_values)
|
|
29
|
-
@allowable_values = allowable_values.map do |value|
|
|
30
|
-
case datatype.to_s
|
|
31
|
-
when /Integer/i
|
|
32
|
-
value.to_i
|
|
33
|
-
when /Float/i
|
|
34
|
-
value.to_f
|
|
35
|
-
else
|
|
36
|
-
value
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def valid?(value)
|
|
42
|
-
!value || allowable_values.include?(value)
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
|
|
46
25
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
47
26
|
def self.attribute_map
|
|
48
27
|
{
|
|
@@ -120,21 +99,9 @@ module Zernio
|
|
|
120
99
|
# @return true if the model is valid
|
|
121
100
|
def valid?
|
|
122
101
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
123
|
-
validate_only_validator = EnumAttributeValidator.new('Boolean', ["true"])
|
|
124
|
-
return false unless validate_only_validator.valid?(@validate_only)
|
|
125
102
|
true
|
|
126
103
|
end
|
|
127
104
|
|
|
128
|
-
# Custom attribute writer method checking allowed values (enum).
|
|
129
|
-
# @param [Object] validate_only Object to be assigned
|
|
130
|
-
def validate_only=(validate_only)
|
|
131
|
-
validator = EnumAttributeValidator.new('Boolean', ["true"])
|
|
132
|
-
unless validator.valid?(validate_only)
|
|
133
|
-
fail ArgumentError, "invalid value for \"validate_only\", must be one of #{validator.allowable_values}."
|
|
134
|
-
end
|
|
135
|
-
@validate_only = validate_only
|
|
136
|
-
end
|
|
137
|
-
|
|
138
105
|
# Checks equality by comparing each attribute.
|
|
139
106
|
# @param [Object] Object to be compared
|
|
140
107
|
def ==(o)
|
|
@@ -0,0 +1,157 @@
|
|
|
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 ReplyToPhoneNumberReviewer200Response < ApiModelBase
|
|
18
|
+
attr_accessor :posted
|
|
19
|
+
|
|
20
|
+
# Number of attachments uploaded.
|
|
21
|
+
attr_accessor :attachments
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'posted' => :'posted',
|
|
27
|
+
:'attachments' => :'attachments'
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Returns attribute mapping this model knows about
|
|
32
|
+
def self.acceptable_attribute_map
|
|
33
|
+
attribute_map
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
acceptable_attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'posted' => :'Boolean',
|
|
45
|
+
:'attachments' => :'Integer'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# List of attributes with nullable: true
|
|
50
|
+
def self.openapi_nullable
|
|
51
|
+
Set.new([
|
|
52
|
+
])
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Initializes the object
|
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
57
|
+
def initialize(attributes = {})
|
|
58
|
+
if (!attributes.is_a?(Hash))
|
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ReplyToPhoneNumberReviewer200Response` initialize method"
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
63
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
65
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ReplyToPhoneNumberReviewer200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
67
|
+
end
|
|
68
|
+
h[k.to_sym] = v
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if attributes.key?(:'posted')
|
|
72
|
+
self.posted = attributes[:'posted']
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'attachments')
|
|
76
|
+
self.attachments = attributes[:'attachments']
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
81
|
+
# @return Array for valid properties with the reasons
|
|
82
|
+
def list_invalid_properties
|
|
83
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
84
|
+
invalid_properties = Array.new
|
|
85
|
+
invalid_properties
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Check to see if the all the properties in the model are valid
|
|
89
|
+
# @return true if the model is valid
|
|
90
|
+
def valid?
|
|
91
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
92
|
+
true
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
# Checks equality by comparing each attribute.
|
|
96
|
+
# @param [Object] Object to be compared
|
|
97
|
+
def ==(o)
|
|
98
|
+
return true if self.equal?(o)
|
|
99
|
+
self.class == o.class &&
|
|
100
|
+
posted == o.posted &&
|
|
101
|
+
attachments == o.attachments
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# @see the `==` method
|
|
105
|
+
# @param [Object] Object to be compared
|
|
106
|
+
def eql?(o)
|
|
107
|
+
self == o
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# Calculates hash code according to all attributes.
|
|
111
|
+
# @return [Integer] Hash code
|
|
112
|
+
def hash
|
|
113
|
+
[posted, attachments].hash
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Builds the object from hash
|
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
118
|
+
# @return [Object] Returns the model itself
|
|
119
|
+
def self.build_from_hash(attributes)
|
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
|
121
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
122
|
+
transformed_hash = {}
|
|
123
|
+
openapi_types.each_pair do |key, type|
|
|
124
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
125
|
+
transformed_hash["#{key}"] = nil
|
|
126
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
127
|
+
# check to ensure the input is an array given that the attribute
|
|
128
|
+
# is documented as an array but the input is not
|
|
129
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
130
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
131
|
+
end
|
|
132
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
133
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
new(transformed_hash)
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Returns the object in the form of hash
|
|
140
|
+
# @return [Hash] Returns the object in the form of hash
|
|
141
|
+
def to_hash
|
|
142
|
+
hash = {}
|
|
143
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
144
|
+
value = self.send(attr)
|
|
145
|
+
if value.nil?
|
|
146
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
147
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
hash[param] = _to_hash(value)
|
|
151
|
+
end
|
|
152
|
+
hash
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
end
|
|
@@ -0,0 +1,198 @@
|
|
|
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 ReplyToPhoneNumberReviewerRequest < ApiModelBase
|
|
18
|
+
# The reply message to the reviewer.
|
|
19
|
+
attr_accessor :text
|
|
20
|
+
|
|
21
|
+
# Files (PDF/JPG/PNG/WEBP, max 10 MB each) whose links are added to the reply.
|
|
22
|
+
attr_accessor :attachments
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'text' => :'text',
|
|
28
|
+
:'attachments' => :'attachments'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns attribute mapping this model knows about
|
|
33
|
+
def self.acceptable_attribute_map
|
|
34
|
+
attribute_map
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Returns all the JSON keys this model knows about
|
|
38
|
+
def self.acceptable_attributes
|
|
39
|
+
acceptable_attribute_map.values
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Attribute type mapping.
|
|
43
|
+
def self.openapi_types
|
|
44
|
+
{
|
|
45
|
+
:'text' => :'String',
|
|
46
|
+
:'attachments' => :'Array<ReplyToPhoneNumberReviewerRequestAttachmentsInner>'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ReplyToPhoneNumberReviewerRequest` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
65
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
66
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
67
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ReplyToPhoneNumberReviewerRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
68
|
+
end
|
|
69
|
+
h[k.to_sym] = v
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if attributes.key?(:'text')
|
|
73
|
+
self.text = attributes[:'text']
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'attachments')
|
|
77
|
+
if (value = attributes[:'attachments']).is_a?(Array)
|
|
78
|
+
self.attachments = value
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
84
|
+
# @return Array for valid properties with the reasons
|
|
85
|
+
def list_invalid_properties
|
|
86
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
87
|
+
invalid_properties = Array.new
|
|
88
|
+
if !@text.nil? && @text.to_s.length > 2000
|
|
89
|
+
invalid_properties.push('invalid value for "text", the character length must be smaller than or equal to 2000.')
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if !@attachments.nil? && @attachments.length > 5
|
|
93
|
+
invalid_properties.push('invalid value for "attachments", number of items must be less than or equal to 5.')
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
invalid_properties
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Check to see if the all the properties in the model are valid
|
|
100
|
+
# @return true if the model is valid
|
|
101
|
+
def valid?
|
|
102
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
103
|
+
return false if !@text.nil? && @text.to_s.length > 2000
|
|
104
|
+
return false if !@attachments.nil? && @attachments.length > 5
|
|
105
|
+
true
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Custom attribute writer method with validation
|
|
109
|
+
# @param [Object] text Value to be assigned
|
|
110
|
+
def text=(text)
|
|
111
|
+
if text.nil?
|
|
112
|
+
fail ArgumentError, 'text cannot be nil'
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
if text.to_s.length > 2000
|
|
116
|
+
fail ArgumentError, 'invalid value for "text", the character length must be smaller than or equal to 2000.'
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
@text = text
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
# Custom attribute writer method with validation
|
|
123
|
+
# @param [Object] attachments Value to be assigned
|
|
124
|
+
def attachments=(attachments)
|
|
125
|
+
if attachments.nil?
|
|
126
|
+
fail ArgumentError, 'attachments cannot be nil'
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attachments.length > 5
|
|
130
|
+
fail ArgumentError, 'invalid value for "attachments", number of items must be less than or equal to 5.'
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
@attachments = attachments
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Checks equality by comparing each attribute.
|
|
137
|
+
# @param [Object] Object to be compared
|
|
138
|
+
def ==(o)
|
|
139
|
+
return true if self.equal?(o)
|
|
140
|
+
self.class == o.class &&
|
|
141
|
+
text == o.text &&
|
|
142
|
+
attachments == o.attachments
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# @see the `==` method
|
|
146
|
+
# @param [Object] Object to be compared
|
|
147
|
+
def eql?(o)
|
|
148
|
+
self == o
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Calculates hash code according to all attributes.
|
|
152
|
+
# @return [Integer] Hash code
|
|
153
|
+
def hash
|
|
154
|
+
[text, attachments].hash
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
# Builds the object from hash
|
|
158
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
159
|
+
# @return [Object] Returns the model itself
|
|
160
|
+
def self.build_from_hash(attributes)
|
|
161
|
+
return nil unless attributes.is_a?(Hash)
|
|
162
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
163
|
+
transformed_hash = {}
|
|
164
|
+
openapi_types.each_pair do |key, type|
|
|
165
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
166
|
+
transformed_hash["#{key}"] = nil
|
|
167
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
168
|
+
# check to ensure the input is an array given that the attribute
|
|
169
|
+
# is documented as an array but the input is not
|
|
170
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
171
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
172
|
+
end
|
|
173
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
174
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
new(transformed_hash)
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Returns the object in the form of hash
|
|
181
|
+
# @return [Hash] Returns the object in the form of hash
|
|
182
|
+
def to_hash
|
|
183
|
+
hash = {}
|
|
184
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
185
|
+
value = self.send(attr)
|
|
186
|
+
if value.nil?
|
|
187
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
188
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
hash[param] = _to_hash(value)
|
|
192
|
+
end
|
|
193
|
+
hash
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
end
|
|
@@ -0,0 +1,191 @@
|
|
|
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 ReplyToPhoneNumberReviewerRequestAttachmentsInner < ApiModelBase
|
|
18
|
+
attr_accessor :filename
|
|
19
|
+
|
|
20
|
+
# Base64-encoded file bytes.
|
|
21
|
+
attr_accessor :base64
|
|
22
|
+
|
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
|
+
def self.attribute_map
|
|
25
|
+
{
|
|
26
|
+
:'filename' => :'filename',
|
|
27
|
+
:'base64' => :'base64'
|
|
28
|
+
}
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Returns attribute mapping this model knows about
|
|
32
|
+
def self.acceptable_attribute_map
|
|
33
|
+
attribute_map
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
acceptable_attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'filename' => :'String',
|
|
45
|
+
:'base64' => :'String'
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# List of attributes with nullable: true
|
|
50
|
+
def self.openapi_nullable
|
|
51
|
+
Set.new([
|
|
52
|
+
])
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Initializes the object
|
|
56
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
57
|
+
def initialize(attributes = {})
|
|
58
|
+
if (!attributes.is_a?(Hash))
|
|
59
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ReplyToPhoneNumberReviewerRequestAttachmentsInner` initialize method"
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
63
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
65
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ReplyToPhoneNumberReviewerRequestAttachmentsInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
67
|
+
end
|
|
68
|
+
h[k.to_sym] = v
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if attributes.key?(:'filename')
|
|
72
|
+
self.filename = attributes[:'filename']
|
|
73
|
+
else
|
|
74
|
+
self.filename = nil
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
if attributes.key?(:'base64')
|
|
78
|
+
self.base64 = attributes[:'base64']
|
|
79
|
+
else
|
|
80
|
+
self.base64 = nil
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
85
|
+
# @return Array for valid properties with the reasons
|
|
86
|
+
def list_invalid_properties
|
|
87
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
88
|
+
invalid_properties = Array.new
|
|
89
|
+
if @filename.nil?
|
|
90
|
+
invalid_properties.push('invalid value for "filename", filename cannot be nil.')
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
if @base64.nil?
|
|
94
|
+
invalid_properties.push('invalid value for "base64", base64 cannot be nil.')
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
invalid_properties
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Check to see if the all the properties in the model are valid
|
|
101
|
+
# @return true if the model is valid
|
|
102
|
+
def valid?
|
|
103
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
104
|
+
return false if @filename.nil?
|
|
105
|
+
return false if @base64.nil?
|
|
106
|
+
true
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Custom attribute writer method with validation
|
|
110
|
+
# @param [Object] filename Value to be assigned
|
|
111
|
+
def filename=(filename)
|
|
112
|
+
if filename.nil?
|
|
113
|
+
fail ArgumentError, 'filename cannot be nil'
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
@filename = filename
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Custom attribute writer method with validation
|
|
120
|
+
# @param [Object] base64 Value to be assigned
|
|
121
|
+
def base64=(base64)
|
|
122
|
+
if base64.nil?
|
|
123
|
+
fail ArgumentError, 'base64 cannot be nil'
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
@base64 = base64
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Checks equality by comparing each attribute.
|
|
130
|
+
# @param [Object] Object to be compared
|
|
131
|
+
def ==(o)
|
|
132
|
+
return true if self.equal?(o)
|
|
133
|
+
self.class == o.class &&
|
|
134
|
+
filename == o.filename &&
|
|
135
|
+
base64 == o.base64
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# @see the `==` method
|
|
139
|
+
# @param [Object] Object to be compared
|
|
140
|
+
def eql?(o)
|
|
141
|
+
self == o
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Calculates hash code according to all attributes.
|
|
145
|
+
# @return [Integer] Hash code
|
|
146
|
+
def hash
|
|
147
|
+
[filename, base64].hash
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Builds the object from hash
|
|
151
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
152
|
+
# @return [Object] Returns the model itself
|
|
153
|
+
def self.build_from_hash(attributes)
|
|
154
|
+
return nil unless attributes.is_a?(Hash)
|
|
155
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
156
|
+
transformed_hash = {}
|
|
157
|
+
openapi_types.each_pair do |key, type|
|
|
158
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
159
|
+
transformed_hash["#{key}"] = nil
|
|
160
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
161
|
+
# check to ensure the input is an array given that the attribute
|
|
162
|
+
# is documented as an array but the input is not
|
|
163
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
164
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
165
|
+
end
|
|
166
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
167
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
168
|
+
end
|
|
169
|
+
end
|
|
170
|
+
new(transformed_hash)
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Returns the object in the form of hash
|
|
174
|
+
# @return [Hash] Returns the object in the form of hash
|
|
175
|
+
def to_hash
|
|
176
|
+
hash = {}
|
|
177
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
178
|
+
value = self.send(attr)
|
|
179
|
+
if value.nil?
|
|
180
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
181
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
hash[param] = _to_hash(value)
|
|
185
|
+
end
|
|
186
|
+
hash
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
end
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -1023,6 +1023,9 @@ require 'zernio-sdk/models/reply_to_inbox_review200_response'
|
|
|
1023
1023
|
require 'zernio-sdk/models/reply_to_inbox_review_request'
|
|
1024
1024
|
require 'zernio-sdk/models/reply_to_mention200_response'
|
|
1025
1025
|
require 'zernio-sdk/models/reply_to_mention_request'
|
|
1026
|
+
require 'zernio-sdk/models/reply_to_phone_number_reviewer200_response'
|
|
1027
|
+
require 'zernio-sdk/models/reply_to_phone_number_reviewer_request'
|
|
1028
|
+
require 'zernio-sdk/models/reply_to_phone_number_reviewer_request_attachments_inner'
|
|
1026
1029
|
require 'zernio-sdk/models/request_sms_sender_id_limit_increase200_response'
|
|
1027
1030
|
require 'zernio-sdk/models/request_sms_sender_id_limit_increase_request'
|
|
1028
1031
|
require 'zernio-sdk/models/resend_sms_registration_otp200_response'
|
data/openapi.yaml
CHANGED
|
@@ -29264,6 +29264,58 @@ paths:
|
|
|
29264
29264
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
29265
29265
|
'404': { description: Number not found }
|
|
29266
29266
|
|
|
29267
|
+
/v1/phone-numbers/{id}/remediate/reply:
|
|
29268
|
+
post:
|
|
29269
|
+
operationId: replyToPhoneNumberReviewer
|
|
29270
|
+
tags: [Phone Numbers]
|
|
29271
|
+
summary: Reply to the regulatory reviewer
|
|
29272
|
+
description: |
|
|
29273
|
+
Post a free-text reply (with optional file attachments) to the reviewer
|
|
29274
|
+
on a number awaiting remediation — for asks the structured form can't
|
|
29275
|
+
express (e.g. "is this personal or business?"). Attachments are stored by
|
|
29276
|
+
us and their links are added to the reviewer's comment thread (the
|
|
29277
|
+
carrier's number order takes no loose files). A reply to a comment-style
|
|
29278
|
+
ask moves the number back to "in review"; a reply on a formal decline is
|
|
29279
|
+
supplementary and you must still resubmit the fix. Requires text or at
|
|
29280
|
+
least one attachment.
|
|
29281
|
+
parameters:
|
|
29282
|
+
- name: id
|
|
29283
|
+
in: path
|
|
29284
|
+
required: true
|
|
29285
|
+
schema: { type: string }
|
|
29286
|
+
requestBody:
|
|
29287
|
+
required: true
|
|
29288
|
+
content:
|
|
29289
|
+
application/json:
|
|
29290
|
+
schema:
|
|
29291
|
+
type: object
|
|
29292
|
+
properties:
|
|
29293
|
+
text: { type: string, maxLength: 2000, description: The reply message to the reviewer. }
|
|
29294
|
+
attachments:
|
|
29295
|
+
type: array
|
|
29296
|
+
maxItems: 5
|
|
29297
|
+
description: 'Files (PDF/JPG/PNG/WEBP, max 10 MB each) whose links are added to the reply.'
|
|
29298
|
+
items:
|
|
29299
|
+
type: object
|
|
29300
|
+
required: [filename, base64]
|
|
29301
|
+
properties:
|
|
29302
|
+
filename: { type: string }
|
|
29303
|
+
base64: { type: string, description: Base64-encoded file bytes. }
|
|
29304
|
+
responses:
|
|
29305
|
+
'200':
|
|
29306
|
+
description: Reply posted.
|
|
29307
|
+
content:
|
|
29308
|
+
application/json:
|
|
29309
|
+
schema:
|
|
29310
|
+
type: object
|
|
29311
|
+
properties:
|
|
29312
|
+
posted: { type: boolean }
|
|
29313
|
+
attachments: { type: integer, description: Number of attachments uploaded. }
|
|
29314
|
+
'400': { $ref: '#/components/responses/BadRequest' }
|
|
29315
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
29316
|
+
'404': { description: Number not found }
|
|
29317
|
+
'502': { description: Couldn't deliver the reply to the reviewer; retry. }
|
|
29318
|
+
|
|
29267
29319
|
/v1/whatsapp/phone-numbers/kyc:
|
|
29268
29320
|
get:
|
|
29269
29321
|
operationId: getWhatsAppNumberKycForm
|
|
@@ -36779,7 +36831,7 @@ paths:
|
|
|
36779
36831
|
schema:
|
|
36780
36832
|
type: object
|
|
36781
36833
|
properties:
|
|
36782
|
-
validateOnly: { type: boolean,
|
|
36834
|
+
validateOnly: { type: boolean, description: 'Always true in a validate-only response.' }
|
|
36783
36835
|
results:
|
|
36784
36836
|
type: array
|
|
36785
36837
|
items:
|
|
@@ -227,6 +227,19 @@ describe 'PhoneNumbersApi' do
|
|
|
227
227
|
end
|
|
228
228
|
end
|
|
229
229
|
|
|
230
|
+
# unit tests for reply_to_phone_number_reviewer
|
|
231
|
+
# Reply to the regulatory reviewer
|
|
232
|
+
# 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.
|
|
233
|
+
# @param id
|
|
234
|
+
# @param reply_to_phone_number_reviewer_request
|
|
235
|
+
# @param [Hash] opts the optional parameters
|
|
236
|
+
# @return [ReplyToPhoneNumberReviewer200Response]
|
|
237
|
+
describe 'reply_to_phone_number_reviewer test' do
|
|
238
|
+
it 'should work' do
|
|
239
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
240
|
+
end
|
|
241
|
+
end
|
|
242
|
+
|
|
230
243
|
# unit tests for review_phone_number_kyc_packet
|
|
231
244
|
# Pre-review a KYC packet
|
|
232
245
|
# 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.
|
|
@@ -30,10 +30,6 @@ describe Zernio::CreateStandaloneAd200Response do
|
|
|
30
30
|
describe 'test attribute "validate_only"' do
|
|
31
31
|
it 'should work' do
|
|
32
32
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('Boolean', ["true"])
|
|
34
|
-
# validator.allowable_values.each do |value|
|
|
35
|
-
# expect { instance.validate_only = value }.not_to raise_error
|
|
36
|
-
# end
|
|
37
33
|
end
|
|
38
34
|
end
|
|
39
35
|
|
|
@@ -0,0 +1,42 @@
|
|
|
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::ReplyToPhoneNumberReviewer200Response
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::ReplyToPhoneNumberReviewer200Response do
|
|
21
|
+
#let(:instance) { Zernio::ReplyToPhoneNumberReviewer200Response.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of ReplyToPhoneNumberReviewer200Response' do
|
|
24
|
+
it 'should create an instance of ReplyToPhoneNumberReviewer200Response' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::ReplyToPhoneNumberReviewer200Response)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "posted"' 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 "attachments"' 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
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
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::ReplyToPhoneNumberReviewerRequestAttachmentsInner
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::ReplyToPhoneNumberReviewerRequestAttachmentsInner do
|
|
21
|
+
#let(:instance) { Zernio::ReplyToPhoneNumberReviewerRequestAttachmentsInner.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of ReplyToPhoneNumberReviewerRequestAttachmentsInner' do
|
|
24
|
+
it 'should create an instance of ReplyToPhoneNumberReviewerRequestAttachmentsInner' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::ReplyToPhoneNumberReviewerRequestAttachmentsInner)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "filename"' 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 "base64"' 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
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
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::ReplyToPhoneNumberReviewerRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe Zernio::ReplyToPhoneNumberReviewerRequest do
|
|
21
|
+
#let(:instance) { Zernio::ReplyToPhoneNumberReviewerRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of ReplyToPhoneNumberReviewerRequest' do
|
|
24
|
+
it 'should create an instance of ReplyToPhoneNumberReviewerRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(Zernio::ReplyToPhoneNumberReviewerRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "text"' 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 "attachments"' 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
|
+
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.558
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
@@ -1112,6 +1112,9 @@ files:
|
|
|
1112
1112
|
- docs/ReplyToInboxReviewRequest.md
|
|
1113
1113
|
- docs/ReplyToMention200Response.md
|
|
1114
1114
|
- docs/ReplyToMentionRequest.md
|
|
1115
|
+
- docs/ReplyToPhoneNumberReviewer200Response.md
|
|
1116
|
+
- docs/ReplyToPhoneNumberReviewerRequest.md
|
|
1117
|
+
- docs/ReplyToPhoneNumberReviewerRequestAttachmentsInner.md
|
|
1115
1118
|
- docs/RequestSmsSenderIdLimitIncrease200Response.md
|
|
1116
1119
|
- docs/RequestSmsSenderIdLimitIncreaseRequest.md
|
|
1117
1120
|
- docs/ResendSmsRegistrationOtp200Response.md
|
|
@@ -2691,6 +2694,9 @@ files:
|
|
|
2691
2694
|
- lib/zernio-sdk/models/reply_to_inbox_review_request.rb
|
|
2692
2695
|
- lib/zernio-sdk/models/reply_to_mention200_response.rb
|
|
2693
2696
|
- lib/zernio-sdk/models/reply_to_mention_request.rb
|
|
2697
|
+
- lib/zernio-sdk/models/reply_to_phone_number_reviewer200_response.rb
|
|
2698
|
+
- lib/zernio-sdk/models/reply_to_phone_number_reviewer_request.rb
|
|
2699
|
+
- lib/zernio-sdk/models/reply_to_phone_number_reviewer_request_attachments_inner.rb
|
|
2694
2700
|
- lib/zernio-sdk/models/request_sms_sender_id_limit_increase200_response.rb
|
|
2695
2701
|
- lib/zernio-sdk/models/request_sms_sender_id_limit_increase_request.rb
|
|
2696
2702
|
- lib/zernio-sdk/models/resend_sms_registration_otp200_response.rb
|
|
@@ -4246,6 +4252,9 @@ files:
|
|
|
4246
4252
|
- spec/models/reply_to_inbox_review_request_spec.rb
|
|
4247
4253
|
- spec/models/reply_to_mention200_response_spec.rb
|
|
4248
4254
|
- spec/models/reply_to_mention_request_spec.rb
|
|
4255
|
+
- spec/models/reply_to_phone_number_reviewer200_response_spec.rb
|
|
4256
|
+
- spec/models/reply_to_phone_number_reviewer_request_attachments_inner_spec.rb
|
|
4257
|
+
- spec/models/reply_to_phone_number_reviewer_request_spec.rb
|
|
4249
4258
|
- spec/models/request_sms_sender_id_limit_increase200_response_spec.rb
|
|
4250
4259
|
- spec/models/request_sms_sender_id_limit_increase_request_spec.rb
|
|
4251
4260
|
- spec/models/resend_sms_registration_otp200_response_spec.rb
|
|
@@ -5948,6 +5957,7 @@ test_files:
|
|
|
5948
5957
|
- spec/models/you_tube_daily_views_response_date_range_spec.rb
|
|
5949
5958
|
- spec/models/create_queue_slot_request_spec.rb
|
|
5950
5959
|
- spec/models/get_call200_response_spec.rb
|
|
5960
|
+
- spec/models/reply_to_phone_number_reviewer_request_attachments_inner_spec.rb
|
|
5951
5961
|
- spec/models/create_standalone_ad_request_placement_assets_rules_inner_spec.rb
|
|
5952
5962
|
- spec/models/linked_in_ads_platform_data_carousel_cards_inner_spec.rb
|
|
5953
5963
|
- spec/models/deactivate_sms_registration200_response_spec.rb
|
|
@@ -6187,6 +6197,7 @@ test_files:
|
|
|
6187
6197
|
- spec/models/send_private_reply_to_comment_request_buttons_inner_spec.rb
|
|
6188
6198
|
- spec/models/list_inbox_conversations200_response_data_inner_spec.rb
|
|
6189
6199
|
- spec/models/follower_stats_response_date_range_spec.rb
|
|
6200
|
+
- spec/models/reply_to_phone_number_reviewer200_response_spec.rb
|
|
6190
6201
|
- spec/models/update_broadcast_request_template_spec.rb
|
|
6191
6202
|
- spec/models/update_ad_account200_response_dsa_defaults_spec.rb
|
|
6192
6203
|
- spec/models/create_phone_number_port_in201_response_orders_inner_spec.rb
|
|
@@ -6244,6 +6255,7 @@ test_files:
|
|
|
6244
6255
|
- spec/models/select_pinterest_board_request_spec.rb
|
|
6245
6256
|
- spec/models/linked_in_ads_platform_data_jobs_spec.rb
|
|
6246
6257
|
- spec/models/send_inbox_message_request_interactive_action_one_of8_spec.rb
|
|
6258
|
+
- spec/models/reply_to_phone_number_reviewer_request_spec.rb
|
|
6247
6259
|
- spec/models/get_workflow_version200_response_version_spec.rb
|
|
6248
6260
|
- spec/models/webhook_payload_comment_post_spec.rb
|
|
6249
6261
|
- spec/models/block_whats_app_users200_response_spec.rb
|