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 +4 -4
- data/README.md +6 -0
- data/docs/GetPhoneNumberKycForm200ResponseReusableOptionsInner.md +1 -1
- data/docs/GetPhoneNumberKycForm200ResponseReusableOptionsInnerDetailsInner.md +22 -0
- data/docs/PhoneNumbersApi.md +142 -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 +137 -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/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 +4 -0
- data/openapi.yaml +82 -0
- data/spec/api/phone_numbers_api_spec.rb +25 -0
- data/spec/models/get_phone_number_kyc_form200_response_reusable_options_inner_details_inner_spec.rb +48 -0
- 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 +17 -1
|
@@ -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
|
@@ -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'
|
|
@@ -1022,6 +1023,9 @@ require 'zernio-sdk/models/reply_to_inbox_review200_response'
|
|
|
1022
1023
|
require 'zernio-sdk/models/reply_to_inbox_review_request'
|
|
1023
1024
|
require 'zernio-sdk/models/reply_to_mention200_response'
|
|
1024
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'
|
|
1025
1029
|
require 'zernio-sdk/models/request_sms_sender_id_limit_increase200_response'
|
|
1026
1030
|
require 'zernio-sdk/models/request_sms_sender_id_limit_increase_request'
|
|
1027
1031
|
require 'zernio-sdk/models/resend_sms_registration_otp200_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
|
|
@@ -29235,6 +29264,58 @@ paths:
|
|
|
29235
29264
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
29236
29265
|
'404': { description: Number not found }
|
|
29237
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
|
+
|
|
29238
29319
|
/v1/whatsapp/phone-numbers/kyc:
|
|
29239
29320
|
get:
|
|
29240
29321
|
operationId: getWhatsAppNumberKycForm
|
|
@@ -29305,6 +29386,7 @@ paths:
|
|
|
29305
29386
|
properties:
|
|
29306
29387
|
label: { type: string }
|
|
29307
29388
|
value: { type: string }
|
|
29389
|
+
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
29390
|
'400': { description: Country not available }
|
|
29309
29391
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
29310
29392
|
post:
|