late-sdk 0.0.1386 → 0.0.1387

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aebcec989873050f438f35227bb39d16425f92490fb024156cf7028ddf0f09a8
4
- data.tar.gz: b2b17c52e9de45a20386777d8827aad85b7a8c866fa8a967d305271750832a5e
3
+ metadata.gz: cdd9b85e200f9a304f284be2c8a18347617516cf4fedaa6cfc2ae7d81f9ce2ab
4
+ data.tar.gz: c82fc99c1ea4eb443389a29180a6715d18ea15cec093f0865132dc42e5fa6910
5
5
  SHA512:
6
- metadata.gz: 163db935ed33b6f5ddce001a8b1483191b28bf1a0952af37235a90e89a0f2d47a1633603d6c1b2173cd06e15b0c978bd3c9d4890cd00fac566c51414d909c5fa
7
- data.tar.gz: c3a38bb331055488b8aa85104bbf81da73202c033ca37572e1f56f622e043d26de49bc05d1bae29f2d02d7afa27b574e2795e3f88877ff1b2864b3317c2abaf6
6
+ metadata.gz: 8dea700d38a940e93a3520f58c1cf2559023cf7dcb2e0f39fe2b814a92cbdd7e9980b90029e61577bfec7e014454ff6f4d21ea099ba444e2806b108aa3870795
7
+ data.tar.gz: 293d17c024e9384221628eef1201cd94af08ed92099e5048540e8a617b680f5946c5874505b771c87a93e668c444e8f4c47826e2b8b5136cc03acd4ca40a9037
data/README.md CHANGED
@@ -3199,6 +3199,7 @@ Class | Method | HTTP request | Description
3199
3199
  - [Zernio::SubmitWhatsAppNumberKycRequestDocumentsInner](docs/SubmitWhatsAppNumberKycRequestDocumentsInner.md)
3200
3200
  - [Zernio::SubmitWhatsAppNumberKycRequestDocumentsInnerOneOf](docs/SubmitWhatsAppNumberKycRequestDocumentsInnerOneOf.md)
3201
3201
  - [Zernio::SupportRun](docs/SupportRun.md)
3202
+ - [Zernio::SupportRunDiagnosis](docs/SupportRunDiagnosis.md)
3202
3203
  - [Zernio::SupportRunSupportTicket](docs/SupportRunSupportTicket.md)
3203
3204
  - [Zernio::SupportRunUsage](docs/SupportRunUsage.md)
3204
3205
  - [Zernio::SyncExternalPosts200Response](docs/SyncExternalPosts200Response.md)
data/docs/SupportRun.md CHANGED
@@ -10,6 +10,7 @@
10
10
  | **stop_reason** | **String** | Why the run stopped. Null while it is in progress. | |
11
11
  | **question** | **String** | The question as asked, with leading and trailing whitespace trimmed. Null only on runs created before this field was added. | |
12
12
  | **answer** | **String** | The assistant's answer. Null while the run is in progress or when it failed. | |
13
+ | **diagnosis** | [**SupportRunDiagnosis**](SupportRunDiagnosis.md) | | |
13
14
  | **usage** | [**SupportRunUsage**](SupportRunUsage.md) | | |
14
15
  | **cost_usd** | **Float** | The exact amount charged for the question, in USD, never above `maxCostUsd`. 0 for a failed run. | |
15
16
  | **max_cost_usd** | **Float** | The cost cap this run was started with, in USD. | |
