ultracart_api 3.10.47 → 3.10.48

Sign up to get free protection for your applications and to get access to all the features.
@@ -32,6 +32,60 @@ 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 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 The digital item oid to delete.
48
+ # @param [Hash] opts the optional parameters
49
+ # @return [Array<(nil, Fixnum, 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' + '}', digital_item_oid.to_s)
60
+
61
+ # query parameters
62
+ query_params = {}
63
+
64
+ # header parameters
65
+ 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
+ # HTTP header 'Content-Type'
70
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
71
+
72
+ # form parameters
73
+ form_params = {}
74
+
75
+ # http body (model)
76
+ post_body = nil
77
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
78
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
79
+ :header_params => header_params,
80
+ :query_params => query_params,
81
+ :form_params => form_params,
82
+ :body => post_body,
83
+ :auth_names => auth_names)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: ItemApi#delete_digital_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
35
89
  # Delete an item
36
90
  # Delete an item on the UltraCart account.
37
91
  # @param merchant_item_oid The item oid to delete.
@@ -86,6 +140,146 @@ module UltracartClient
86
140
  end
87
141
  return data, status_code, headers
88
142
  end
143
+ # Retrieve a digital item from the digital library, which are digital files that may be attached to normal items
144
+ # 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.
145
+ # @param digital_item_oid The digital item oid to retrieve.
146
+ # @param [Hash] opts the optional parameters
147
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Default 100, Max 2000) (default to 100)
148
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
149
+ # @option opts [String] :_since Fetch items that have been created/modified since this date/time.
150
+ # @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.
151
+ # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
152
+ # @option opts [BOOLEAN] :_placeholders Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API.
153
+ # @return [ItemDigitalItemResponse]
154
+ def get_digital_item(digital_item_oid, opts = {})
155
+ data, _status_code, _headers = get_digital_item_with_http_info(digital_item_oid, opts)
156
+ data
157
+ end
158
+
159
+ # Retrieve a digital item from the digital library, which are digital files that may be attached to normal items
160
+ # 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.
161
+ # @param digital_item_oid The digital item oid to retrieve.
162
+ # @param [Hash] opts the optional parameters
163
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Default 100, Max 2000)
164
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index.
165
+ # @option opts [String] :_since Fetch items that have been created/modified since this date/time.
166
+ # @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.
167
+ # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
168
+ # @option opts [BOOLEAN] :_placeholders Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API.
169
+ # @return [Array<(ItemDigitalItemResponse, Fixnum, Hash)>] ItemDigitalItemResponse data, response status code and response headers
170
+ def get_digital_item_with_http_info(digital_item_oid, opts = {})
171
+ if @api_client.config.debugging
172
+ @api_client.config.logger.debug 'Calling API: ItemApi.get_digital_item ...'
173
+ end
174
+ # verify the required parameter 'digital_item_oid' is set
175
+ if @api_client.config.client_side_validation && digital_item_oid.nil?
176
+ fail ArgumentError, "Missing the required parameter 'digital_item_oid' when calling ItemApi.get_digital_item"
177
+ end
178
+ # resource path
179
+ local_var_path = '/item/digital_library/{digital_item_oid}'.sub('{' + 'digital_item_oid' + '}', digital_item_oid.to_s)
180
+
181
+ # query parameters
182
+ query_params = {}
183
+ query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
184
+ query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
185
+ query_params[:'_since'] = opts[:'_since'] if !opts[:'_since'].nil?
186
+ query_params[:'_sort'] = opts[:'_sort'] if !opts[:'_sort'].nil?
187
+ query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?
188
+ query_params[:'_placeholders'] = opts[:'_placeholders'] if !opts[:'_placeholders'].nil?
189
+
190
+ # header parameters
191
+ header_params = {}
192
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
193
+ # HTTP header 'Accept' (if needed)
194
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
195
+ # HTTP header 'Content-Type'
196
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
197
+
198
+ # form parameters
199
+ form_params = {}
200
+
201
+ # http body (model)
202
+ post_body = nil
203
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
204
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
205
+ :header_params => header_params,
206
+ :query_params => query_params,
207
+ :form_params => form_params,
208
+ :body => post_body,
209
+ :auth_names => auth_names,
210
+ :return_type => 'ItemDigitalItemResponse')
211
+ if @api_client.config.debugging
212
+ @api_client.config.logger.debug "API called: ItemApi#get_digital_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
213
+ end
214
+ return data, status_code, headers
215
+ end
216
+ # Retrieve digital items from the digital library which are digital files that may be attached to normal items
217
+ # 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.
218
+ # @param [Hash] opts the optional parameters
219
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Default 100, Max 2000) (default to 100)
220
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
221
+ # @option opts [String] :_since Fetch items that have been created/modified since this date/time.
222
+ # @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.
223
+ # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
224
+ # @option opts [BOOLEAN] :_placeholders Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API.
225
+ # @return [ItemDigitalItemsResponse]
226
+ def get_digital_items(opts = {})
227
+ data, _status_code, _headers = get_digital_items_with_http_info(opts)
228
+ data
229
+ end
230
+
231
+ # Retrieve digital items from the digital library which are digital files that may be attached to normal items
232
+ # 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.
233
+ # @param [Hash] opts the optional parameters
234
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Default 100, Max 2000)
235
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index.
236
+ # @option opts [String] :_since Fetch items that have been created/modified since this date/time.
237
+ # @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.
238
+ # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
239
+ # @option opts [BOOLEAN] :_placeholders Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API.
240
+ # @return [Array<(ItemDigitalItemsResponse, Fixnum, Hash)>] ItemDigitalItemsResponse data, response status code and response headers
241
+ def get_digital_items_with_http_info(opts = {})
242
+ if @api_client.config.debugging
243
+ @api_client.config.logger.debug 'Calling API: ItemApi.get_digital_items ...'
244
+ end
245
+ # resource path
246
+ local_var_path = '/item/digital_library'
247
+
248
+ # query parameters
249
+ query_params = {}
250
+ query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
251
+ query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
252
+ query_params[:'_since'] = opts[:'_since'] if !opts[:'_since'].nil?
253
+ query_params[:'_sort'] = opts[:'_sort'] if !opts[:'_sort'].nil?
254
+ query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?
255
+ query_params[:'_placeholders'] = opts[:'_placeholders'] if !opts[:'_placeholders'].nil?
256
+
257
+ # header parameters
258
+ header_params = {}
259
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
260
+ # HTTP header 'Accept' (if needed)
261
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
262
+ # HTTP header 'Content-Type'
263
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
264
+
265
+ # form parameters
266
+ form_params = {}
267
+
268
+ # http body (model)
269
+ post_body = nil
270
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
271
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
272
+ :header_params => header_params,
273
+ :query_params => query_params,
274
+ :form_params => form_params,
275
+ :body => post_body,
276
+ :auth_names => auth_names,
277
+ :return_type => 'ItemDigitalItemsResponse')
278
+ if @api_client.config.debugging
279
+ @api_client.config.logger.debug "API called: ItemApi#get_digital_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
280
+ end
281
+ return data, status_code, headers
282
+ end
89
283
  # Retrieve an item
