ultracart_api 4.0.63.rc → 4.0.65.rc

Sign up to get free protection for your applications and to get access to all the features.
@@ -32,6 +32,64 @@ module UltracartClient
32
32
  UltracartClient::ConversationApi.new(api_client)
33
33
  end
34
34
 
35
+ # Agent keep alive
36
+ # Called periodically by the conversation API to keep the session alive.
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [nil]
39
+ def get_agent_keep_alive(opts = {})
40
+ get_agent_keep_alive_with_http_info(opts)
41
+ nil
42
+ end
43
+
44
+ # Agent keep alive
45
+ # Called periodically by the conversation API to keep the session alive.
46
+ # @param [Hash] opts the optional parameters
47
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
48
+ def get_agent_keep_alive_with_http_info(opts = {})
49
+ if @api_client.config.debugging
50
+ @api_client.config.logger.debug 'Calling API: ConversationApi.get_agent_keep_alive ...'
51
+ end
52
+ # resource path
53
+ local_var_path = '/conversation/agent/keepalive'
54
+
55
+ # query parameters
56
+ query_params = opts[:query_params] || {}
57
+
58
+ # header parameters
59
+ header_params = opts[:header_params] || {}
60
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
61
+ # HTTP header 'Accept' (if needed)
62
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
63
+
64
+ # form parameters
65
+ form_params = opts[:form_params] || {}
66
+
67
+ # http body (model)
68
+ post_body = opts[:debug_body]
69
+
70
+ # return_type
71
+ return_type = opts[:debug_return_type]
72
+
73
+ # auth_names
74
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
75
+
76
+ new_options = opts.merge(
77
+ :operation => :"ConversationApi.get_agent_keep_alive",
78
+ :header_params => header_params,
79
+ :query_params => query_params,
80
+ :form_params => form_params,
81
+ :body => post_body,
82
+ :auth_names => auth_names,
83
+ :return_type => return_type
84
+ )
85
+
86
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
87
+ if @api_client.config.debugging
88
+ @api_client.config.logger.debug "API called: ConversationApi#get_agent_keep_alive\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
89
+ end
90
+ return data, status_code, headers
91
+ end
92
+
35
93
  # Get agent websocket authorization
36
94
  # Retrieve a JWT to authorize an agent to make a websocket connection.
37
95
  # @param [Hash] opts the optional parameters
@@ -94,6 +152,7 @@ module UltracartClient
94
152
  # Retrieve a conversation including the participants and messages
95
153
  # @param conversation_uuid [String]
96
154
  # @param [Hash] opts the optional parameters
155
+ # @option opts [Integer] :limit
97
156
  # @return [ConversationResponse]
98
157
  def get_conversation(conversation_uuid, opts = {})
99
158
  data, _status_code, _headers = get_conversation_with_http_info(conversation_uuid, opts)
@@ -104,6 +163,7 @@ module UltracartClient
104
163
  # Retrieve a conversation including the participants and messages
105
164
  # @param conversation_uuid [String]
106
165
  # @param [Hash] opts the optional parameters
166
+ # @option opts [Integer] :limit
107
167
  # @return [Array<(ConversationResponse, Integer, Hash)>] ConversationResponse data, response status code and response headers
108
168
  def get_conversation_with_http_info(conversation_uuid, opts = {})
109
169
  if @api_client.config.debugging
@@ -118,6 +178,7 @@ module UltracartClient
118
178
 
119
179
  # query parameters
120
180
  query_params = opts[:query_params] || {}
181
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
121
182
 
122
183
  # header parameters
123
184
  header_params = opts[:header_params] || {}
@@ -154,6 +215,79 @@ module UltracartClient
154
215
  return data, status_code, headers
155
216
  end
156
217
 
