ultracart_api 3.10.184 → 3.10.185

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +80 -4
  3. data/docs/ConversationApi.md +2466 -340
  4. data/docs/ConversationPbxAgent.md +16 -0
  5. data/docs/ConversationPbxAgentResponse.md +12 -0
  6. data/docs/ConversationPbxAgentsResponse.md +12 -0
  7. data/docs/ConversationPbxAudio.md +16 -0
  8. data/docs/ConversationPbxAudioResponse.md +12 -0
  9. data/docs/ConversationPbxAudiosResponse.md +12 -0
  10. data/docs/ConversationPbxCustomerSnapshotRequest.md +15 -0
  11. data/docs/ConversationPbxCustomerSnapshotResponse.md +14 -0
  12. data/docs/ConversationPbxMenu.md +17 -0
  13. data/docs/ConversationPbxMenuMapping.md +11 -0
  14. data/docs/ConversationPbxMenuResponse.md +12 -0
  15. data/docs/ConversationPbxMenusResponse.md +12 -0
  16. data/docs/ConversationPbxPhoneNumber.md +12 -0
  17. data/docs/ConversationPbxPhoneNumberResponse.md +12 -0
  18. data/docs/ConversationPbxPhoneNumbersResponse.md +12 -0
  19. data/docs/ConversationPbxQueue.md +25 -0
  20. data/docs/ConversationPbxQueueMembers.md +9 -0
  21. data/docs/ConversationPbxQueueResponse.md +12 -0
  22. data/docs/ConversationPbxQueuesResponse.md +12 -0
  23. data/docs/ConversationPbxTimeBased.md +11 -0
  24. data/docs/ConversationPbxTimeBasedMapping.md +11 -0
  25. data/docs/ConversationPbxTimeBasedMappingConfig.md +9 -0
  26. data/docs/ConversationPbxTimeBasedResponse.md +12 -0
  27. data/docs/ConversationPbxTimeBasedsResponse.md +12 -0
  28. data/docs/ConversationPbxTimeRange.md +12 -0
  29. data/docs/ConversationPbxTimeRangeConfig.md +13 -0
  30. data/docs/ConversationPbxTimeRangeResponse.md +12 -0
  31. data/docs/ConversationPbxTimeRangesResponse.md +12 -0
  32. data/docs/ConversationPbxVoicemailMailbox.md +18 -0
  33. data/docs/ConversationPbxVoicemailMailboxResponse.md +12 -0
  34. data/docs/ConversationPbxVoicemailMailboxesResponse.md +12 -0
  35. data/docs/WorkflowApi.md +46 -0
  36. data/docs/WorkflowTaskTagsResponse.md +12 -0
  37. data/lib/ultracart_api/api/conversation_api.rb +2919 -609
  38. data/lib/ultracart_api/api/workflow_api.rb +49 -0
  39. data/lib/ultracart_api/models/conversation_pbx_agent.rb +325 -0
  40. data/lib/ultracart_api/models/conversation_pbx_agent_response.rb +221 -0
  41. data/lib/ultracart_api/models/conversation_pbx_agents_response.rb +223 -0
  42. data/lib/ultracart_api/models/conversation_pbx_audio.rb +355 -0
  43. data/lib/ultracart_api/models/conversation_pbx_audio_response.rb +221 -0
  44. data/lib/ultracart_api/models/conversation_pbx_audios_response.rb +223 -0
  45. data/lib/ultracart_api/models/conversation_pbx_customer_snapshot_request.rb +248 -0
  46. data/lib/ultracart_api/models/conversation_pbx_customer_snapshot_response.rb +243 -0
  47. data/lib/ultracart_api/models/conversation_pbx_menu.rb +367 -0
  48. data/lib/ultracart_api/models/conversation_pbx_menu_mapping.rb +215 -0
  49. data/lib/ultracart_api/models/conversation_pbx_menu_response.rb +221 -0
  50. data/lib/ultracart_api/models/conversation_pbx_menus_response.rb +223 -0
  51. data/lib/ultracart_api/models/conversation_pbx_phone_number.rb +300 -0
  52. data/lib/ultracart_api/models/conversation_pbx_phone_number_response.rb +221 -0
  53. data/lib/ultracart_api/models/conversation_pbx_phone_numbers_response.rb +223 -0
  54. data/lib/ultracart_api/models/conversation_pbx_queue.rb +504 -0
  55. data/lib/ultracart_api/models/conversation_pbx_queue_members.rb +197 -0
  56. data/lib/ultracart_api/models/conversation_pbx_queue_response.rb +221 -0
  57. data/lib/ultracart_api/models/conversation_pbx_queues_response.rb +223 -0
  58. data/lib/ultracart_api/models/conversation_pbx_time_based.rb +211 -0
  59. data/lib/ultracart_api/models/conversation_pbx_time_based_mapping.rb +275 -0
  60. data/lib/ultracart_api/models/conversation_pbx_time_based_mapping_config.rb +196 -0
  61. data/lib/ultracart_api/models/conversation_pbx_time_based_response.rb +221 -0
  62. data/lib/ultracart_api/models/conversation_pbx_time_baseds_response.rb +223 -0
  63. data/lib/ultracart_api/models/conversation_pbx_time_range.rb +287 -0
  64. data/lib/ultracart_api/models/conversation_pbx_time_range_config.rb +235 -0
  65. data/lib/ultracart_api/models/conversation_pbx_time_range_response.rb +221 -0
  66. data/lib/ultracart_api/models/conversation_pbx_time_ranges_response.rb +223 -0
  67. data/lib/ultracart_api/models/conversation_pbx_voicemail_mailbox.rb +405 -0
  68. data/lib/ultracart_api/models/conversation_pbx_voicemail_mailbox_response.rb +221 -0
  69. data/lib/ultracart_api/models/conversation_pbx_voicemail_mailboxes_response.rb +223 -0
  70. data/lib/ultracart_api/models/workflow_task_tags_response.rb +224 -0
  71. data/lib/ultracart_api/version.rb +1 -1
  72. data/lib/ultracart_api.rb +32 -0
  73. metadata +66 -2