@@ -31,6 +32,7 @@ instance = Zernio::SupportRun.new(
31
32
  stop_reason: null,
32
33
  question: null,
33
34
  answer: null,
35
+ diagnosis: null,
34
36
  usage: null,
35
37
  cost_usd: null,
36
38
  max_cost_usd: null,
@@ -0,0 +1,26 @@
1
+ # Zernio::SupportRunDiagnosis
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **category** | **String** | What kind of problem the answer describes. New values may be added: treat any value you do not recognize as `other`. | |
8
+ | **cause** | **String** | The cause the answer gives, in one sentence. Null when the answer reports no problem, for example a how-to question. | |
9
+ | **fix_steps** | **Array<String>** | The steps the answer recommends, in order. Empty when it recommends none. | |
10
+ | **docs_links** | **Array<String>** | Links to docs.zernio.com that the answer itself cites. Empty when it cites none. | |
11
+ | **who_must_act** | **String** | Who has to act to resolve it: you (`integrator`), your end user, Zernio, the social platform, or nobody. New values may be added: treat any value you do not recognize as `none`. | |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'zernio-sdk'
17
+
18
+ instance = Zernio::SupportRunDiagnosis.new(
19
+ category: null,
20
+ cause: null,
21
+ fix_steps: null,
22
+ docs_links: null,
23
+ who_must_act: null
24
+ )
25
+ ```
26
+
@@ -33,6 +33,8 @@ module Zernio
33
33
  # The assistant's answer. Null while the run is in progress or when it failed.
34
34
  attr_accessor :answer
35
35
 
36
+ attr_accessor :diagnosis
37
+
36
38
  attr_accessor :usage
37
39
 
38
40
  # The exact amount charged for the question, in USD, never above `maxCostUsd`. 0 for a failed run.
@@ -83,6 +85,7 @@ module Zernio
83
85
  :'stop_reason' => :'stopReason',
84
86
  :'question' => :'question',
85
87
  :'answer' => :'answer',
88
+ :'diagnosis' => :'diagnosis',
86
89
  :'usage' => :'usage',
87
90
  :'cost_usd' => :'costUsd',
88
91
  :'max_cost_usd' => :'maxCostUsd',
@@ -113,6 +116,7 @@ module Zernio
113
116
  :'stop_reason' => :'String',
114
117
  :'question' => :'String',
115
118
  :'answer' => :'String',
119
+ :'diagnosis' => :'SupportRunDiagnosis',
116
120
  :'usage' => :'SupportRunUsage',
117
121
  :'cost_usd' => :'Float',
118
122
  :'max_cost_usd' => :'Float',
@@ -130,6 +134,7 @@ module Zernio
130
134
  :'stop_reason',
131
135
  :'question',
132
136
  :'answer',
137
+ :'diagnosis',
133
138
  :'started_at',
134
139
  :'finished_at',
135
140
  ])
@@ -187,6 +192,12 @@ module Zernio
187
192
  self.answer = nil
188
193
  end
189
194
 
195
+ if attributes.key?(:'diagnosis')
196
+ self.diagnosis = attributes[:'diagnosis']
197
+ else
198
+ self.diagnosis = nil
199
+ end
200
+
190
201
  if attributes.key?(:'usage')
191
202
  self.usage = attributes[:'usage']
192
203
  else
@@ -394,6 +405,7 @@ module Zernio
394
405
  stop_reason == o.stop_reason &&
395
406
  question == o.question &&
396
407
  answer == o.answer &&
408
+ diagnosis == o.diagnosis &&
397
409
  usage == o.usage &&
398
410
  cost_usd == o.cost_usd &&
399
411
  max_cost_usd == o.max_cost_usd &&
@@ -413,7 +425,7 @@ module Zernio
413
425
  # Calculates hash code according to all attributes.
414
426
  # @return [Integer] Hash code
415
427
  def hash
416
- [run_id, thread_id, status, stop_reason, question, answer, usage, cost_usd, max_cost_usd, created_at, started_at, finished_at, support_ticket, poll_after_seconds].hash
428
+ [run_id, thread_id, status, stop_reason, question, answer, diagnosis, usage, cost_usd, max_cost_usd, created_at, started_at, finished_at, support_ticket, poll_after_seconds].hash
417
429
  end
418
430
 
419
431
  # Builds the object from hash
@@ -0,0 +1,289 @@
1
+ =begin
2
+ #Zernio API
3
+
4
+ #API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api Versioning and deprecation: all endpoints are versioned in the URL path (current version: /v1). Breaking changes only ship in a new path version; existing versions keep working. Deprecated operations are marked 'deprecated: true' in this spec and announced in the changelog (https://zernio.com/changelog) before removal. Errors: every 4xx/5xx response is application/json with a machine-readable 'code' and a human-readable 'error' message (see the ErrorResponse schema). Request ids: responses carry an X-Request-Id header with the id we log the request under. Quote it when reporting a problem. A valid x-request-id you send is reused as that id.
5
+
6
+ The version of the OpenAPI document: 1.267.0
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 SupportRunDiagnosis < ApiModelBase
18
+ # What kind of problem the answer describes. New values may be added: treat any value you do not recognize as `other`.
19
+ attr_accessor :category
20
+
21
+ # The cause the answer gives, in one sentence. Null when the answer reports no problem, for example a how-to question.
22
+ attr_accessor :cause
23
+
24
+ # The steps the answer recommends, in order. Empty when it recommends none.
25
+ attr_accessor :fix_steps
26
+
27
+ # Links to docs.zernio.com that the answer itself cites. Empty when it cites none.
28
+ attr_accessor :docs_links
29
+
30
+ # Who has to act to resolve it: you (`integrator`), your end user, Zernio, the social platform, or nobody. New values may be added: treat any value you do not recognize as `none`.
31
+ attr_accessor :who_must_act
32
+
33
+ class EnumAttributeValidator
34
+ attr_reader :datatype
35
+ attr_reader :allowable_values
36
+
37
+ def initialize(datatype, allowable_values)
38
+ @allowable_values = allowable_values.map do |value|
39
+ case datatype.to_s
40
+ when /Integer/i
41
+ value.to_i
42
+ when /Float/i
43
+ value.to_f
44
+ else
45
+ value
46
+ end
47
+ end
48
+ end
49
+
50
+ def valid?(value)
51
+ !value || allowable_values.include?(value)
52
+ end
53
+ end
54
+
55
+ # Attribute mapping from ruby-style variable name to JSON key.
56
+ def self.attribute_map
57
+ {
58
+ :'category' => :'category',
59
+ :'cause' => :'cause',
60
+ :'fix_steps' => :'fixSteps',
61
+ :'docs_links' => :'docsLinks',
62
+ :'who_must_act' => :'whoMustAct'
63
+ }
64
+ end
65
+
66
+ # Returns attribute mapping this model knows about
67
+ def self.acceptable_attribute_map
68
+ attribute_map
69
+ end
70
+
71
+ # Returns all the JSON keys this model knows about
72
+ def self.acceptable_attributes
73
+ acceptable_attribute_map.values
74
+ end
75
+
76
+ # Attribute type mapping.
77
+ def self.openapi_types
78
+ {
79
+ :'category' => :'String',
80
+ :'cause' => :'String',
81
+ :'fix_steps' => :'Array<String>',
82
+ :'docs_links' => :'Array<String>',
83
+ :'who_must_act' => :'String'
84
+ }
85
+ end
86
+
87
+ # List of attributes with nullable: true
88
+ def self.openapi_nullable
89
+ Set.new([
90
+ :'cause',
91
+ ])
92
+ end
93
+
94
+ # Initializes the object
95
+ # @param [Hash] attributes Model attributes in the form of hash
96
+ def initialize(attributes = {})
97
+ if (!attributes.is_a?(Hash))
98
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Zernio::SupportRunDiagnosis` initialize method"
99
+ end
100
+
101
+ # check to see if the attribute exists and convert string to symbol for hash key
102
+ acceptable_attribute_map = self.class.acceptable_attribute_map
103
+ attributes = attributes.each_with_object({}) { |(k, v), h|
104
+ if (!acceptable_attribute_map.key?(k.to_sym))
105
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Zernio::SupportRunDiagnosis`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
106
+ end
107
+ h[k.to_sym] = v
108
+ }
109
+
110
+ if attributes.key?(:'category')
111
+ self.category = attributes[:'category']
112
+ else
113
+ self.category = nil
114
+ end
115
+
116
+ if attributes.key?(:'cause')
117
+ self.cause = attributes[:'cause']
118
+ else
119
+ self.cause = nil
120
+ end
121
+
122
+ if attributes.key?(:'fix_steps')
123
+ if (value = attributes[:'fix_steps']).is_a?(Array)
124
+ self.fix_steps = value
125
+ end
126
+ else
127
+ self.fix_steps = nil
128
+ end
129
+
130
+ if attributes.key?(:'docs_links')
131
+ if (value = attributes[:'docs_links']).is_a?(Array)
132
+ self.docs_links = value
133
+ end
134
+ else
135
+ self.docs_links = nil
136
+ end
137
+
138
+ if attributes.key?(:'who_must_act')
139
+ self.who_must_act = attributes[:'who_must_act']
140
+ else
141
+ self.who_must_act = nil
142
+ end
143
+ end
144
+
145
+ # Show invalid properties with the reasons. Usually used together with valid?
146
+ # @return Array for valid properties with the reasons
147
+ def list_invalid_properties
148
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
149
+ invalid_properties = Array.new
150
+ if @category.nil?
151
+ invalid_properties.push('invalid value for "category", category cannot be nil.')
152
+ end
153
+
154
+ if @fix_steps.nil?
155
+ invalid_properties.push('invalid value for "fix_steps", fix_steps cannot be nil.')
156
+ end
157
+
158
+ if @docs_links.nil?
159
+ invalid_properties.push('invalid value for "docs_links", docs_links cannot be nil.')
160
+ end
161
+
162
+ if @who_must_act.nil?
163
+ invalid_properties.push('invalid value for "who_must_act", who_must_act cannot be nil.')
164
+ end
165
+
166
+ invalid_properties
167
+ end
168
+
169
+ # Check to see if the all the properties in the model are valid
170
+ # @return true if the model is valid
171
+ def valid?
172
+ warn '[DEPRECATED] the `valid?` method is obsolete'
173
+ return false if @category.nil?
174
+ category_validator = EnumAttributeValidator.new('String', ["account_connection", "content_rejected", "rate_limited", "platform_issue", "zernio_issue", "billing", "configuration", "how_to", "other"])
175
+ return false unless category_validator.valid?(@category)
176
+ return false if @fix_steps.nil?
177
+ return false if @docs_links.nil?
178
+ return false if @who_must_act.nil?
179
+ who_must_act_validator = EnumAttributeValidator.new('String', ["integrator", "end_user", "zernio", "platform", "none"])
180
+ return false unless who_must_act_validator.valid?(@who_must_act)
181
+ true
182
+ end
183
+
184
+ # Custom attribute writer method checking allowed values (enum).
185
+ # @param [Object] category Object to be assigned
186
+ def category=(category)
187
+ validator = EnumAttributeValidator.new('String', ["account_connection", "content_rejected", "rate_limited", "platform_issue", "zernio_issue", "billing", "configuration", "how_to", "other"])
188
+ unless validator.valid?(category)
189
+ fail ArgumentError, "invalid value for \"category\", must be one of #{validator.allowable_values}."
190
+ end
191
+ @category = category
192
+ end
193
+
194
+ # Custom attribute writer method with validation
195
+ # @param [Object] fix_steps Value to be assigned
196
+ def fix_steps=(fix_steps)
197
+ if fix_steps.nil?
198
+ fail ArgumentError, 'fix_steps cannot be nil'
199
+ end
200
+
201
+ @fix_steps = fix_steps
202
+ end
203
+
204
+ # Custom attribute writer method with validation
205
+ # @param [Object] docs_links Value to be assigned
206
+ def docs_links=(docs_links)
207
+ if docs_links.nil?
208
+ fail ArgumentError, 'docs_links cannot be nil'
209
+ end
210
+
211
+ @docs_links = docs_links
212
+ end
213
+
214
+ # Custom attribute writer method checking allowed values (enum).
215
+ # @param [Object] who_must_act Object to be assigned
216
+ def who_must_act=(who_must_act)
217
+ validator = EnumAttributeValidator.new('String', ["integrator", "end_user", "zernio", "platform", "none"])
218
+ unless validator.valid?(who_must_act)
219
+ fail ArgumentError, "invalid value for \"who_must_act\", must be one of #{validator.allowable_values}."
220
+ end
221
+ @who_must_act = who_must_act
222
+ end
223
+
224
+ # Checks equality by comparing each attribute.
225
+ # @param [Object] Object to be compared
226
+ def ==(o)
227
+ return true if self.equal?(o)
228
+ self.class == o.class &&
229
+ category == o.category &&
230
+ cause == o.cause &&
231
+ fix_steps == o.fix_steps &&
232
+ docs_links == o.docs_links &&
233
+ who_must_act == o.who_must_act
234
+ end
235
+
236
+ # @see the `==` method
237
+ # @param [Object] Object to be compared
238
+ def eql?(o)
239
+ self == o
240
+ end
241
+
242
+ # Calculates hash code according to all attributes.
243
+ # @return [Integer] Hash code
244
+ def hash
245
+ [category, cause, fix_steps, docs_links, who_must_act].hash
246
+ end
247
+
248
+ # Builds the object from hash
249
+ # @param [Hash] attributes Model attributes in the form of hash
250
+ # @return [Object] Returns the model itself
251
+ def self.build_from_hash(attributes)
252
+ return nil unless attributes.is_a?(Hash)
253
+ attributes = attributes.transform_keys(&:to_sym)
254
+ transformed_hash = {}
255
+ openapi_types.each_pair do |key, type|
256
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
257
+ transformed_hash["#{key}"] = nil
258
+ elsif type =~ /\AArray<(.*)>/i
259
+ # check to ensure the input is an array given that the attribute
260
+ # is documented as an array but the input is not
261
+ if attributes[attribute_map[key]].is_a?(Array)
262
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
263
+ end
264
+ elsif !attributes[attribute_map[key]].nil?
265
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
266
+ end
267
+ end
268
+ new(transformed_hash)
269
+ end
270
+
271
+ # Returns the object in the form of hash
272
+ # @return [Hash] Returns the object in the form of hash
273
+ def to_hash
274
+ hash = {}
275
+ self.class.attribute_map.each_pair do |attr, param|
276
+ value = self.send(attr)
277
+ if value.nil?
278
+ is_nullable = self.class.openapi_nullable.include?(attr)
279
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
280
+ end
281
+
282
+ hash[param] = _to_hash(value)
283
+ end
284
+ hash
285
+ end
286
+
287
+ end
288
+
289
+ end
@@ -11,5 +11,5 @@ Generator version: 7.19.0
11
11
  =end
12
12
 
13
13
  module Zernio
14
- VERSION = '0.0.1386'
14
+ VERSION = '0.0.1387'
15
15
  end
data/lib/zernio-sdk.rb CHANGED
@@ -2168,6 +2168,7 @@ require 'zernio-sdk/models/submit_whats_app_number_kyc_request'
2168
2168
  require 'zernio-sdk/models/submit_whats_app_number_kyc_request_documents_inner'
2169
2169
  require 'zernio-sdk/models/submit_whats_app_number_kyc_request_documents_inner_one_of'
2170
2170
  require 'zernio-sdk/models/support_run'
2171
+ require 'zernio-sdk/models/support_run_diagnosis'
2171
2172
  require 'zernio-sdk/models/support_run_support_ticket'
2172
2173
  require 'zernio-sdk/models/support_run_usage'
2173
2174
  require 'zernio-sdk/models/sync_external_posts200_response'