218
+ # Retrieve conversation messages
219
+ # Retrieve conversation messages since a particular time
220
+ # @param conversation_uuid [String]
221
+ # @param since [Integer]
222
+ # @param [Hash] opts the optional parameters
223
+ # @option opts [Integer] :limit
224
+ # @return [ConversationMessagesResponse]
225
+ def get_conversation_messages(conversation_uuid, since, opts = {})
226
+ data, _status_code, _headers = get_conversation_messages_with_http_info(conversation_uuid, since, opts)
227
+ data
228
+ end
229
+
230
+ # Retrieve conversation messages
231
+ # Retrieve conversation messages since a particular time
232
+ # @param conversation_uuid [String]
233
+ # @param since [Integer]
234
+ # @param [Hash] opts the optional parameters
235
+ # @option opts [Integer] :limit
236
+ # @return [Array<(ConversationMessagesResponse, Integer, Hash)>] ConversationMessagesResponse data, response status code and response headers
237
+ def get_conversation_messages_with_http_info(conversation_uuid, since, opts = {})
238
+ if @api_client.config.debugging
239
+ @api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation_messages ...'
240
+ end
241
+ # verify the required parameter 'conversation_uuid' is set
242
+ if @api_client.config.client_side_validation && conversation_uuid.nil?
243
+ fail ArgumentError, "Missing the required parameter 'conversation_uuid' when calling ConversationApi.get_conversation_messages"
244
+ end
245
+ # verify the required parameter 'since' is set
246
+ if @api_client.config.client_side_validation && since.nil?
247
+ fail ArgumentError, "Missing the required parameter 'since' when calling ConversationApi.get_conversation_messages"
248
+ end
249
+ # resource path
250
+ local_var_path = '/conversation/conversations/{conversation_uuid}/messages/{since}'.sub('{' + 'conversation_uuid' + '}', CGI.escape(conversation_uuid.to_s)).sub('{' + 'since' + '}', CGI.escape(since.to_s))
251
+
252
+ # query parameters
253
+ query_params = opts[:query_params] || {}
254
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
255
+
256
+ # header parameters
257
+ header_params = opts[:header_params] || {}
258
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
259
+ # HTTP header 'Accept' (if needed)
260
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
261
+
262
+ # form parameters
263
+ form_params = opts[:form_params] || {}
264
+
265
+ # http body (model)
266
+ post_body = opts[:debug_body]
267
+
268
+ # return_type
269
+ return_type = opts[:debug_return_type] || 'ConversationMessagesResponse'
270
+
271
+ # auth_names
272
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
273
+
274
+ new_options = opts.merge(
275
+ :operation => :"ConversationApi.get_conversation_messages",
276
+ :header_params => header_params,
277
+ :query_params => query_params,
278
+ :form_params => form_params,
279
+ :body => post_body,
280
+ :auth_names => auth_names,
281
+ :return_type => return_type
282
+ )
283
+
284
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
285
+ if @api_client.config.debugging
286
+ @api_client.config.logger.debug "API called: ConversationApi#get_conversation_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
287
+ end
288
+ return data, status_code, headers
289
+ end
290
+
157
291
  # Get a presigned conersation multimedia upload URL
158
292
  # Get a presigned conersation multimedia upload URL
159
293
  # @param extension [String]
@@ -32,6 +32,70 @@ module UltracartClient
32
32
  UltracartClient::ItemApi.new(api_client)
33
33
  end
34
34
 