90
284
  # Retrieves a single item using the specified item oid.
91
285
  # @param merchant_item_oid The item oid to retrieve.
@@ -333,6 +527,61 @@ module UltracartClient
333
527
  end
334
528
  return data, status_code, headers
335
529
  end
530
+ # Create a file within the digital library
531
+ # 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.
532
+ # @param digital_item Digital item to create
533
+ # @param [Hash] opts the optional parameters
534
+ # @return [ItemDigitalItemResponse]
535
+ def insert_digital_item(digital_item, opts = {})
536
+ data, _status_code, _headers = insert_digital_item_with_http_info(digital_item, opts)
537
+ data
538
+ end
539
+
540
+ # Create a file within the digital library
541
+ # 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.
542
+ # @param digital_item Digital item to create
543
+ # @param [Hash] opts the optional parameters
544
+ # @return [Array<(ItemDigitalItemResponse, Fixnum, Hash)>] ItemDigitalItemResponse data, response status code and response headers
545
+ def insert_digital_item_with_http_info(digital_item, opts = {})
546
+ if @api_client.config.debugging
547
+ @api_client.config.logger.debug 'Calling API: ItemApi.insert_digital_item ...'
548
+ end
549
+ # verify the required parameter 'digital_item' is set
550
+ if @api_client.config.client_side_validation && digital_item.nil?
551
+ fail ArgumentError, "Missing the required parameter 'digital_item' when calling ItemApi.insert_digital_item"
552
+ end
553
+ # resource path
554
+ local_var_path = '/item/digital_library'
555
+
556
+ # query parameters
557
+ query_params = {}
558
+
559
+ # header parameters
560
+ header_params = {}
561
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
562
+ # HTTP header 'Accept' (if needed)
563
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
564
+ # HTTP header 'Content-Type'
565
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
566
+
567
+ # form parameters
568
+ form_params = {}
569
+
570
+ # http body (model)
571
+ post_body = @api_client.object_to_http_body(digital_item)
572
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
573
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
574
+ :header_params => header_params,
575
+ :query_params => query_params,
576
+ :form_params => form_params,
577
+ :body => post_body,
578
+ :auth_names => auth_names,
579
+ :return_type => 'ItemDigitalItemResponse')
580
+ if @api_client.config.debugging
581
+ @api_client.config.logger.debug "API called: ItemApi#insert_digital_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
582
+ end
583
+ return data, status_code, headers
584
+ end
336
585
  # Create an item
