late-sdk 0.0.725 → 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.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +20 -0
  3. data/docs/AttachNumberToSipTrunk200Response.md +22 -0
  4. data/docs/AttachNumberToSipTrunkRequest.md +18 -0
  5. data/docs/CreateSipTrunk201Response.md +34 -0
  6. data/docs/CreateSipTrunk201ResponseTermination.md +20 -0
  7. data/docs/CreateSipTrunkRequest.md +24 -0
  8. data/docs/DetachNumberFromSipTrunk200Response.md +20 -0
  9. data/docs/GetPhoneNumber200ResponsePhoneNumber.md +3 -1
  10. data/docs/GetSipTrunk200Response.md +34 -0
  11. data/docs/GetSipTrunk200ResponseNumbersInner.md +20 -0
  12. data/docs/ListPhoneNumbers200ResponseNumbersInner.md +2 -0
  13. data/docs/ListSipTrunks200Response.md +20 -0
  14. data/docs/ListSipTrunks200ResponseTrunksInner.md +32 -0
  15. data/docs/ListSipTrunks200ResponseTrunksInnerTermination.md +20 -0
  16. data/docs/MessagesApi.md +1 -1
  17. data/docs/RotateSipTrunkCredentials200Response.md +20 -0
  18. data/docs/SendInboxMessage200ResponseData.md +4 -6
  19. data/docs/SendInboxMessage200ResponseDataAttachmentsInner.md +20 -0
  20. data/docs/VoiceApi.md +485 -0
  21. data/lib/zernio-sdk/api/messages_api.rb +2 -2
  22. data/lib/zernio-sdk/api/voice_api.rb +447 -0
  23. data/lib/zernio-sdk/models/attach_number_to_sip_trunk200_response.rb +165 -0
  24. data/lib/zernio-sdk/models/attach_number_to_sip_trunk_request.rb +165 -0
  25. data/lib/zernio-sdk/models/create_sip_trunk201_response.rb +255 -0
  26. data/lib/zernio-sdk/models/create_sip_trunk201_response_termination.rb +158 -0
  27. data/lib/zernio-sdk/models/create_sip_trunk_request.rb +283 -0
  28. data/lib/zernio-sdk/models/detach_number_from_sip_trunk200_response.rb +157 -0
  29. data/lib/zernio-sdk/models/get_phone_number200_response_phone_number.rb +15 -4
  30. data/lib/zernio-sdk/models/get_sip_trunk200_response.rb +256 -0
  31. data/lib/zernio-sdk/models/get_sip_trunk200_response_numbers_inner.rb +157 -0
  32. data/lib/zernio-sdk/models/list_phone_numbers200_response_numbers_inner.rb +12 -1
  33. data/lib/zernio-sdk/models/list_sip_trunks200_response.rb +159 -0
  34. data/lib/zernio-sdk/models/list_sip_trunks200_response_trunks_inner.rb +245 -0
  35. data/lib/zernio-sdk/models/list_sip_trunks200_response_trunks_inner_termination.rb +156 -0
  36. data/lib/zernio-sdk/models/rotate_sip_trunk_credentials200_response.rb +156 -0
  37. data/lib/zernio-sdk/models/send_inbox_message200_response_data.rb +12 -23
  38. data/lib/zernio-sdk/models/send_inbox_message200_response_data_attachments_inner.rb +156 -0
  39. data/lib/zernio-sdk/version.rb +1 -1
  40. data/lib/zernio-sdk.rb +13 -0
  41. data/openapi.yaml +293 -4
  42. data/spec/api/messages_api_spec.rb +1 -1
  43. data/spec/api/voice_api_spec.rb +82 -0
  44. data/spec/models/attach_number_to_sip_trunk200_response_spec.rb +48 -0
  45. data/spec/models/attach_number_to_sip_trunk_request_spec.rb +36 -0
  46. data/spec/models/create_sip_trunk201_response_spec.rb +88 -0
  47. data/spec/models/create_sip_trunk201_response_termination_spec.rb +42 -0
  48. data/spec/models/create_sip_trunk_request_spec.rb +58 -0
  49. data/spec/models/detach_number_from_sip_trunk200_response_spec.rb +42 -0
  50. data/spec/models/get_phone_number200_response_phone_number_spec.rb +6 -0
  51. data/spec/models/get_sip_trunk200_response_numbers_inner_spec.rb +42 -0
  52. data/spec/models/get_sip_trunk200_response_spec.rb +88 -0
  53. data/spec/models/list_phone_numbers200_response_numbers_inner_spec.rb +6 -0
  54. data/spec/models/list_sip_trunks200_response_spec.rb +42 -0
  55. data/spec/models/list_sip_trunks200_response_trunks_inner_spec.rb +82 -0
  56. data/spec/models/list_sip_trunks200_response_trunks_inner_termination_spec.rb +42 -0
  57. data/spec/models/rotate_sip_trunk_credentials200_response_spec.rb +42 -0
  58. data/spec/models/send_inbox_message200_response_data_attachments_inner_spec.rb +42 -0
  59. data/spec/models/send_inbox_message200_response_data_spec.rb +1 -7
  60. data/zernio-sdk-0.0.727.gem +0 -0
  61. metadata +55 -3
  62. data/zernio-sdk-0.0.725.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