@@ -0,0 +1,223 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module UltracartClient
16
+ class ConversationPbxTimeBasedsResponse
17
+ attr_accessor :error
18
+
19
+ attr_accessor :metadata
20
+
21
+ # Indicates if API call was successful
22
+ attr_accessor :success
23
+
24
+ attr_accessor :time_baseds
25
+
26
+ attr_accessor :warning
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'error' => :'error',
32
+ :'metadata' => :'metadata',
33
+ :'success' => :'success',
34
+ :'time_baseds' => :'timeBaseds',
35
+ :'warning' => :'warning'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.swagger_types
41
+ {
42
+ :'error' => :'Error',
43
+ :'metadata' => :'ResponseMetadata',
44
+ :'success' => :'BOOLEAN',
45
+ :'time_baseds' => :'Array<ConversationPbxTimeBased>',
46
+ :'warning' => :'Warning'
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ return unless attributes.is_a?(Hash)
54
+
55
+ # convert string to symbol for hash key
56
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
57
+
58
+ if attributes.has_key?(:'error')
59
+ self.error = attributes[:'error']
60
+ end
61
+
62
+ if attributes.has_key?(:'metadata')
63
+ self.metadata = attributes[:'metadata']
64
+ end
65
+
66
+ if attributes.has_key?(:'success')
67
+ self.success = attributes[:'success']
68
+ end
69
+
70
+ if attributes.has_key?(:'timeBaseds')
71
+ if (value = attributes[:'timeBaseds']).is_a?(Array)
72
+ self.time_baseds = value
73
+ end
74
+ end
75
+
76
+ if attributes.has_key?(:'warning')
77
+ self.warning = attributes[:'warning']
78
+ end
79
+ end
80
+
81
+ # Show invalid properties with the reasons. Usually used together with valid?
82
+ # @return Array for valid properties with the reasons
83
+ def list_invalid_properties
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
+ 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
+ error == o.error &&
100
+ metadata == o.metadata &&
101
+ success == o.success &&
102
+ time_baseds == o.time_baseds &&
103
+ warning == o.warning
104
+ end
105
+
106
+ # @see the `==` method
107
+ # @param [Object] Object to be compared
108
+ def eql?(o)
109
+ self == o
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Fixnum] Hash code
114
+ def hash
115
+ [error, metadata, success, time_baseds, warning].hash
116
+ end
117
+
118
+ # Builds the object from hash
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ # @return [Object] Returns the model itself
121
+ def build_from_hash(attributes)
122
+ return nil unless attributes.is_a?(Hash)
123
+ self.class.swagger_types.each_pair do |key, type|
124
+ if type =~ /\AArray<(.*)>/i
125
+ # check to ensure the input is an array given that the attribute
126
+ # is documented as an array but the input is not
127
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
128
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
129
+ end
130
+ elsif !attributes[self.class.attribute_map[key]].nil?
131
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
132
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
133
+ end
134
+
135
+ self
136
+ end
137
+
138
+ # Deserializes the data based on type
139
+ # @param string type Data type
140
+ # @param string value Value to be deserialized
141
+ # @return [Object] Deserialized data
142
+ def _deserialize(type, value)
143
+ case type.to_sym
144
+ when :DateTime
145
+ DateTime.parse(value)
146
+ when :Date
147
+ Date.parse(value)
148
+ when :String
149
+ value.to_s
150
+ when :Integer
151
+ value.to_i
152
+ when :Float
153
+ value.to_f
154
+ when :BOOLEAN
155
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
156
+ true
157
+ else
158
+ false
159
+ end
160
+ when :Object
161
+ # generic object (usually a Hash), return directly
162
+ value
163
+ when /\AArray<(?<inner_type>.+)>\z/
164
+ inner_type = Regexp.last_match[:inner_type]
165
+ value.map { |v| _deserialize(inner_type, v) }
166
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
167
+ k_type = Regexp.last_match[:k_type]
168
+ v_type = Regexp.last_match[:v_type]
169
+ {}.tap do |hash|
170
+ value.each do |k, v|
171
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
172
+ end
173
+ end
174
+ else # model
175
+ temp_model = UltracartClient.const_get(type).new
176
+ temp_model.build_from_hash(value)
177
+ end
178
+ end
179
+
180
+ # Returns the string representation of the object
181
+ # @return [String] String presentation of the object
182
+ def to_s
183
+ to_hash.to_s
184
+ end
185
+
186
+ # to_body is an alias to to_hash (backward compatibility)
187
+ # @return [Hash] Returns the object in the form of hash
188
+ def to_body
189
+ to_hash
190
+ end
191
+
192
+ # Returns the object in the form of hash
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_hash
195
+ hash = {}
196
+ self.class.attribute_map.each_pair do |attr, param|
197
+ value = self.send(attr)
198
+ next if value.nil?
199
+ hash[param] = _to_hash(value)
200
+ end
201
+ hash
202
+ end
203
+
204
+ # Outputs non-array value in the form of hash
205
+ # For object, use to_hash. Otherwise, just return the value
206
+ # @param [Object] value Any valid value
207
+ # @return [Hash] Returns the value in the form of hash
208
+ def _to_hash(value)
209
+ if value.is_a?(Array)
210
+ value.compact.map { |v| _to_hash(v) }
211
+ elsif value.is_a?(Hash)
212
+ {}.tap do |hash|
213
+ value.each { |k, v| hash[k] = _to_hash(v) }
214
+ end
215
+ elsif value.respond_to? :to_hash
216
+ value.to_hash
217
+ else
218
+ value
219
+ end
220
+ end
221
+
222
+ end
223
+ end
@@ -0,0 +1,287 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module UltracartClient
16
+ class ConversationPbxTimeRange
17
+ # Configurations for all ranges in this time range
18
+ attr_accessor :configs
19
+
20
+ # Conversation Pbx Time Range UUID
21
+ attr_accessor :conversation_pbx_time_range_uuid
22
+
23
+ # Merchant Id
24
+ attr_accessor :merchant_id
25
+
26
+ # Time range name
27
+ attr_accessor :time_range_name
28
+
29
+ # Timezone
30
+ attr_accessor :timezone
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'configs' => :'configs',
36
+ :'conversation_pbx_time_range_uuid' => :'conversation_pbx_time_range_uuid',
37
+ :'merchant_id' => :'merchant_id',
38
+ :'time_range_name' => :'time_range_name',
39
+ :'timezone' => :'timezone'
40
+ }
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.swagger_types
45
+ {
46
+ :'configs' => :'Array<ConversationPbxTimeRangeConfig>',
47
+ :'conversation_pbx_time_range_uuid' => :'String',
48
+ :'merchant_id' => :'String',
49
+ :'time_range_name' => :'String',
50
+ :'timezone' => :'String'
51
+ }
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ return unless attributes.is_a?(Hash)
58
+
59
+ # convert string to symbol for hash key
60
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
61
+
62
+ if attributes.has_key?(:'configs')
63
+ if (value = attributes[:'configs']).is_a?(Array)
64
+ self.configs = value
65
+ end
66
+ end
67
+
68
+ if attributes.has_key?(:'conversation_pbx_time_range_uuid')
69
+ self.conversation_pbx_time_range_uuid = attributes[:'conversation_pbx_time_range_uuid']
70
+ end
71
+
72
+ if attributes.has_key?(:'merchant_id')
73
+ self.merchant_id = attributes[:'merchant_id']
74
+ end
75
+
76
+ if attributes.has_key?(:'time_range_name')
77
+ self.time_range_name = attributes[:'time_range_name']
78
+ end
79
+
80
+ if attributes.has_key?(:'timezone')
81
+ self.timezone = attributes[:'timezone']
82
+ end
83
+ end
84
+
85
+ # Show invalid properties with the reasons. Usually used together with valid?
86
+ # @return Array for valid properties with the reasons
87
+ def list_invalid_properties
88
+ invalid_properties = Array.new
89
+ if !@conversation_pbx_time_range_uuid.nil? && @conversation_pbx_time_range_uuid.to_s.length > 50
90
+ invalid_properties.push('invalid value for "conversation_pbx_time_range_uuid", the character length must be smaller than or equal to 50.')
91
+ end
92
+
93
+ if !@merchant_id.nil? && @merchant_id.to_s.length > 5
94
+ invalid_properties.push('invalid value for "merchant_id", the character length must be smaller than or equal to 5.')
95
+ end
96
+
97
+ if !@time_range_name.nil? && @time_range_name.to_s.length > 50
98
+ invalid_properties.push('invalid value for "time_range_name", the character length must be smaller than or equal to 50.')
99
+ end
100
+
101
+ if !@timezone.nil? && @timezone.to_s.length > 100
102
+ invalid_properties.push('invalid value for "timezone", the character length must be smaller than or equal to 100.')
103
+ end
104
+
105
+ invalid_properties
106
+ end
107
+
108
+ # Check to see if the all the properties in the model are valid
109
+ # @return true if the model is valid
110
+ def valid?
111
+ return false if !@conversation_pbx_time_range_uuid.nil? && @conversation_pbx_time_range_uuid.to_s.length > 50
112
+ return false if !@merchant_id.nil? && @merchant_id.to_s.length > 5
113
+ return false if !@time_range_name.nil? && @time_range_name.to_s.length > 50
114
+ return false if !@timezone.nil? && @timezone.to_s.length > 100
115
+ true
116
+ end
117
+
118
+ # Custom attribute writer method with validation
119
+ # @param [Object] conversation_pbx_time_range_uuid Value to be assigned
120
+ def conversation_pbx_time_range_uuid=(conversation_pbx_time_range_uuid)
121
+ if !conversation_pbx_time_range_uuid.nil? && conversation_pbx_time_range_uuid.to_s.length > 50
122
+ fail ArgumentError, 'invalid value for "conversation_pbx_time_range_uuid", the character length must be smaller than or equal to 50.'
123
+ end
124
+
125
+ @conversation_pbx_time_range_uuid = conversation_pbx_time_range_uuid
126
+ end
127
+
128
+ # Custom attribute writer method with validation
129
+ # @param [Object] merchant_id Value to be assigned
130
+ def merchant_id=(merchant_id)
131
+ if !merchant_id.nil? && merchant_id.to_s.length > 5
132
+ fail ArgumentError, 'invalid value for "merchant_id", the character length must be smaller than or equal to 5.'
133
+ end
134
+
135
+ @merchant_id = merchant_id
136
+ end
137
+
138
+ # Custom attribute writer method with validation
139
+ # @param [Object] time_range_name Value to be assigned
140
+ def time_range_name=(time_range_name)
141
+ if !time_range_name.nil? && time_range_name.to_s.length > 50
142
+ fail ArgumentError, 'invalid value for "time_range_name", the character length must be smaller than or equal to 50.'
143
+ end
144
+
145
+ @time_range_name = time_range_name
146
+ end
147
+
148
+ # Custom attribute writer method with validation
149
+ # @param [Object] timezone Value to be assigned
150
+ def timezone=(timezone)
151
+ if !timezone.nil? && timezone.to_s.length > 100
152
+ fail ArgumentError, 'invalid value for "timezone", the character length must be smaller than or equal to 100.'
153
+ end
154
+
155
+ @timezone = timezone
156
+ end
157
+
158
+ # Checks equality by comparing each attribute.
159
+ # @param [Object] Object to be compared
160
+ def ==(o)
161
+ return true if self.equal?(o)
162
+ self.class == o.class &&
163
+ configs == o.configs &&
164
+ conversation_pbx_time_range_uuid == o.conversation_pbx_time_range_uuid &&
165
+ merchant_id == o.merchant_id &&
166
+ time_range_name == o.time_range_name &&
167
+ timezone == o.timezone
168
+ end
169
+
170
+ # @see the `==` method
171
+ # @param [Object] Object to be compared
172
+ def eql?(o)
173
+ self == o
174
+ end
175
+
176
+ # Calculates hash code according to all attributes.
177
+ # @return [Fixnum] Hash code
178
+ def hash
179
+ [configs, conversation_pbx_time_range_uuid, merchant_id, time_range_name, timezone].hash
180
+ end
181
+
182
+ # Builds the object from hash
183
+ # @param [Hash] attributes Model attributes in the form of hash
184
+ # @return [Object] Returns the model itself
185
+ def build_from_hash(attributes)
186
+ return nil unless attributes.is_a?(Hash)
187
+ self.class.swagger_types.each_pair do |key, type|
188
+ if type =~ /\AArray<(.*)>/i
189
+ # check to ensure the input is an array given that the attribute
190
+ # is documented as an array but the input is not
191
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
192
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
193
+ end
194
+ elsif !attributes[self.class.attribute_map[key]].nil?
195
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
196
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
197
+ end
198
+
199
+ self
200
+ end
201
+
202
+ # Deserializes the data based on type
203
+ # @param string type Data type
204
+ # @param string value Value to be deserialized
205
+ # @return [Object] Deserialized data
206
+ def _deserialize(type, value)
207
+ case type.to_sym
208
+ when :DateTime
209
+ DateTime.parse(value)
210
+ when :Date
211
+ Date.parse(value)
212
+ when :String
213
+ value.to_s
214
+ when :Integer
215
+ value.to_i
216
+ when :Float
217
+ value.to_f
218
+ when :BOOLEAN
219
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
220
+ true
221
+ else
222
+ false
223
+ end
224
+ when :Object
225
+ # generic object (usually a Hash), return directly
226
+ value
227
+ when /\AArray<(?<inner_type>.+)>\z/
228
+ inner_type = Regexp.last_match[:inner_type]
229
+ value.map { |v| _deserialize(inner_type, v) }
230
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
231
+ k_type = Regexp.last_match[:k_type]
232
+ v_type = Regexp.last_match[:v_type]
233
+ {}.tap do |hash|
234
+ value.each do |k, v|
235
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
236
+ end
237
+ end
238
+ else # model
239
+ temp_model = UltracartClient.const_get(type).new
240
+ temp_model.build_from_hash(value)
241
+ end
242
+ end
243
+
244
+ # Returns the string representation of the object
245
+ # @return [String] String presentation of the object
246
+ def to_s
247
+ to_hash.to_s
248
+ end
249
+
250
+ # to_body is an alias to to_hash (backward compatibility)
251
+ # @return [Hash] Returns the object in the form of hash
252
+ def to_body
253
+ to_hash
254
+ end
255
+
256
+ # Returns the object in the form of hash
257
+ # @return [Hash] Returns the object in the form of hash
258
+ def to_hash
259
+ hash = {}
260
+ self.class.attribute_map.each_pair do |attr, param|
261
+ value = self.send(attr)
262
+ next if value.nil?
263
+ hash[param] = _to_hash(value)
264
+ end
265
+ hash
266
+ end
267
+
268
+ # Outputs non-array value in the form of hash
269
+ # For object, use to_hash. Otherwise, just return the value
270
+ # @param [Object] value Any valid value
271
+ # @return [Hash] Returns the value in the form of hash
272
+ def _to_hash(value)
273
+ if value.is_a?(Array)
274
+ value.compact.map { |v| _to_hash(v) }
275
+ elsif value.is_a?(Hash)
276
+ {}.tap do |hash|
277
+ value.each { |k, v| hash[k] = _to_hash(v) }
278
+ end
279
+ elsif value.respond_to? :to_hash
280
+ value.to_hash
281
+ else
282
+ value
283
+ end
284
+ end
285
+
286
+ end
287
+ end