337
586
  # Create a new item on the UltraCart account.
338
587
  # @param item Item to create
@@ -394,6 +643,67 @@ module UltracartClient
394
643
  end
395
644
  return data, status_code, headers
396
645
  end
646
+ # Updates a file within the digital library
647
+ # 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.
648
+ # @param digital_item_oid The digital item oid to update.
649
+ # @param digital_item Digital item to update
650
+ # @param [Hash] opts the optional parameters
651
+ # @return [ItemDigitalItemResponse]
652
+ def update_digital_item(digital_item_oid, digital_item, opts = {})
653
+ data, _status_code, _headers = update_digital_item_with_http_info(digital_item_oid, digital_item, opts)
654
+ data
655
+ end
656
+
657
+ # Updates a file within the digital library
658
+ # 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.
659
+ # @param digital_item_oid The digital item oid to update.
660
+ # @param digital_item Digital item to update
661
+ # @param [Hash] opts the optional parameters
662
+ # @return [Array<(ItemDigitalItemResponse, Fixnum, Hash)>] ItemDigitalItemResponse data, response status code and response headers
663
+ def update_digital_item_with_http_info(digital_item_oid, digital_item, opts = {})
664
+ if @api_client.config.debugging
665
+ @api_client.config.logger.debug 'Calling API: ItemApi.update_digital_item ...'
666
+ end
667
+ # verify the required parameter 'digital_item_oid' is set
668
+ if @api_client.config.client_side_validation && digital_item_oid.nil?
669
+ fail ArgumentError, "Missing the required parameter 'digital_item_oid' when calling ItemApi.update_digital_item"
670
+ end
671
+ # verify the required parameter 'digital_item' is set
672
+ if @api_client.config.client_side_validation && digital_item.nil?
673
+ fail ArgumentError, "Missing the required parameter 'digital_item' when calling ItemApi.update_digital_item"
674
+ end
675
+ # resource path
676
+ local_var_path = '/item/digital_library/{digital_item_oid}'.sub('{' + 'digital_item_oid' + '}', digital_item_oid.to_s)
677
+
678
+ # query parameters
679
+ query_params = {}
680
+
681
+ # header parameters
682
+ header_params = {}
683
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
684
+ # HTTP header 'Accept' (if needed)
685
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
686
+ # HTTP header 'Content-Type'
687
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
688
+
689
+ # form parameters
690
+ form_params = {}
691
+
692
+ # http body (model)
693
+ post_body = @api_client.object_to_http_body(digital_item)
694
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
695
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
696
+ :header_params => header_params,
697
+ :query_params => query_params,
698
+ :form_params => form_params,
699
+ :body => post_body,
700
+ :auth_names => auth_names,
701
+ :return_type => 'ItemDigitalItemResponse')
702
+ if @api_client.config.debugging
703
+ @api_client.config.logger.debug "API called: ItemApi#update_digital_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
704
+ end
705
+ return data, status_code, headers
706
+ end
397
707
  # Update an item
398
708
  # Update a new item on the UltraCart account.
399
709
  # @param item Item to update
@@ -14,40 +14,59 @@ require 'date'
14
14
 
15
15
  module UltracartClient
16
16
  class ItemDigitalItem
17
+ # Click wrap agreement is presented to the customer before they can purchase your product.
18
+ attr_accessor :click_wrap_agreement
19
+
17
20
  # File creation date
18
21
  attr_accessor :creation_dts
19
22
 
20
23
  # Description of the digital item
21
24
  attr_accessor :description
22
25
 
26
+ # The Digital item oid is a primary key used internally by UltraCart. You should not set or change this value. Doing so will have no effect.
27
+ attr_accessor :digital_item_oid
28
+
23
29
  # File size
24
30
  attr_accessor :file_size
25
31
 