35
+ # Delete a digital item, which is a file within the digital library, not an actual merchant item
36
+ # Delete a digital item on the UltraCart account.
37
+ # @param digital_item_oid [Integer] The digital item oid to delete.
38
+ # @param [Hash] opts the optional parameters
39
+ # @return [nil]
40
+ def delete_digital_item(digital_item_oid, opts = {})
41
+ delete_digital_item_with_http_info(digital_item_oid, opts)
42
+ nil
43
+ end
44
+
45
+ # Delete a digital item, which is a file within the digital library, not an actual merchant item
46
+ # Delete a digital item on the UltraCart account.
47
+ # @param digital_item_oid [Integer] The digital item oid to delete.
48
+ # @param [Hash] opts the optional parameters
49
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
50
+ def delete_digital_item_with_http_info(digital_item_oid, opts = {})
51
+ if @api_client.config.debugging
52
+ @api_client.config.logger.debug 'Calling API: ItemApi.delete_digital_item ...'
53
+ end
54
+ # verify the required parameter 'digital_item_oid' is set
55
+ if @api_client.config.client_side_validation && digital_item_oid.nil?
56
+ fail ArgumentError, "Missing the required parameter 'digital_item_oid' when calling ItemApi.delete_digital_item"
57
+ end
58
+ # resource path
59
+ local_var_path = '/item/digital_library/{digital_item_oid}'.sub('{' + 'digital_item_oid' + '}', CGI.escape(digital_item_oid.to_s))
60
+
61
+ # query parameters
62
+ query_params = opts[:query_params] || {}
63
+
64
+ # header parameters
65
+ header_params = opts[:header_params] || {}
66
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
67
+ # HTTP header 'Accept' (if needed)
68
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
69
+
70
+ # form parameters
71
+ form_params = opts[:form_params] || {}
72
+
73
+ # http body (model)
74
+ post_body = opts[:debug_body]
75
+
76
+ # return_type
77
+ return_type = opts[:debug_return_type]
78
+
79
+ # auth_names
80
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
81
+
82
+ new_options = opts.merge(
83
+ :operation => :"ItemApi.delete_digital_item",
84
+ :header_params => header_params,
85
+ :query_params => query_params,
86
+ :form_params => form_params,
87
+ :body => post_body,
88
+ :auth_names => auth_names,
89
+ :return_type => return_type
90
+ )
91
+
92
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
93
+ if @api_client.config.debugging
94
+ @api_client.config.logger.debug "API called: ItemApi#delete_digital_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
95
+ end
96
+ return data, status_code, headers
97
+ end
98
+
35
99
  # Delete an item
36
100
  # Delete an item on the UltraCart account.
37
101
  # @param merchant_item_oid [Integer] The item oid to delete.
@@ -96,6 +160,164 @@ module UltracartClient
96
160
  return data, status_code, headers
97
161
  end
98
162
 
