late-sdk 0.0.726 → 0.0.727
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 +19 -0
- data/docs/AttachNumberToSipTrunk200Response.md +22 -0
- data/docs/AttachNumberToSipTrunkRequest.md +18 -0
- data/docs/CreateSipTrunk201Response.md +34 -0
- data/docs/CreateSipTrunk201ResponseTermination.md +20 -0
- data/docs/CreateSipTrunkRequest.md +24 -0
- data/docs/DetachNumberFromSipTrunk200Response.md +20 -0
- data/docs/GetPhoneNumber200ResponsePhoneNumber.md +3 -1
- data/docs/GetSipTrunk200Response.md +34 -0
- data/docs/GetSipTrunk200ResponseNumbersInner.md +20 -0
- data/docs/ListPhoneNumbers200ResponseNumbersInner.md +2 -0
- data/docs/ListSipTrunks200Response.md +20 -0
- data/docs/ListSipTrunks200ResponseTrunksInner.md +32 -0
- data/docs/ListSipTrunks200ResponseTrunksInnerTermination.md +20 -0
- data/docs/RotateSipTrunkCredentials200Response.md +20 -0
- data/docs/VoiceApi.md +485 -0
- data/lib/zernio-sdk/api/voice_api.rb +447 -0
- data/lib/zernio-sdk/models/attach_number_to_sip_trunk200_response.rb +165 -0
- data/lib/zernio-sdk/models/attach_number_to_sip_trunk_request.rb +165 -0
- data/lib/zernio-sdk/models/create_sip_trunk201_response.rb +255 -0
- data/lib/zernio-sdk/models/create_sip_trunk201_response_termination.rb +158 -0
- data/lib/zernio-sdk/models/create_sip_trunk_request.rb +283 -0
- data/lib/zernio-sdk/models/detach_number_from_sip_trunk200_response.rb +157 -0
- data/lib/zernio-sdk/models/get_phone_number200_response_phone_number.rb +15 -4
- data/lib/zernio-sdk/models/get_sip_trunk200_response.rb +256 -0
- data/lib/zernio-sdk/models/get_sip_trunk200_response_numbers_inner.rb +157 -0
- data/lib/zernio-sdk/models/list_phone_numbers200_response_numbers_inner.rb +12 -1
- data/lib/zernio-sdk/models/list_sip_trunks200_response.rb +159 -0
- data/lib/zernio-sdk/models/list_sip_trunks200_response_trunks_inner.rb +245 -0
- data/lib/zernio-sdk/models/list_sip_trunks200_response_trunks_inner_termination.rb +156 -0
- data/lib/zernio-sdk/models/rotate_sip_trunk_credentials200_response.rb +156 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +12 -0
- data/openapi.yaml +268 -0
- data/spec/api/voice_api_spec.rb +82 -0
- data/spec/models/attach_number_to_sip_trunk200_response_spec.rb +48 -0
- data/spec/models/attach_number_to_sip_trunk_request_spec.rb +36 -0
- data/spec/models/create_sip_trunk201_response_spec.rb +88 -0
- data/spec/models/create_sip_trunk201_response_termination_spec.rb +42 -0
- data/spec/models/create_sip_trunk_request_spec.rb +58 -0
- data/spec/models/detach_number_from_sip_trunk200_response_spec.rb +42 -0
- data/spec/models/get_phone_number200_response_phone_number_spec.rb +6 -0
- data/spec/models/get_sip_trunk200_response_numbers_inner_spec.rb +42 -0
- data/spec/models/get_sip_trunk200_response_spec.rb +88 -0
- data/spec/models/list_phone_numbers200_response_numbers_inner_spec.rb +6 -0
- data/spec/models/list_sip_trunks200_response_spec.rb +42 -0
- data/spec/models/list_sip_trunks200_response_trunks_inner_spec.rb +82 -0
- data/spec/models/list_sip_trunks200_response_trunks_inner_termination_spec.rb +42 -0
- data/spec/models/rotate_sip_trunk_credentials200_response_spec.rb +42 -0
- data/zernio-sdk-0.0.727.gem +0 -0
- metadata +51 -3
- data/zernio-sdk-0.0.726.gem +0 -0
|
@@ -0,0 +1,245 @@
|
|
|
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 ListSipTrunks200ResponseTrunksInner < ApiModelBase
|
|
18
|
+
attr_accessor :id
|
|
19
|
+
|
|
20
|
+
attr_accessor :label
|
|
21
|
+
|
|
22
|
+
attr_accessor :sip_host
|
|
23
|
+
|
|
24
|
+
attr_accessor :sip_port
|
|
25
|
+
|
|
26
|
+
attr_accessor :transport
|
|
27
|
+
|
|
28
|
+
attr_accessor :termination
|
|
29
|
+
|
|
30
|
+
attr_accessor :numbers_attached
|
|
31
|
+
|
|
32
|
+
attr_accessor :created_at
|
|
33
|
+
|
|
34
|
+
class EnumAttributeValidator
|
|
35
|
+
attr_reader :datatype
|
|
36
|
+
attr_reader :allowable_values
|
|
37
|
+
|
|
38
|
+
def initialize(datatype, allowable_values)
|
|
39
|
+
@allowable_values = allowable_values.map do |value|
|
|
40
|
+
case datatype.to_s
|
|
41
|
+
when /Integer/i
|
|
42
|
+
value.to_i
|
|
43
|
+
when /Float/i
|
|
44
|
+
value.to_f
|
|
45
|
+
else
|
|
46
|
+
value
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def valid?(value)
|
|
52
|
+
!value || allowable_values.include?(value)
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
57
|
+
def self.attribute_map
|
|
58
|
+
{
|
|
59
|
+
:'id' => :'id',
|
|
60
|
+
:'label' => :'label',
|
|
61
|
+
:'sip_host' => :'sipHost',
|
|
62
|
+
:'sip_port' => :'sipPort',
|
|
63
|
+
:'transport' => :'transport',
|
|
64
|
+
:'termination' => :'termination',
|
|
65
|
+
:'numbers_attached' => :'numbersAttached',
|
|
66
|
+
:'created_at' => :'createdAt'
|
|
67
|
+
}
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# Returns attribute mapping this model knows about
|
|
71
|
+
def self.acceptable_attribute_map
|
|
72
|
+
attribute_map
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Returns all the JSON keys this model knows about
|
|
76
|
+
def self.acceptable_attributes
|
|
77
|
+
acceptable_attribute_map.values
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
# Attribute type mapping.
|
|
81
|
+
def self.openapi_types
|
|
82
|
+
{
|
|
83
|
+
:'id' => :'String',
|
|
84
|
+
:'label' => :'String',
|
|
85
|
+
:'sip_host' => :'String',
|
|
86
|
+
:'sip_port' => :'Integer',
|
|
87
|
+
:'transport' => :'String',
|
|
88
|
+
:'termination' => :'ListSipTrunks200ResponseTrunksInnerTermination',
|
|
89
|
+
:'numbers_attached' => :'Integer',
|
|
90
|
+
:'created_at' => :'Time'
|
|
91
|
+
}
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# List of attributes with nullable: true
|
|
95
|
+
def self.openapi_nullable
|
|
96
|
+
Set.new([
|
|
97
|
+
:'created_at'
|
|
98
|
+
])
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Initializes the object
|
|
102
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
103
|
+
def initialize(attributes = {})
|
|
104
|
+
if (!attributes.is_a?(Hash))
|
|
105
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ListSipTrunks200ResponseTrunksInner` initialize method"
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
109
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
110
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
111
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
112
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ListSipTrunks200ResponseTrunksInner`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
113
|
+
end
|
|
114
|
+
h[k.to_sym] = v
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
if attributes.key?(:'id')
|
|
118
|
+
self.id = attributes[:'id']
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'label')
|
|
122
|
+
self.label = attributes[:'label']
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.key?(:'sip_host')
|
|
126
|
+
self.sip_host = attributes[:'sip_host']
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.key?(:'sip_port')
|
|
130
|
+
self.sip_port = attributes[:'sip_port']
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
if attributes.key?(:'transport')
|
|
134
|
+
self.transport = attributes[:'transport']
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
if attributes.key?(:'termination')
|
|
138
|
+
self.termination = attributes[:'termination']
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
if attributes.key?(:'numbers_attached')
|
|
142
|
+
self.numbers_attached = attributes[:'numbers_attached']
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
if attributes.key?(:'created_at')
|
|
146
|
+
self.created_at = attributes[:'created_at']
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
151
|
+
# @return Array for valid properties with the reasons
|
|
152
|
+
def list_invalid_properties
|
|
153
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
154
|
+
invalid_properties = Array.new
|
|
155
|
+
invalid_properties
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Check to see if the all the properties in the model are valid
|
|
159
|
+
# @return true if the model is valid
|
|
160
|
+
def valid?
|
|
161
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
162
|
+
transport_validator = EnumAttributeValidator.new('String', ["tls", "tcp", "udp"])
|
|
163
|
+
return false unless transport_validator.valid?(@transport)
|
|
164
|
+
true
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
168
|
+
# @param [Object] transport Object to be assigned
|
|
169
|
+
def transport=(transport)
|
|
170
|
+
validator = EnumAttributeValidator.new('String', ["tls", "tcp", "udp"])
|
|
171
|
+
unless validator.valid?(transport)
|
|
172
|
+
fail ArgumentError, "invalid value for \"transport\", must be one of #{validator.allowable_values}."
|
|
173
|
+
end
|
|
174
|
+
@transport = transport
|
|
175
|
+
end
|
|
176
|
+
|
|
177
|
+
# Checks equality by comparing each attribute.
|
|
178
|
+
# @param [Object] Object to be compared
|
|
179
|
+
def ==(o)
|
|
180
|
+
return true if self.equal?(o)
|
|
181
|
+
self.class == o.class &&
|
|
182
|
+
id == o.id &&
|
|
183
|
+
label == o.label &&
|
|
184
|
+
sip_host == o.sip_host &&
|
|
185
|
+
sip_port == o.sip_port &&
|
|
186
|
+
transport == o.transport &&
|
|
187
|
+
termination == o.termination &&
|
|
188
|
+
numbers_attached == o.numbers_attached &&
|
|
189
|
+
created_at == o.created_at
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# @see the `==` method
|
|
193
|
+
# @param [Object] Object to be compared
|
|
194
|
+
def eql?(o)
|
|
195
|
+
self == o
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# Calculates hash code according to all attributes.
|
|
199
|
+
# @return [Integer] Hash code
|
|
200
|
+
def hash
|
|
201
|
+
[id, label, sip_host, sip_port, transport, termination, numbers_attached, created_at].hash
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Builds the object from hash
|
|
205
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
206
|
+
# @return [Object] Returns the model itself
|
|
207
|
+
def self.build_from_hash(attributes)
|
|
208
|
+
return nil unless attributes.is_a?(Hash)
|
|
209
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
210
|
+
transformed_hash = {}
|
|
211
|
+
openapi_types.each_pair do |key, type|
|
|
212
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
213
|
+
transformed_hash["#{key}"] = nil
|
|
214
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
215
|
+
# check to ensure the input is an array given that the attribute
|
|
216
|
+
# is documented as an array but the input is not
|
|
217
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
218
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
219
|
+
end
|
|
220
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
221
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
new(transformed_hash)
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
# Returns the object in the form of hash
|
|
228
|
+
# @return [Hash] Returns the object in the form of hash
|
|
229
|
+
def to_hash
|
|
230
|
+
hash = {}
|
|
231
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
232
|
+
value = self.send(attr)
|
|
233
|
+
if value.nil?
|
|
234
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
235
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
hash[param] = _to_hash(value)
|
|
239
|
+
end
|
|
240
|
+
hash
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
end
|
|
@@ -0,0 +1,156 @@
|
|
|
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 ListSipTrunks200ResponseTrunksInnerTermination < ApiModelBase
|
|
18
|
+
attr_accessor :uri
|
|
19
|
+
|
|
20
|
+
attr_accessor :username
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'uri' => :'uri',
|
|
26
|
+
:'username' => :'username'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'uri' => :'String',
|
|
44
|
+
:'username' => :'String'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::ListSipTrunks200ResponseTrunksInnerTermination` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::ListSipTrunks200ResponseTrunksInnerTermination`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'uri')
|
|
71
|
+
self.uri = attributes[:'uri']
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'username')
|
|
75
|
+
self.username = attributes[:'username']
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
80
|
+
# @return Array for valid properties with the reasons
|
|
81
|
+
def list_invalid_properties
|
|
82
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
83
|
+
invalid_properties = Array.new
|
|
84
|
+
invalid_properties
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Check to see if the all the properties in the model are valid
|
|
88
|
+
# @return true if the model is valid
|
|
89
|
+
def valid?
|
|
90
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Checks equality by comparing each attribute.
|
|
95
|
+
# @param [Object] Object to be compared
|
|
96
|
+
def ==(o)
|
|
97
|
+
return true if self.equal?(o)
|
|
98
|
+
self.class == o.class &&
|
|
99
|
+
uri == o.uri &&
|
|
100
|
+
username == o.username
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# @see the `==` method
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def eql?(o)
|
|
106
|
+
self == o
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Calculates hash code according to all attributes.
|
|
110
|
+
# @return [Integer] Hash code
|
|
111
|
+
def hash
|
|
112
|
+
[uri, username].hash
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Builds the object from hash
|
|
116
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
117
|
+
# @return [Object] Returns the model itself
|
|
118
|
+
def self.build_from_hash(attributes)
|
|
119
|
+
return nil unless attributes.is_a?(Hash)
|
|
120
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
121
|
+
transformed_hash = {}
|
|
122
|
+
openapi_types.each_pair do |key, type|
|
|
123
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
124
|
+
transformed_hash["#{key}"] = nil
|
|
125
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
126
|
+
# check to ensure the input is an array given that the attribute
|
|
127
|
+
# is documented as an array but the input is not
|
|
128
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
129
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
130
|
+
end
|
|
131
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
132
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
new(transformed_hash)
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Returns the object in the form of hash
|
|
139
|
+
# @return [Hash] Returns the object in the form of hash
|
|
140
|
+
def to_hash
|
|
141
|
+
hash = {}
|
|
142
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
143
|
+
value = self.send(attr)
|
|
144
|
+
if value.nil?
|
|
145
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
146
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
hash[param] = _to_hash(value)
|
|
150
|
+
end
|
|
151
|
+
hash
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
end
|
|
@@ -0,0 +1,156 @@
|
|
|
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 RotateSipTrunkCredentials200Response < ApiModelBase
|
|
18
|
+
attr_accessor :termination
|
|
19
|
+
|
|
20
|
+
attr_accessor :digest_password
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
:'termination' => :'termination',
|
|
26
|
+
:'digest_password' => :'digestPassword'
|
|
27
|
+
}
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
# Returns attribute mapping this model knows about
|
|
31
|
+
def self.acceptable_attribute_map
|
|
32
|
+
attribute_map
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Returns all the JSON keys this model knows about
|
|
36
|
+
def self.acceptable_attributes
|
|
37
|
+
acceptable_attribute_map.values
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Attribute type mapping.
|
|
41
|
+
def self.openapi_types
|
|
42
|
+
{
|
|
43
|
+
:'termination' => :'CreateSipTrunk201ResponseTermination',
|
|
44
|
+
:'digest_password' => :'String'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# List of attributes with nullable: true
|
|
49
|
+
def self.openapi_nullable
|
|
50
|
+
Set.new([
|
|
51
|
+
])
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Initializes the object
|
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
56
|
+
def initialize(attributes = {})
|
|
57
|
+
if (!attributes.is_a?(Hash))
|
|
58
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::RotateSipTrunkCredentials200Response` initialize method"
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
62
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
64
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
65
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::RotateSipTrunkCredentials200Response`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
66
|
+
end
|
|
67
|
+
h[k.to_sym] = v
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'termination')
|
|
71
|
+
self.termination = attributes[:'termination']
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
if attributes.key?(:'digest_password')
|
|
75
|
+
self.digest_password = attributes[:'digest_password']
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
80
|
+
# @return Array for valid properties with the reasons
|
|
81
|
+
def list_invalid_properties
|
|
82
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
83
|
+
invalid_properties = Array.new
|
|
84
|
+
invalid_properties
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
# Check to see if the all the properties in the model are valid
|
|
88
|
+
# @return true if the model is valid
|
|
89
|
+
def valid?
|
|
90
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
91
|
+
true
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Checks equality by comparing each attribute.
|
|
95
|
+
# @param [Object] Object to be compared
|
|
96
|
+
def ==(o)
|
|
97
|
+
return true if self.equal?(o)
|
|
98
|
+
self.class == o.class &&
|
|
99
|
+
termination == o.termination &&
|
|
100
|
+
digest_password == o.digest_password
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# @see the `==` method
|
|
104
|
+
# @param [Object] Object to be compared
|
|
105
|
+
def eql?(o)
|
|
106
|
+
self == o
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Calculates hash code according to all attributes.
|
|
110
|
+
# @return [Integer] Hash code
|
|
111
|
+
def hash
|
|
112
|
+
[termination, digest_password].hash
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
# Builds the object from hash
|
|
116
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
117
|
+
# @return [Object] Returns the model itself
|
|
118
|
+
def self.build_from_hash(attributes)
|
|
119
|
+
return nil unless attributes.is_a?(Hash)
|
|
120
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
121
|
+
transformed_hash = {}
|
|
122
|
+
openapi_types.each_pair do |key, type|
|
|
123
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
124
|
+
transformed_hash["#{key}"] = nil
|
|
125
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
126
|
+
# check to ensure the input is an array given that the attribute
|
|
127
|
+
# is documented as an array but the input is not
|
|
128
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
129
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
130
|
+
end
|
|
131
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
132
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
new(transformed_hash)
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Returns the object in the form of hash
|
|
139
|
+
# @return [Hash] Returns the object in the form of hash
|
|
140
|
+
def to_hash
|
|
141
|
+
hash = {}
|
|
142
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
143
|
+
value = self.send(attr)
|
|
144
|
+
if value.nil?
|
|
145
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
146
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
hash[param] = _to_hash(value)
|
|
150
|
+
end
|
|
151
|
+
hash
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
end
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -86,6 +86,8 @@ require 'zernio-sdk/models/archive_lead_form200_response'
|
|
|
86
86
|
require 'zernio-sdk/models/assign_google_business_location200_response'
|
|
87
87
|
require 'zernio-sdk/models/assign_google_business_location200_response_account'
|
|
88
88
|
require 'zernio-sdk/models/assign_google_business_location_request'
|
|
89
|
+
require 'zernio-sdk/models/attach_number_to_sip_trunk200_response'
|
|
90
|
+
require 'zernio-sdk/models/attach_number_to_sip_trunk_request'
|
|
89
91
|
require 'zernio-sdk/models/batch_get_google_business_reviews200_response'
|
|
90
92
|
require 'zernio-sdk/models/batch_get_google_business_reviews200_response_location_reviews_inner'
|
|
91
93
|
require 'zernio-sdk/models/batch_get_google_business_reviews_request'
|
|
@@ -287,6 +289,9 @@ require 'zernio-sdk/models/create_sequence_request'
|
|
|
287
289
|
require 'zernio-sdk/models/create_sequence_request_steps_inner'
|
|
288
290
|
require 'zernio-sdk/models/create_sequence_request_steps_inner_template'
|
|
289
291
|
require 'zernio-sdk/models/create_sequence_request_steps_inner_template_variable_mapping_value'
|
|
292
|
+
require 'zernio-sdk/models/create_sip_trunk201_response'
|
|
293
|
+
require 'zernio-sdk/models/create_sip_trunk201_response_termination'
|
|
294
|
+
require 'zernio-sdk/models/create_sip_trunk_request'
|
|
290
295
|
require 'zernio-sdk/models/create_sms_sender_id200_response'
|
|
291
296
|
require 'zernio-sdk/models/create_sms_sender_id_request'
|
|
292
297
|
require 'zernio-sdk/models/create_standalone_ad200_response'
|
|
@@ -374,6 +379,7 @@ require 'zernio-sdk/models/delete_inbox_review_reply_request'
|
|
|
374
379
|
require 'zernio-sdk/models/delete_sms_sender_id200_response'
|
|
375
380
|
require 'zernio-sdk/models/delete_value_rule_set200_response'
|
|
376
381
|
require 'zernio-sdk/models/delete_whatsapp_business_username_request'
|
|
382
|
+
require 'zernio-sdk/models/detach_number_from_sip_trunk200_response'
|
|
377
383
|
require 'zernio-sdk/models/dial_voice_web_call200_response'
|
|
378
384
|
require 'zernio-sdk/models/dial_voice_web_call_request'
|
|
379
385
|
require 'zernio-sdk/models/disable_sms_on_number200_response'
|
|
@@ -697,6 +703,8 @@ require 'zernio-sdk/models/get_sequence200_response'
|
|
|
697
703
|
require 'zernio-sdk/models/get_sequence200_response_sequence'
|
|
698
704
|
require 'zernio-sdk/models/get_sequence200_response_sequence_steps_inner'
|
|
699
705
|
require 'zernio-sdk/models/get_sequence200_response_sequence_steps_inner_template'
|
|
706
|
+
require 'zernio-sdk/models/get_sip_trunk200_response'
|
|
707
|
+
require 'zernio-sdk/models/get_sip_trunk200_response_numbers_inner'
|
|
700
708
|
require 'zernio-sdk/models/get_slack_settings200_response'
|
|
701
709
|
require 'zernio-sdk/models/get_slack_settings200_response_account'
|
|
702
710
|
require 'zernio-sdk/models/get_sms_registration200_response'
|
|
@@ -986,6 +994,9 @@ require 'zernio-sdk/models/list_sequence_enrollments200_response'
|
|
|
986
994
|
require 'zernio-sdk/models/list_sequence_enrollments200_response_enrollments_inner'
|
|
987
995
|
require 'zernio-sdk/models/list_sequences200_response'
|
|
988
996
|
require 'zernio-sdk/models/list_sequences200_response_sequences_inner'
|
|
997
|
+
require 'zernio-sdk/models/list_sip_trunks200_response'
|
|
998
|
+
require 'zernio-sdk/models/list_sip_trunks200_response_trunks_inner'
|
|
999
|
+
require 'zernio-sdk/models/list_sip_trunks200_response_trunks_inner_termination'
|
|
989
1000
|
require 'zernio-sdk/models/list_slack_members200_response'
|
|
990
1001
|
require 'zernio-sdk/models/list_slack_members200_response_members_inner'
|
|
991
1002
|
require 'zernio-sdk/models/list_sms_opt_outs200_response'
|
|
@@ -1174,6 +1185,7 @@ require 'zernio-sdk/models/review_webhook_review_reply'
|
|
|
1174
1185
|
require 'zernio-sdk/models/review_webhook_review_reviewer'
|
|
1175
1186
|
require 'zernio-sdk/models/revoke_connected_app200_response'
|
|
1176
1187
|
require 'zernio-sdk/models/rf_prediction'
|
|
1188
|
+
require 'zernio-sdk/models/rotate_sip_trunk_credentials200_response'
|
|
1177
1189
|
require 'zernio-sdk/models/saved_targeting_audience'
|
|
1178
1190
|
require 'zernio-sdk/models/schedule_broadcast200_response'
|
|
1179
1191
|
require 'zernio-sdk/models/schedule_broadcast200_response_broadcast'
|