ultracart_api 3.10.195 → 3.10.197

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 180f19e98db8a2b18892bc467f44178c2aa4874fb0257b74892c7a130771e4c4
4
- data.tar.gz: 3204ba2a2cc0123e6ffb51e836af104c91dcee98fc518cb4f31ec00bc10876ca
3
+ metadata.gz: c1519448a2581646c1df92149e1448ae75f3b72230a89d0ba5eac03a7c37fb4d
4
+ data.tar.gz: 9f47e4439c01751013389cfcdad0c617fbac28ea900b9b041d0645e3338d7b0b
5
5
  SHA512:
6
- metadata.gz: b719e09c3bd22fa9fd2f6bc45b38b04d801bd97625fa05a62ae503573763bb4ef96efbf5d6939eb84dd786c77ade21089142fb70580212182376e6dfc591bc1a
7
- data.tar.gz: c4ed5680fff632fb7e68fee8ea2dd986f15951780498e455318549aa5a98437f2047bd1a1e02febb127f657825cc33c5fe551699920b28d3b1082ba87f5c8daf
6
+ metadata.gz: 706698fe8f099dad4c01ac6f849f0a14858f3b1dd93be73aa75442083767f6958d4a6b3fbb18606b372a009564e1472f890bdcc5cb31e6d50dfb52154c94d370
7
+ data.tar.gz: c68f10c2ba06208aabc682dc2d9045818c98007f1d25d3a26e3a3c2f623057827f1106292b663686ffdff1597f2d4910d0fd0d0a931ed6408963dca3fc74fea6
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
7
7
  This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 3.10.195
10
+ - Package version: 3.10.197
11
11
  - Build package: io.swagger.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
13
13
 