163
+ # Retrieve a digital item from the digital library, which are digital files that may be attached to normal items
164
+ # Retrieves a digital item (file information) from the account. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items.
165
+ # @param digital_item_oid [Integer] The digital item oid to retrieve.
166
+ # @param [Hash] opts the optional parameters
167
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Default 100, Max 2000) (default to 100)
168
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
169
+ # @option opts [String] :_since Fetch items that have been created/modified since this date/time.
170
+ # @option opts [String] :_sort The sort order of the items. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
171
+ # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
172
+ # @option opts [Boolean] :_placeholders Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API.
173
+ # @return [ItemDigitalItemResponse]
174
+ def get_digital_item(digital_item_oid, opts = {})
175
+ data, _status_code, _headers = get_digital_item_with_http_info(digital_item_oid, opts)
176
+ data
177
+ end
178
+
179
+ # Retrieve a digital item from the digital library, which are digital files that may be attached to normal items
180
+ # Retrieves a digital item (file information) from the account. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items.
181
+ # @param digital_item_oid [Integer] The digital item oid to retrieve.
182
+ # @param [Hash] opts the optional parameters
183
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Default 100, Max 2000) (default to 100)
184
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
185
+ # @option opts [String] :_since Fetch items that have been created/modified since this date/time.
186
+ # @option opts [String] :_sort The sort order of the items. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
187
+ # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
188
+ # @option opts [Boolean] :_placeholders Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API.
189
+ # @return [Array<(ItemDigitalItemResponse, Integer, Hash)>] ItemDigitalItemResponse data, response status code and response headers
190
+ def get_digital_item_with_http_info(digital_item_oid, opts = {})
191
+ if @api_client.config.debugging
192
+ @api_client.config.logger.debug 'Calling API: ItemApi.get_digital_item ...'
193
+ end
194
+ # verify the required parameter 'digital_item_oid' is set
195
+ if @api_client.config.client_side_validation && digital_item_oid.nil?
196
+ fail ArgumentError, "Missing the required parameter 'digital_item_oid' when calling ItemApi.get_digital_item"
197
+ end
198
+ # resource path
199
+ local_var_path = '/item/digital_library/{digital_item_oid}'.sub('{' + 'digital_item_oid' + '}', CGI.escape(digital_item_oid.to_s))
200
+
201
+ # query parameters
202
+ query_params = opts[:query_params] || {}
203
+ query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
204
+ query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
205
+ query_params[:'_since'] = opts[:'_since'] if !opts[:'_since'].nil?
206
+ query_params[:'_sort'] = opts[:'_sort'] if !opts[:'_sort'].nil?
207
+ query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?
208
+ query_params[:'_placeholders'] = opts[:'_placeholders'] if !opts[:'_placeholders'].nil?
209
+
210
+ # header parameters
211
+ header_params = opts[:header_params] || {}
212
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
213
+ # HTTP header 'Accept' (if needed)
214
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
215
+
216
+ # form parameters
217
+ form_params = opts[:form_params] || {}
218
+
219
+ # http body (model)
220
+ post_body = opts[:debug_body]
221
+
222
+ # return_type
223
+ return_type = opts[:debug_return_type] || 'ItemDigitalItemResponse'
224
+
225
+ # auth_names
226
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
227
+
228
+ new_options = opts.merge(
229
+ :operation => :"ItemApi.get_digital_item",
230
+ :header_params => header_params,
231
+ :query_params => query_params,
232
+ :form_params => form_params,
233
+ :body => post_body,
234
+ :auth_names => auth_names,
235
+ :return_type => return_type
236
+ )
237
+
238
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
239
+ if @api_client.config.debugging
240
+ @api_client.config.logger.debug "API called: ItemApi#get_digital_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
241
+ end
242
+ return data, status_code, headers
243
+ end
244
+
245
+ # Retrieve digital items from the digital library which are digital files that may be attached to normal items
246
+ # Retrieves a group of digital items (file information) from the account. If no parameters are specified, all digital items will be returned. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
247
+ # @param [Hash] opts the optional parameters
248
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Default 100, Max 2000) (default to 100)
249
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
250
+ # @option opts [String] :_since Fetch items that have been created/modified since this date/time.
251
+ # @option opts [String] :_sort The sort order of the items. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
252
+ # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
253
+ # @option opts [Boolean] :_placeholders Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API.
254
+ # @return [ItemDigitalItemsResponse]
255
+ def get_digital_items(opts = {})
256
+ data, _status_code, _headers = get_digital_items_with_http_info(opts)
257
+ data
258
+ end
259
+
260
+ # Retrieve digital items from the digital library which are digital files that may be attached to normal items
261
+ # Retrieves a group of digital items (file information) from the account. If no parameters are specified, all digital items will be returned. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
262
+ # @param [Hash] opts the optional parameters
263
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Default 100, Max 2000) (default to 100)
264
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
265
+ # @option opts [String] :_since Fetch items that have been created/modified since this date/time.
266
+ # @option opts [String] :_sort The sort order of the items. See Sorting documentation for examples of using multiple values and sorting by ascending and descending.
267
+ # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
268
+ # @option opts [Boolean] :_placeholders Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API.
269
+ # @return [Array<(ItemDigitalItemsResponse, Integer, Hash)>] ItemDigitalItemsResponse data, response status code and response headers
270
+ def get_digital_items_with_http_info(opts = {})
271
+ if @api_client.config.debugging
272
+ @api_client.config.logger.debug 'Calling API: ItemApi.get_digital_items ...'
273
+ end
274
+ # resource path
275
+ local_var_path = '/item/digital_library'
276
+
277
+ # query parameters
278
+ query_params = opts[:query_params] || {}
279
+ query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
280
+ query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
281
+ query_params[:'_since'] = opts[:'_since'] if !opts[:'_since'].nil?
282
+ query_params[:'_sort'] = opts[:'_sort'] if !opts[:'_sort'].nil?
283
+ query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?
284
+ query_params[:'_placeholders'] = opts[:'_placeholders'] if !opts[:'_placeholders'].nil?
285
+
286
+ # header parameters
287
+ header_params = opts[:header_params] || {}
288
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
289
+ # HTTP header 'Accept' (if needed)
290
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
291
+
292
+ # form parameters
293
+ form_params = opts[:form_params] || {}
294
+
295
+ # http body (model)
296
+ post_body = opts[:debug_body]
297
+
298
+ # return_type
299
+ return_type = opts[:debug_return_type] || 'ItemDigitalItemsResponse'
300
+
301
+ # auth_names
302
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
303
+
304
+ new_options = opts.merge(
305
+ :operation => :"ItemApi.get_digital_items",
306
+ :header_params => header_params,
307
+ :query_params => query_params,
308
+ :form_params => form_params,
309
+ :body => post_body,
310
+ :auth_names => auth_names,
311
+ :return_type => return_type
312
+ )
313
+
314
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
315
+ if @api_client.config.debugging
316
+ @api_client.config.logger.debug "API called: ItemApi#get_digital_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
317
+ end
318
+ return data, status_code, headers
319
+ end
320
+
99
321
  # Retrieve an item