@@ -15,25 +15,21 @@ require 'time'
15
15
 
16
16
  module Zernio
17
17
  class SendInboxMessage200ResponseData < ApiModelBase
18
- # ID of the sent message (not returned for Reddit)
18
+ # Platform id of the sent message (not returned for Reddit). For WhatsApp this is the raw Meta wamid, the same id delivered as message.platformMessageId on webhooks and delivery-status updates, and the value to pass as replyTo to quote-reply.
19
19
  attr_accessor :message_id
20
20
 
21
- # Twitter conversation ID
21
+ # Zernio conversation id, echoed so the thread can be read back or replied to. It equals the id the list-conversations endpoint returns for Telegram, WhatsApp, SMS and Slack; for Facebook, Instagram, Bluesky and Reddit that endpoint returns the platform thread id instead, so do not correlate the two by equality. For X (Twitter), when the request addressed the conversation by its Twitter dm_conversation_id, that platform id is echoed back instead. Omitted when the send succeeded but the conversation could not be resolved to a stored record.
22
22
  attr_accessor :conversation_id
23
23
 
24
- # Bluesky sent timestamp
25
- attr_accessor :sent_at
26
-
27
- # Success message (Reddit only)
28
- attr_accessor :message
24
+ # Echo of the sent attachment with its resolved public URL, when one is available (Facebook, Instagram, Telegram, WhatsApp).
25
+ attr_accessor :attachments
29
26
 
30
27
  # Attribute mapping from ruby-style variable name to JSON key.
31
28
  def self.attribute_map
32
29
  {
33
30
  :'message_id' => :'messageId',
34
31
  :'conversation_id' => :'conversationId',
35
- :'sent_at' => :'sentAt',
36
- :'message' => :'message'
32
+ :'attachments' => :'attachments'
37
33
  }
38
34
  end
39
35
 
@@ -52,17 +48,13 @@ module Zernio
52
48
  {
53
49
  :'message_id' => :'String',
54
50
  :'conversation_id' => :'String',
55
- :'sent_at' => :'Time',
56
- :'message' => :'String'
51
+ :'attachments' => :'Array<SendInboxMessage200ResponseDataAttachmentsInner>'
57
52
  }
58
53
  end
59
54
 
60
55
  # List of attributes with nullable: true
61
56
  def self.openapi_nullable
62
57
  Set.new([
63
- :'conversation_id',
64
- :'sent_at',
65
- :'message'
66
58
  ])
67
59
  end
68
60
 
@@ -90,12 +82,10 @@ module Zernio
90
82
  self.conversation_id = attributes[:'conversation_id']
91
83
  end
92
84
 
93
- if attributes.key?(:'sent_at')
94
- self.sent_at = attributes[:'sent_at']
95
- end
96
-
97
- if attributes.key?(:'message')
98
- self.message = attributes[:'message']
85
+ if attributes.key?(:'attachments')
86
+ if (value = attributes[:'attachments']).is_a?(Array)
87
+ self.attachments = value
88
+ end
99
89
  end
100
90
  end
101
91
 
@@ -121,8 +111,7 @@ module Zernio
121
111
  self.class == o.class &&
122
112
  message_id == o.message_id &&
123
113
  conversation_id == o.conversation_id &&
124
- sent_at == o.sent_at &&
125
- message == o.message
114
+ attachments == o.attachments
126
115
  end
127
116
 
128
117
  # @see the `==` method
@@ -134,7 +123,7 @@ module Zernio
134
123
  # Calculates hash code according to all attributes.
135
124
  # @return [Integer] Hash code
136
125
  def hash
137
- [message_id, conversation_id, sent_at, message].hash
126
+ [message_id, conversation_id, attachments].hash
138
127
  end
139
128
 
140
129
  # Builds the object from hash