docspring 4.6.0 → 4.7.0

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 (37) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/README.md +8 -1
  4. data/lib/docspring/api/client.rb +494 -0
  5. data/lib/docspring/api_client.rb +1 -1
  6. data/lib/docspring/models/ask_support_help_request.rb +217 -0
  7. data/lib/docspring/models/error_code.rb +4 -1
  8. data/lib/docspring/models/error_info.rb +12 -2
  9. data/lib/docspring/models/open_support_ticket_request.rb +363 -0
  10. data/lib/docspring/models/reply_to_support_ticket_request.rb +217 -0
  11. data/lib/docspring/models/send_support_feedback_request.rb +363 -0
  12. data/lib/docspring/models/support_feedback.rb +239 -0
  13. data/lib/docspring/models/support_help.rb +316 -0
  14. data/lib/docspring/models/support_help_source.rb +212 -0
  15. data/lib/docspring/models/support_help_state.rb +42 -0
  16. data/lib/docspring/models/support_help_turn.rb +234 -0
  17. data/lib/docspring/models/support_help_turn_role.rb +41 -0
  18. data/lib/docspring/models/support_message.rb +301 -0
  19. data/lib/docspring/models/support_message_author.rb +42 -0
  20. data/lib/docspring/models/support_report_agent.rb +188 -0
  21. data/lib/docspring/models/support_report_category.rb +57 -0
  22. data/lib/docspring/models/support_report_impact.rb +42 -0
  23. data/lib/docspring/models/support_report_kind.rb +47 -0
  24. data/lib/docspring/models/support_report_source.rb +41 -0
  25. data/lib/docspring/models/support_ticket.rb +637 -0
  26. data/lib/docspring/models/support_ticket_list.rb +200 -0
  27. data/lib/docspring/models/support_ticket_list_status.rb +42 -0
  28. data/lib/docspring/models/support_ticket_notifications.rb +197 -0
  29. data/lib/docspring/models/support_ticket_reply.rb +210 -0
  30. data/lib/docspring/models/support_ticket_reply_outcome.rb +41 -0
  31. data/lib/docspring/models/support_ticket_resolution.rb +45 -0
  32. data/lib/docspring/models/support_ticket_status.rb +43 -0
  33. data/lib/docspring/models/support_ticket_watch.rb +239 -0
  34. data/lib/docspring/request_schemas.json +426 -0
  35. data/lib/docspring/version.rb +1 -1
  36. data/lib/docspring.rb +26 -0
  37. metadata +27 -1