100
322
  # Retrieves a single item using the specified item oid.
101
323
  # @param merchant_item_oid [Integer] The item oid to retrieve.
@@ -379,6 +601,75 @@ module UltracartClient
379
601
  return data, status_code, headers
380
602
  end
381
603
 
604
+ # Create a file within the digital library
605
+ # Create a file within the digital library. This does not create an item, but makes this digital file available and selectable as part (or all) of an item.
606
+ # @param digital_item [ItemDigitalItem] Digital item to create
607
+ # @param [Hash] opts the optional parameters
608
+ # @return [ItemDigitalItemResponse]
609
+ def insert_digital_item(digital_item, opts = {})
610
+ data, _status_code, _headers = insert_digital_item_with_http_info(digital_item, opts)
611
+ data
612
+ end
613
+
614
+ # Create a file within the digital library
615
+ # Create a file within the digital library. This does not create an item, but makes this digital file available and selectable as part (or all) of an item.
616
+ # @param digital_item [ItemDigitalItem] Digital item to create
617
+ # @param [Hash] opts the optional parameters
618
+ # @return [Array<(ItemDigitalItemResponse, Integer, Hash)>] ItemDigitalItemResponse data, response status code and response headers
619
+ def insert_digital_item_with_http_info(digital_item, opts = {})
620
+ if @api_client.config.debugging
621
+ @api_client.config.logger.debug 'Calling API: ItemApi.insert_digital_item ...'
622
+ end
623
+ # verify the required parameter 'digital_item' is set
624
+ if @api_client.config.client_side_validation && digital_item.nil?
625
+ fail ArgumentError, "Missing the required parameter 'digital_item' when calling ItemApi.insert_digital_item"
626
+ end
627
+ # resource path
628
+ local_var_path = '/item/digital_library'
629
+
630
+ # query parameters
631
+ query_params = opts[:query_params] || {}
632
+
633
+ # header parameters
634
+ header_params = opts[:header_params] || {}
635
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
636
+ # HTTP header 'Accept' (if needed)
637
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
638
+ # HTTP header 'Content-Type'
639
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
640
+ if !content_type.nil?
641
+ header_params['Content-Type'] = content_type
642
+ end
643
+
644
+ # form parameters
645
+ form_params = opts[:form_params] || {}
646
+
647
+ # http body (model)
648
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(digital_item)
649
+
650
+ # return_type
651
+ return_type = opts[:debug_return_type] || 'ItemDigitalItemResponse'
652
+
653
+ # auth_names
654
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
655
+
656
+ new_options = opts.merge(
657
+ :operation => :"ItemApi.insert_digital_item",
658
+ :header_params => header_params,
659
+ :query_params => query_params,
660
+ :form_params => form_params,
661
+ :body => post_body,
662
+ :auth_names => auth_names,
663
+ :return_type => return_type
664
+ )
665
+
666
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
667
+ if @api_client.config.debugging
668
+ @api_client.config.logger.debug "API called: ItemApi#insert_digital_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
669
+ end
670
+ return data, status_code, headers
671
+ end
672
+
382
673
  # Create an item