@@ -24,15 +24,15 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-3.10.195.gem
27
+ gem install ./ultracart_api-3.10.197.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.10.195.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./ultracart_api-3.10.197.gem` to install the development dependencies)
30
30
 
31
31
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
32
32
 
33
33
  Finally add this to the Gemfile:
34
34
 
35
- gem 'ultracart_api', '~> 3.10.195'
35
+ gem 'ultracart_api', '~> 3.10.197'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -171,6 +171,7 @@ Class | Method | HTTP request | Description
171
171
  *UltracartClient::ConversationApi* | [**get_pbx_agent_voicemails**](docs/ConversationApi.md#get_pbx_agent_voicemails) | **GET** /conversation/pbx/agent/voicemails | Get Agent Voicemails
172
172
  *UltracartClient::ConversationApi* | [**get_pbx_agents**](docs/ConversationApi.md#get_pbx_agents) | **GET** /conversation/pbx/agent | Get pbx agents
173
173
  *UltracartClient::ConversationApi* | [**get_pbx_audio**](docs/ConversationApi.md#get_pbx_audio) | **GET** /conversation/pbx/audio/{conversationPbxAudioUuid} | Get pbx audio
174
+ *UltracartClient::ConversationApi* | [**get_pbx_audio_usage**](docs/ConversationApi.md#get_pbx_audio_usage) | **GET** /conversation/pbx/audio/{conversationPbxAudioUuid}/usage | Get pbx audio usage
174
175
  *UltracartClient::ConversationApi* | [**get_pbx_audios**](docs/ConversationApi.md#get_pbx_audios) | **GET** /conversation/pbx/audio | Get pbx audios
175
176
  *UltracartClient::ConversationApi* | [**get_pbx_menu**](docs/ConversationApi.md#get_pbx_menu) | **GET** /conversation/pbx/menu/{conversationPbxMenuUuid} | Get pbx menu
176
177
  *UltracartClient::ConversationApi* | [**get_pbx_menus**](docs/ConversationApi.md#get_pbx_menus) | **GET** /conversation/pbx/menu | Get pbx menus
@@ -760,6 +761,7 @@ Class | Method | HTTP request | Description
760
761
  - [UltracartClient::ConversationPbxAudioResponse](docs/ConversationPbxAudioResponse.md)
761
762
  - [UltracartClient::ConversationPbxAudioUploadUrl](docs/ConversationPbxAudioUploadUrl.md)
762
763
  - [UltracartClient::ConversationPbxAudioUploadUrlResponse](docs/ConversationPbxAudioUploadUrlResponse.md)
764
+ - [UltracartClient::ConversationPbxAudioUsageResponse](docs/ConversationPbxAudioUsageResponse.md)
763
765
  - [UltracartClient::ConversationPbxAudiosResponse](docs/ConversationPbxAudiosResponse.md)
764
766
  - [UltracartClient::ConversationPbxCustomerSnapshotRequest](docs/ConversationPbxCustomerSnapshotRequest.md)
765
767
  - [UltracartClient::ConversationPbxCustomerSnapshotResponse](docs/ConversationPbxCustomerSnapshotResponse.md)
@@ -1503,6 +1505,8 @@ Not every change is committed to every SDK.
1503
1505
 
1504
1506
  | Version | Date | Comments |
1505
1507
  | --: | :-: | --- |
1508
+ | 3.10.197 | 05/02/2024 | conversation - new method to load pbx audio usage |
1509
+ | 3.10.196 | 05/02/2024 | autoorder - fields to record merge association and tstamp |
1506
1510
  | 3.10.195 | 05/01/2024 | getConversationPbxAudioUploadUrl - fix the response obj def |
1507
1511
  | 3.10.194 | 04/24/2024 | esp - add fields for external generation on email |
1508
1512
  | 3.10.193 | 04/04/2024 | AutoOrder.calculated_next_shipment_dts |
data/docs/AutoOrder.md CHANGED
@@ -21,6 +21,8 @@ Name | Type | Description | Notes
21
21
  **logs** | [**Array<AutoOrderLog>**](AutoOrderLog.md) | Logs associated with this auto order | [optional]
22
22
  **management** | [**AutoOrderManagement**](AutoOrderManagement.md) | | [optional]
23
23
  **merchant_id** | **String** | UltraCart merchant ID owning this order | [optional]
24
+ **merged_dts** | **String** | The date/time the auto order was merged into another auto order | [optional]
25
+ **merged_into_auto_order_oid** | **Integer** | The auto order that this auto order was merged into | [optional]
24
26
  **next_attempt** | **String** | The next time that the auto order will be attempted for processing | [optional]
25
27
  **original_order** | [**Order**](Order.md) | | [optional]
26
28
  **original_order_id** | **String** | The original order id that this auto order is associated with. | [optional]
@@ -42,6 +42,7 @@ Method | HTTP request | Description
42
42
  [**get_pbx_agent_voicemails**](ConversationApi.md#get_pbx_agent_voicemails) | **GET** /conversation/pbx/agent/voicemails | Get Agent Voicemails
43
43
  [**get_pbx_agents**](ConversationApi.md#get_pbx_agents) | **GET** /conversation/pbx/agent | Get pbx agents
44
44
  [**get_pbx_audio**](ConversationApi.md#get_pbx_audio) | **GET** /conversation/pbx/audio/{conversationPbxAudioUuid} | Get pbx audio
45
+ [**get_pbx_audio_usage**](ConversationApi.md#get_pbx_audio_usage) | **GET** /conversation/pbx/audio/{conversationPbxAudioUuid}/usage | Get pbx audio usage
45
46
  [**get_pbx_audios**](ConversationApi.md#get_pbx_audios) | **GET** /conversation/pbx/audio | Get pbx audios
46
47
  [**get_pbx_menu**](ConversationApi.md#get_pbx_menu) | **GET** /conversation/pbx/menu/{conversationPbxMenuUuid} | Get pbx menu
47
48
  [**get_pbx_menus**](ConversationApi.md#get_pbx_menus) | **GET** /conversation/pbx/menu | Get pbx menus
@@ -1947,6 +1948,56 @@ Name | Type | Description | Notes
1947
1948
 
1948
1949
 
1949
1950
 
1951
+ # **get_pbx_audio_usage**
1952
+ > ConversationPbxAudioUsageResponse get_pbx_audio_usage(conversation_pbx_audio_uuid)
1953
+
1954
+ Get pbx audio usage
1955
+
1956
+ Retrieve a pbx audio usage
1957
+
1958
+ ### Example
1959
+ ```ruby
1960
+ # load the gem
1961
+ require 'ultracart_api'
1962
+
1963
+ # Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
1964
+ simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
1965
+ api_instance = UltracartClient::ConversationApi.new_using_api_key(simple_key, false, false)
1966
+
1967
+
1968
+ conversation_pbx_audio_uuid = 'conversation_pbx_audio_uuid_example' # String |
1969
+
1970
+
1971
+ begin
1972
+ #Get pbx audio usage
1973
+ result = api_instance.get_pbx_audio_usage(conversation_pbx_audio_uuid)
1974
+ p result
1975
+ rescue UltracartClient::ApiError => e
1976
+ puts "Exception when calling ConversationApi->get_pbx_audio_usage: #{e}"
1977
+ end
1978
+ ```
1979
+
1980
+ ### Parameters
1981
+
1982
+ Name | Type | Description | Notes
1983
+ ------------- | ------------- | ------------- | -------------
1984
+ **conversation_pbx_audio_uuid** | **String**| |
1985
+
1986
+ ### Return type
1987
+
1988
+ [**ConversationPbxAudioUsageResponse**](ConversationPbxAudioUsageResponse.md)
1989
+
1990
+ ### Authorization
1991
+
1992
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
1993
+
1994
+ ### HTTP request headers
1995
+
1996
+ - **Content-Type**: application/json
1997
+ - **Accept**: application/json
1998
+
1999
+
2000
+
1950
2001
  # **get_pbx_audios**
1951
2002
  > ConversationPbxAudiosResponse get_pbx_audios
1952
2003
 
@@ -0,0 +1,14 @@
1
+ # UltracartClient::ConversationPbxAudioUsageResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **error** | [**Error**](Error.md) | | [optional]
7
+ **menus** | [**Array<ConversationPbxMenu>**](ConversationPbxMenu.md) | | [optional]
8
+ **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
9
+ **queues** | [**Array<ConversationPbxQueue>**](ConversationPbxQueue.md) | | [optional]
10
+ **success** | **BOOLEAN** | Indicates if API call was successful | [optional]
11
+ **voicemail_mailboxes** | [**Array<ConversationPbxVoicemailMailbox>**](ConversationPbxVoicemailMailbox.md) | | [optional]
12
+ **warning** | [**Warning**](Warning.md) | | [optional]
13
+
14
+
@@ -2068,6 +2068,61 @@ module UltracartClient
2068
2068
  end
2069
2069
  return data, status_code, headers
2070
2070
  end
2071
+ # Get pbx audio usage
2072
+ # Retrieve a pbx audio usage
2073
+ # @param conversation_pbx_audio_uuid
2074
+ # @param [Hash] opts the optional parameters
2075
+ # @return [ConversationPbxAudioUsageResponse]
2076
+ def get_pbx_audio_usage(conversation_pbx_audio_uuid, opts = {})
2077
+ data, _status_code, _headers = get_pbx_audio_usage_with_http_info(conversation_pbx_audio_uuid, opts)
2078
+ data
2079
+ end
2080
+
2081
+ # Get pbx audio usage
2082
+ # Retrieve a pbx audio usage
2083
+ # @param conversation_pbx_audio_uuid
2084
+ # @param [Hash] opts the optional parameters
2085
+ # @return [Array<(ConversationPbxAudioUsageResponse, Fixnum, Hash)>] ConversationPbxAudioUsageResponse data, response status code and response headers
2086
+ def get_pbx_audio_usage_with_http_info(conversation_pbx_audio_uuid, opts = {})
2087
+ if @api_client.config.debugging
2088
+ @api_client.config.logger.debug 'Calling API: ConversationApi.get_pbx_audio_usage ...'
2089
+ end
2090
+ # verify the required parameter 'conversation_pbx_audio_uuid' is set
2091
+ if @api_client.config.client_side_validation && conversation_pbx_audio_uuid.nil?
2092
+ fail ArgumentError, "Missing the required parameter 'conversation_pbx_audio_uuid' when calling ConversationApi.get_pbx_audio_usage"
2093
+ end
2094
+ # resource path
2095
+ local_var_path = '/conversation/pbx/audio/{conversationPbxAudioUuid}/usage'.sub('{' + 'conversationPbxAudioUuid' + '}', conversation_pbx_audio_uuid.to_s)
2096
+
2097
+ # query parameters
2098
+ query_params = {}
2099
+
2100
+ # header parameters
2101
+ header_params = {}
2102
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
2103
+ # HTTP header 'Accept' (if needed)
2104
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2105
+ # HTTP header 'Content-Type'
2106
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2107
+
2108
+ # form parameters
2109
+ form_params = {}
2110
+
2111
+ # http body (model)
2112
+ post_body = nil
2113
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
2114
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
2115
+ :header_params => header_params,
2116
+ :query_params => query_params,
2117
+ :form_params => form_params,
2118
+ :body => post_body,
2119
+ :auth_names => auth_names,
2120
+ :return_type => 'ConversationPbxAudioUsageResponse')
2121
+ if @api_client.config.debugging
2122
+ @api_client.config.logger.debug "API called: ConversationApi#get_pbx_audio_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2123
+ end
2124
+ return data, status_code, headers
2125
+ end
2071
2126
  # Get pbx audios
2072
2127
  # Retrieve pbx audios
2073
2128
  # @param [Hash] opts the optional parameters
@@ -67,6 +67,12 @@ module UltracartClient
67
67
  # UltraCart merchant ID owning this order
68
68
  attr_accessor :merchant_id
69
69
 
70
+ # The date/time the auto order was merged into another auto order
71
+ attr_accessor :merged_dts
72
+
73
+ # The auto order that this auto order was merged into
74
+ attr_accessor :merged_into_auto_order_oid
75
+
70
76
  # The next time that the auto order will be attempted for processing
71
77
  attr_accessor :next_attempt
72
78
 
@@ -130,6 +136,8 @@ module UltracartClient
130
136
  :'logs' => :'logs',
131
137
  :'management' => :'management',
132
138
  :'merchant_id' => :'merchant_id',
139
+ :'merged_dts' => :'merged_dts',
140
+ :'merged_into_auto_order_oid' => :'merged_into_auto_order_oid',
133
141
  :'next_attempt' => :'next_attempt',
134
142
  :'original_order' => :'original_order',
135
143
  :'original_order_id' => :'original_order_id',
@@ -161,6 +169,8 @@ module UltracartClient
161
169
  :'logs' => :'Array<AutoOrderLog>',
162
170
  :'management' => :'AutoOrderManagement',
163
171
  :'merchant_id' => :'String',
172
+ :'merged_dts' => :'String',
173
+ :'merged_into_auto_order_oid' => :'Integer',
164
174
  :'next_attempt' => :'String',
165
175
  :'original_order' => :'Order',
166
176
  :'original_order_id' => :'String',
@@ -257,6 +267,14 @@ module UltracartClient
257
267
  self.merchant_id = attributes[:'merchant_id']
258
268
  end
259
269
 
270
+ if attributes.has_key?(:'merged_dts')
271
+ self.merged_dts = attributes[:'merged_dts']
272
+ end
273
+
274
+ if attributes.has_key?(:'merged_into_auto_order_oid')
275
+ self.merged_into_auto_order_oid = attributes[:'merged_into_auto_order_oid']
276
+ end
277
+
260
278
  if attributes.has_key?(:'next_attempt')
261
279
  self.next_attempt = attributes[:'next_attempt']
262
280
  end
@@ -298,7 +316,7 @@ module UltracartClient
298
316
  # Check to see if the all the properties in the model are valid
299
317
  # @return true if the model is valid
300
318
  def valid?
301
- status_validator = EnumAttributeValidator.new('String', ['active', 'canceled', 'disabled'])
319
+ status_validator = EnumAttributeValidator.new('String', ['active', 'canceled', 'disabled', 'merged'])
302
320
  return false unless status_validator.valid?(@status)
303
321
  true
304
322
  end
@@ -306,7 +324,7 @@ module UltracartClient
306
324
  # Custom attribute writer method checking allowed values (enum).
307
325
  # @param [Object] status Object to be assigned
308
326
  def status=(status)
309
- validator = EnumAttributeValidator.new('String', ['active', 'canceled', 'disabled'])
327
+ validator = EnumAttributeValidator.new('String', ['active', 'canceled', 'disabled', 'merged'])
310
328
  unless validator.valid?(status)
311
329
  fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
312
330
  end
@@ -336,6 +354,8 @@ module UltracartClient
336
354
  logs == o.logs &&
337
355
  management == o.management &&
338
356
  merchant_id == o.merchant_id &&
357
+ merged_dts == o.merged_dts &&
358
+ merged_into_auto_order_oid == o.merged_into_auto_order_oid &&
339
359
  next_attempt == o.next_attempt &&
340
360
  original_order == o.original_order &&
341
361
  original_order_id == o.original_order_id &&
@@ -354,7 +374,7 @@ module UltracartClient
354
374
  # Calculates hash code according to all attributes.
355
375
  # @return [Fixnum] Hash code
356
376
  def hash
357
- [add_ons, auto_order_code, auto_order_oid, cancel_after_next_x_orders, cancel_downgrade, cancel_reason, cancel_upgrade, canceled_by_user, canceled_dts, completed, credit_card_attempt, disabled_dts, enabled, failure_reason, items, logs, management, merchant_id, next_attempt, original_order, original_order_id, override_affiliate_id, rebill_orders, rotating_transaction_gateway_code, status].hash
377
+ [add_ons, auto_order_code, auto_order_oid, cancel_after_next_x_orders, cancel_downgrade, cancel_reason, cancel_upgrade, canceled_by_user, canceled_dts, completed, credit_card_attempt, disabled_dts, enabled, failure_reason, items, logs, management, merchant_id, merged_dts, merged_into_auto_order_oid, next_attempt, original_order, original_order_id, override_affiliate_id, rebill_orders, rotating_transaction_gateway_code, status].hash
358
378
  end
359
379
 
360
380
  # Builds the object from hash
@@ -0,0 +1,245 @@
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 ConversationPbxAudioUsageResponse
17
+ attr_accessor :error
18
+
19
+ attr_accessor :menus
20
+
21
+ attr_accessor :metadata
22
+
23
+ attr_accessor :queues
24
+
25
+ # Indicates if API call was successful
26
+ attr_accessor :success
27
+
28
+ attr_accessor :voicemail_mailboxes
29
+
30
+ attr_accessor :warning
31
+
32
+ # Attribute mapping from ruby-style variable name to JSON key.
33
+ def self.attribute_map
34
+ {
35
+ :'error' => :'error',
36
+ :'menus' => :'menus',
37
+ :'metadata' => :'metadata',
38
+ :'queues' => :'queues',
39
+ :'success' => :'success',
40
+ :'voicemail_mailboxes' => :'voicemail_mailboxes',
41
+ :'warning' => :'warning'
42
+ }
43
+ end
44
+
45
+ # Attribute type mapping.
46
+ def self.swagger_types
47
+ {
48
+ :'error' => :'Error',
49
+ :'menus' => :'Array<ConversationPbxMenu>',
50
+ :'metadata' => :'ResponseMetadata',
51
+ :'queues' => :'Array<ConversationPbxQueue>',
52
+ :'success' => :'BOOLEAN',
53
+ :'voicemail_mailboxes' => :'Array<ConversationPbxVoicemailMailbox>',
54
+ :'warning' => :'Warning'
55
+ }
56
+ end
57
+
58
+ # Initializes the object
59
+ # @param [Hash] attributes Model attributes in the form of hash
60
+ def initialize(attributes = {})
61
+ return unless attributes.is_a?(Hash)
62
+
63
+ # convert string to symbol for hash key
64
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
65
+
66
+ if attributes.has_key?(:'error')
67
+ self.error = attributes[:'error']
68
+ end
69
+
70
+ if attributes.has_key?(:'menus')
71
+ if (value = attributes[:'menus']).is_a?(Array)
72
+ self.menus = value
73
+ end
74
+ end
75
+
76
+ if attributes.has_key?(:'metadata')
77
+ self.metadata = attributes[:'metadata']
78
+ end
79
+
80
+ if attributes.has_key?(:'queues')
81
+ if (value = attributes[:'queues']).is_a?(Array)
82
+ self.queues = value
83
+ end
84
+ end
85
+
86
+ if attributes.has_key?(:'success')
87
+ self.success = attributes[:'success']
88
+ end
89
+
90
+ if attributes.has_key?(:'voicemail_mailboxes')
91
+ if (value = attributes[:'voicemail_mailboxes']).is_a?(Array)
92
+ self.voicemail_mailboxes = value
93
+ end
94
+ end
95
+
96
+ if attributes.has_key?(:'warning')
97
+ self.warning = attributes[:'warning']
98
+ end
99
+ end
100
+
101
+ # Show invalid properties with the reasons. Usually used together with valid?
102
+ # @return Array for valid properties with the reasons
103
+ def list_invalid_properties
104
+ invalid_properties = Array.new
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
+ true
112
+ end
113
+
114
+ # Checks equality by comparing each attribute.
115
+ # @param [Object] Object to be compared
116
+ def ==(o)
117
+ return true if self.equal?(o)
118
+ self.class == o.class &&
119
+ error == o.error &&
120
+ menus == o.menus &&
121
+ metadata == o.metadata &&
122
+ queues == o.queues &&
123
+ success == o.success &&
124
+ voicemail_mailboxes == o.voicemail_mailboxes &&
125
+ warning == o.warning
126
+ end
127
+
128
+ # @see the `==` method
129
+ # @param [Object] Object to be compared
130
+ def eql?(o)
131
+ self == o
132
+ end
133
+
134
+ # Calculates hash code according to all attributes.
135
+ # @return [Fixnum] Hash code
136
+ def hash
137
+ [error, menus, metadata, queues, success, voicemail_mailboxes, warning].hash
138
+ end
139
+
140
+ # Builds the object from hash
141
+ # @param [Hash] attributes Model attributes in the form of hash
142
+ # @return [Object] Returns the model itself
143
+ def build_from_hash(attributes)
144
+ return nil unless attributes.is_a?(Hash)
145
+ self.class.swagger_types.each_pair do |key, type|
146
+ if type =~ /\AArray<(.*)>/i
147
+ # check to ensure the input is an array given that the attribute
148
+ # is documented as an array but the input is not
149
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
150
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
151
+ end
152
+ elsif !attributes[self.class.attribute_map[key]].nil?
153
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
154
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
155
+ end
156
+
157
+ self
158
+ end
159
+
160
+ # Deserializes the data based on type
161
+ # @param string type Data type
162
+ # @param string value Value to be deserialized
163
+ # @return [Object] Deserialized data
164
+ def _deserialize(type, value)
165
+ case type.to_sym
166
+ when :DateTime
167
+ DateTime.parse(value)
168
+ when :Date
169
+ Date.parse(value)
170
+ when :String
171
+ value.to_s
172
+ when :Integer
173
+ value.to_i
174
+ when :Float
175
+ value.to_f
176
+ when :BOOLEAN
177
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
178
+ true
179
+ else
180
+ false
181
+ end
182
+ when :Object
183
+ # generic object (usually a Hash), return directly
184
+ value
185
+ when /\AArray<(?<inner_type>.+)>\z/
186
+ inner_type = Regexp.last_match[:inner_type]
187
+ value.map { |v| _deserialize(inner_type, v) }
188
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
189
+ k_type = Regexp.last_match[:k_type]
190
+ v_type = Regexp.last_match[:v_type]
191
+ {}.tap do |hash|
192
+ value.each do |k, v|
193
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
194
+ end
195
+ end
196
+ else # model
197
+ temp_model = UltracartClient.const_get(type).new
198
+ temp_model.build_from_hash(value)
199
+ end
200
+ end
201
+
202
+ # Returns the string representation of the object
203
+ # @return [String] String presentation of the object
204
+ def to_s
205
+ to_hash.to_s
206
+ end
207
+
208
+ # to_body is an alias to to_hash (backward compatibility)
209
+ # @return [Hash] Returns the object in the form of hash
210
+ def to_body
211
+ to_hash
212
+ end
213
+
214
+ # Returns the object in the form of hash
215
+ # @return [Hash] Returns the object in the form of hash
216
+ def to_hash
217
+ hash = {}
218
+ self.class.attribute_map.each_pair do |attr, param|
219
+ value = self.send(attr)
220
+ next if value.nil?
221
+ hash[param] = _to_hash(value)
222
+ end
223
+ hash
224
+ end
225
+
226
+ # Outputs non-array value in the form of hash
227
+ # For object, use to_hash. Otherwise, just return the value
228
+ # @param [Object] value Any valid value
229
+ # @return [Hash] Returns the value in the form of hash
230
+ def _to_hash(value)
231
+ if value.is_a?(Array)
232
+ value.compact.map { |v| _to_hash(v) }
233
+ elsif value.is_a?(Hash)
234
+ {}.tap do |hash|
235
+ value.each { |k, v| hash[k] = _to_hash(v) }
236
+ end
237
+ elsif value.respond_to? :to_hash
238
+ value.to_hash
239
+ else
240
+ value
241
+ end
242
+ end
243
+
244
+ end
245
+ end
@@ -11,5 +11,5 @@ Swagger Codegen version: 2.4.15-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '3.10.195'
14
+ VERSION = '3.10.197'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -194,6 +194,7 @@ require 'ultracart_api/models/conversation_pbx_audio'
194
194
  require 'ultracart_api/models/conversation_pbx_audio_response'
195
195
  require 'ultracart_api/models/conversation_pbx_audio_upload_url'
196
196
  require 'ultracart_api/models/conversation_pbx_audio_upload_url_response'
197
+ require 'ultracart_api/models/conversation_pbx_audio_usage_response'
197
198
  require 'ultracart_api/models/conversation_pbx_audios_response'
198
199
  require 'ultracart_api/models/conversation_pbx_customer_snapshot_request'
199
200
  require 'ultracart_api/models/conversation_pbx_customer_snapshot_response'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.10.195
4
+ version: 3.10.197
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-01 00:00:00.000000000 Z
11
+ date: 2024-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -404,6 +404,7 @@ files:
404
404
  - docs/ConversationPbxAudioResponse.md
405
405
  - docs/ConversationPbxAudioUploadUrl.md
406
406
  - docs/ConversationPbxAudioUploadUrlResponse.md
407
+ - docs/ConversationPbxAudioUsageResponse.md
407
408
  - docs/ConversationPbxAudiosResponse.md
408
409
  - docs/ConversationPbxCustomerSnapshotRequest.md
409
410
  - docs/ConversationPbxCustomerSnapshotResponse.md
@@ -1293,6 +1294,7 @@ files:
1293
1294
  - lib/ultracart_api/models/conversation_pbx_audio_response.rb
1294
1295
  - lib/ultracart_api/models/conversation_pbx_audio_upload_url.rb
1295
1296
  - lib/ultracart_api/models/conversation_pbx_audio_upload_url_response.rb
1297
+ - lib/ultracart_api/models/conversation_pbx_audio_usage_response.rb
1296
1298
  - lib/ultracart_api/models/conversation_pbx_audios_response.rb
1297
1299
  - lib/ultracart_api/models/conversation_pbx_customer_snapshot_request.rb
1298
1300
  - lib/ultracart_api/models/conversation_pbx_customer_snapshot_response.rb