@@ -0,0 +1,45 @@
1
+ =begin
2
+ #DocSpring API
3
+
4
+ #Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
5
+
6
+ The version of the OpenAPI document: v2
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0-DOCSPRING
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DocSpring
17
+ class SupportTicketResolution
18
+ FIXED = "fixed".freeze
19
+ ANSWERED = "answered".freeze
20
+ PLANNED = "planned".freeze
21
+ DUPLICATE = "duplicate".freeze
22
+ NOT_REPRODUCIBLE = "not_reproducible".freeze
23
+ WONT_FIX = "wont_fix".freeze
24
+
25
+ def self.all_vars
26
+ @all_vars ||= [FIXED, ANSWERED, PLANNED, DUPLICATE, NOT_REPRODUCIBLE, WONT_FIX].freeze
27
+ end
28
+
29
+ # Builds the enum from string
30
+ # @param [String] The enum value in the form of the string
31
+ # @return [String] The enum value
32
+ def self.build_from_hash(value)
33
+ new.build_from_hash(value)
34
+ end
35
+
36
+ # Builds the enum from string
37
+ # @param [String] The enum value in the form of the string
38
+ # @return [String] The enum value
39
+ def build_from_hash(value)
40
+ # Only responses are built from hashes, and a value added to the API after this client was released is kept as it
41
+ # is: the constants are the values this client knows
42
+ value
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,43 @@
1
+ =begin
2
+ #DocSpring API
3
+
4
+ #Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
5
+
6
+ The version of the OpenAPI document: v2
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0-DOCSPRING
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DocSpring
17
+ class SupportTicketStatus
18
+ OPEN = "open".freeze
19
+ NEEDS_REPLY = "needs_reply".freeze
20
+ RESOLVED = "resolved".freeze
21
+ CLOSED = "closed".freeze
22
+
23
+ def self.all_vars
24
+ @all_vars ||= [OPEN, NEEDS_REPLY, RESOLVED, CLOSED].freeze
25
+ end
26
+
27
+ # Builds the enum from string
28
+ # @param [String] The enum value in the form of the string
29
+ # @return [String] The enum value
30
+ def self.build_from_hash(value)
31
+ new.build_from_hash(value)
32
+ end
33
+
34
+ # Builds the enum from string
35
+ # @param [String] The enum value in the form of the string
36
+ # @return [String] The enum value
37
+ def build_from_hash(value)
38
+ # Only responses are built from hashes, and a value added to the API after this client was released is kept as it
39
+ # is: the constants are the values this client knows
40
+ value
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,239 @@
1
+ =begin
2
+ #DocSpring API
3
+
4
+ #Use DocSpring's API to fill PDF forms, generate PDFs and Word documents from HTML or Word templates, merge PDFs, and request legally binding e-signatures.
5
+
6
+ The version of the OpenAPI document: v2
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.26.0-DOCSPRING
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module DocSpring
17
+ # How a script can wait for a support ticket to change.
18
+ class SupportTicketWatch < ApiModelBase
19
+ # The ticket's `watch_url`.
20
+ attr_accessor :url
21
+
22
+ # Poll no more often than this.
23
+ attr_accessor :min_interval_seconds
24
+
25
+ # What to do with the URL, in a sentence for an AI agent to act on.
26
+ attr_accessor :how
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'url' => :'url',
32
+ :'min_interval_seconds' => :'min_interval_seconds',
33
+ :'how' => :'how'
34
+ }
35
+ end
36
+
37
+ # Returns attribute mapping this model knows about
38
+ def self.acceptable_attribute_map
39
+ attribute_map
40
+ end
41
+
42
+ # Returns all the JSON keys this model knows about
43
+ def self.acceptable_attributes
44
+ acceptable_attribute_map.values
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'url' => :'String',
51
+ :'min_interval_seconds' => :'Integer',
52
+ :'how' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Returns attribute type mapping
63
+ def self.acceptable_openapi_types
64
+ openapi_types
65
+ end
66
+
67
+ # Returns the nullable attributes
68
+ def self.acceptable_openapi_nullable
69
+ openapi_nullable
70
+ end
71
+
72
+ # Initializes the object
73
+ # @param [Hash] attributes Model attributes in the form of hash
74
+ def initialize(attributes = {})
75
+ if (!attributes.is_a?(Hash))
76
+ fail ArgumentError, "The input argument (attributes) must be a hash in `DocSpring::SupportTicketWatch` initialize method"
77
+ end
78
+
79
+ # check to see if the attribute exists and convert string to symbol for hash key
80
+ acceptable_attribute_map = self.class.acceptable_attribute_map
81
+ attributes = attributes.each_with_object({}) { |(k, v), h|
82
+ if (!acceptable_attribute_map.key?(k.to_sym))
83
+ fail ArgumentError, "`#{k}` is not a valid attribute in `DocSpring::SupportTicketWatch`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
84
+ end
85
+ h[k.to_sym] = v
86
+ }
87
+
88
+ if attributes.key?(:'url')
89
+ self.url = attributes[:'url']
90
+ else
91
+ self.url = nil
92
+ end
93
+
94
+ if attributes.key?(:'min_interval_seconds')
95
+ self.min_interval_seconds = attributes[:'min_interval_seconds']
96
+ else
97
+ self.min_interval_seconds = nil
98
+ end
99
+
100
+ if attributes.key?(:'how')
101
+ self.how = attributes[:'how']
102
+ else
103
+ self.how = nil
104
+ end
105
+ end
106
+
107
+ # Show invalid properties with the reasons. Usually used together with valid?
108
+ # @return Array for valid properties with the reasons
109
+ def list_invalid_properties
110
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
111
+ invalid_properties = Array.new
112
+ if @url.nil?
113
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
114
+ end
115
+
116
+ if @min_interval_seconds.nil?
117
+ invalid_properties.push('invalid value for "min_interval_seconds", min_interval_seconds cannot be nil.')
118
+ end
119
+
120
+ if @how.nil?
121
+ invalid_properties.push('invalid value for "how", how cannot be nil.')
122
+ end
123
+
124
+ invalid_properties
125
+ end
126
+
127
+ # Check to see if the all the properties in the model are valid
128
+ # @return true if the model is valid
129
+ def valid?
130
+ warn '[DEPRECATED] the `valid?` method is obsolete'
131
+ return false if @url.nil?
132
+ return false if @min_interval_seconds.nil?
133
+ return false if @how.nil?
134
+ true
135
+ end
136
+
137
+ # Custom attribute writer method with validation
138
+ # @param [Object] url Value to be assigned
139
+ def url=(url)
140
+ if url.nil?
141
+ fail ArgumentError, 'url cannot be nil'
142
+ end
143
+
144
+ @url = url
145
+ end
146
+
147
+ # Custom attribute writer method with validation
148
+ # @param [Object] min_interval_seconds Value to be assigned
149
+ def min_interval_seconds=(min_interval_seconds)
150
+ if min_interval_seconds.nil?
151
+ fail ArgumentError, 'min_interval_seconds cannot be nil'
152
+ end
153
+
154
+ @min_interval_seconds = min_interval_seconds
155
+ end
156
+
157
+ # Custom attribute writer method with validation
158
+ # @param [Object] how Value to be assigned
159
+ def how=(how)
160
+ if how.nil?
161
+ fail ArgumentError, 'how cannot be nil'
162
+ end
163
+
164
+ @how = how
165
+ end
166
+
167
+ # Checks equality by comparing each attribute.
168
+ # @param [Object] Object to be compared
169
+ def ==(o)
170
+ return true if self.equal?(o)
171
+ self.class == o.class &&
172
+ url == o.url &&
173
+ min_interval_seconds == o.min_interval_seconds &&
174
+ how == o.how
175
+ end
176
+
177
+ # @see the `==` method
178
+ # @param [Object] Object to be compared
179
+ def eql?(o)
180
+ self == o
181
+ end
182
+
183
+ # Calculates hash code according to all attributes.
184
+ # @return [Integer] Hash code
185
+ def hash
186
+ [url, min_interval_seconds, how].hash
187
+ end
188
+
189
+ # Builds the object from hash
190
+ # @param [Hash] attributes Model attributes in the form of hash
191
+ # @return [Object] Returns the model itself
192
+ def self.build_from_hash(attributes)
193
+ return nil unless attributes.is_a?(Hash)
194
+ attributes = attributes.transform_keys(&:to_sym)
195
+ # include attributes inherited from allOf parents (the nearest declaration wins)
196
+ map = acceptable_attribute_map
197
+ transformed_hash = {}
198
+ acceptable_openapi_types.each_pair do |key, type|
199
+ if attributes.key?(map[key]) && attributes[map[key]].nil?
200
+ transformed_hash["#{key}"] = nil
201
+ elsif type =~ /\AArray<(.*)>/i
202
+ # check to ensure the input is an array given that the attribute
203
+ # is documented as an array but the input is not
204
+ if attributes[map[key]].is_a?(Array)
205
+ transformed_hash["#{key}"] = attributes[map[key]].map { |v| _deserialize($1, v) }
206
+ end
207
+ elsif !attributes[map[key]].nil?
208
+ transformed_hash["#{key}"] = _deserialize(type, attributes[map[key]])
209
+ end
210
+ end
211
+ # Responses can include enum values added after this client was released, so the enum setters
212
+ # accept any value while the model is built from a response
213
+ allocate.tap do |model|
214
+ model.instance_variable_set(:@_skip_enum_validation, true)
215
+ model.send(:initialize, transformed_hash)
216
+ model.remove_instance_variable(:@_skip_enum_validation)
217
+ end
218
+ end
219
+
220
+ # Returns the object in the form of hash
221
+ # @return [Hash] Returns the object in the form of hash
222
+ def to_hash
223
+ hash = {}
224
+ # include attributes inherited from allOf parents (the nearest declaration wins)
225
+ self.class.acceptable_attribute_map.each_pair do |attr, param|
226
+ value = self.send(attr)
227
+ if value.nil?
228
+ is_nullable = self.class.acceptable_openapi_nullable.include?(attr)
229
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
230
+ end
231
+
232
+ hash[param] = _to_hash(value)
233
+ end
234
+ hash
235
+ end
236
+
237
+ end
238
+
239
+ end