383
674
  # Create a new item on the UltraCart account.
384
675
  # @param item [Item] Item to create
@@ -454,6 +745,81 @@ module UltracartClient
454
745
  return data, status_code, headers
455
746
  end
456
747
 
748
+ # Updates a file within the digital library
749
+ # Updates a file within the digital library. This does not update an item, but updates a digital file available and selectable as part (or all) of an item.
750
+ # @param digital_item_oid [Integer] The digital item oid to update.
751
+ # @param digital_item [ItemDigitalItem] Digital item to update
752
+ # @param [Hash] opts the optional parameters
753
+ # @return [ItemDigitalItemResponse]
754
+ def update_digital_item(digital_item_oid, digital_item, opts = {})
755
+ data, _status_code, _headers = update_digital_item_with_http_info(digital_item_oid, digital_item, opts)
756
+ data
757
+ end
758
+
759
+ # Updates a file within the digital library
760
+ # Updates a file within the digital library. This does not update an item, but updates a digital file available and selectable as part (or all) of an item.
761
+ # @param digital_item_oid [Integer] The digital item oid to update.
762
+ # @param digital_item [ItemDigitalItem] Digital item to update
763
+ # @param [Hash] opts the optional parameters
764
+ # @return [Array<(ItemDigitalItemResponse, Integer, Hash)>] ItemDigitalItemResponse data, response status code and response headers
765
+ def update_digital_item_with_http_info(digital_item_oid, digital_item, opts = {})
766
+ if @api_client.config.debugging
767
+ @api_client.config.logger.debug 'Calling API: ItemApi.update_digital_item ...'
768
+ end
769
+ # verify the required parameter 'digital_item_oid' is set
770
+ if @api_client.config.client_side_validation && digital_item_oid.nil?
771
+ fail ArgumentError, "Missing the required parameter 'digital_item_oid' when calling ItemApi.update_digital_item"
772
+ end
773
+ # verify the required parameter 'digital_item' is set
774
+ if @api_client.config.client_side_validation && digital_item.nil?
775
+ fail ArgumentError, "Missing the required parameter 'digital_item' when calling ItemApi.update_digital_item"
776
+ end
777
+ # resource path
778
+ local_var_path = '/item/digital_library/{digital_item_oid}'.sub('{' + 'digital_item_oid' + '}', CGI.escape(digital_item_oid.to_s))
779
+
780
+ # query parameters
781
+ query_params = opts[:query_params] || {}
782
+
783
+ # header parameters
784
+ header_params = opts[:header_params] || {}
785
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
786
+ # HTTP header 'Accept' (if needed)
787
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
788
+ # HTTP header 'Content-Type'
789
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
790
+ if !content_type.nil?
791
+ header_params['Content-Type'] = content_type
792
+ end
793
+
794
+ # form parameters
795
+ form_params = opts[:form_params] || {}
796
+
797
+ # http body (model)
798
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(digital_item)
799
+
800
+ # return_type
801
+ return_type = opts[:debug_return_type] || 'ItemDigitalItemResponse'
802
+
803
+ # auth_names
804
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
805
+
806
+ new_options = opts.merge(
807
+ :operation => :"ItemApi.update_digital_item",
808
+ :header_params => header_params,
809
+ :query_params => query_params,
810
+ :form_params => form_params,
811
+ :body => post_body,
812
+ :auth_names => auth_names,
813
+ :return_type => return_type
814
+ )
815
+
816
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
817
+ if @api_client.config.debugging
818
+ @api_client.config.logger.debug "API called: ItemApi#update_digital_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
819
+ end
820
+ return data, status_code, headers
821
+ end
822
+
457
823
  # Update an item
458
824
  # Update a new item on the UltraCart account.
459
825
  # @param merchant_item_oid [Integer] The item oid to update.