32
+ # This url is sourced to create or update a digital file in your digital library. It is only considered during an insert or update operation.
33
+ attr_accessor :import_from_url
34
+
26
35
  # Mime type associated with the file
27
36
  attr_accessor :mime_type
28
37
 
29
38
  # Original filename
30
39
  attr_accessor :original_filename
31
40
 
41
+ attr_accessor :pdf_meta
42
+
32
43
  # Attribute mapping from ruby-style variable name to JSON key.
33
44
  def self.attribute_map
34
45
  {
46
+ :'click_wrap_agreement' => :'click_wrap_agreement',
35
47
  :'creation_dts' => :'creation_dts',
36
48
  :'description' => :'description',
49
+ :'digital_item_oid' => :'digital_item_oid',
37
50
  :'file_size' => :'file_size',
51
+ :'import_from_url' => :'import_from_url',
38
52
  :'mime_type' => :'mime_type',
39
- :'original_filename' => :'original_filename'
53
+ :'original_filename' => :'original_filename',
54
+ :'pdf_meta' => :'pdf_meta'
40
55
  }
41
56
  end
42
57
 
43
58
  # Attribute type mapping.
44
59
  def self.swagger_types
45
60
  {
61
+ :'click_wrap_agreement' => :'String',
46
62
  :'creation_dts' => :'String',
47
63
  :'description' => :'String',
64
+ :'digital_item_oid' => :'Integer',
48
65
  :'file_size' => :'Integer',
66
+ :'import_from_url' => :'String',
49
67
  :'mime_type' => :'String',
50
- :'original_filename' => :'String'
68
+ :'original_filename' => :'String',
69
+ :'pdf_meta' => :'ItemDigitalItemPdfMeta'
51
70
  }
52
71
  end
53
72
 
@@ -59,6 +78,10 @@ module UltracartClient
59
78
  # convert string to symbol for hash key
60
79
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
61
80
 
81
+ if attributes.has_key?(:'click_wrap_agreement')
82
+ self.click_wrap_agreement = attributes[:'click_wrap_agreement']
83
+ end
84
+
62
85
  if attributes.has_key?(:'creation_dts')
63
86
  self.creation_dts = attributes[:'creation_dts']
64
87
  end
@@ -67,10 +90,18 @@ module UltracartClient
67
90
  self.description = attributes[:'description']
68
91
  end
69
92
 
93
+ if attributes.has_key?(:'digital_item_oid')
94
+ self.digital_item_oid = attributes[:'digital_item_oid']
95
+ end
96
+
70
97
  if attributes.has_key?(:'file_size')
71
98
  self.file_size = attributes[:'file_size']
72
99
  end
73
100
 
101
+ if attributes.has_key?(:'import_from_url')
102
+ self.import_from_url = attributes[:'import_from_url']
103
+ end
104
+
74
105
  if attributes.has_key?(:'mime_type')
75
106
  self.mime_type = attributes[:'mime_type']
76
107
  end
@@ -78,6 +109,10 @@ module UltracartClient
78
109
  if attributes.has_key?(:'original_filename')
79
110
  self.original_filename = attributes[:'original_filename']
80
111
  end
112
+
113
+ if attributes.has_key?(:'pdf_meta')
114
+ self.pdf_meta = attributes[:'pdf_meta']
115
+ end
81
116
  end
82
117
 
83
118
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -143,11 +178,15 @@ module UltracartClient
143
178
  def ==(o)
144
179
  return true if self.equal?(o)
145
180
  self.class == o.class &&
181
+ click_wrap_agreement == o.click_wrap_agreement &&
146
182
  creation_dts == o.creation_dts &&
147
183
  description == o.description &&
184
+ digital_item_oid == o.digital_item_oid &&
148
185
  file_size == o.file_size &&
186
+ import_from_url == o.import_from_url &&
149
187
  mime_type == o.mime_type &&
150
- original_filename == o.original_filename
188
+ original_filename == o.original_filename &&
189
+ pdf_meta == o.pdf_meta
151
190
  end
152
191
 
153
192
  # @see the `==` method
@@ -159,7 +198,7 @@ module UltracartClient
159
198
  # Calculates hash code according to all attributes.
160
199
  # @return [Fixnum] Hash code
161
200
  def hash
162
- [creation_dts, description, file_size, mime_type, original_filename].hash
201
+ [click_wrap_agreement, creation_dts, description, digital_item_oid, file_size, import_from_url, mime_type, original_filename, pdf_meta].hash
163
202
  end
164
203
 
165
204
  # Builds the object from hash