ultracart_api 4.0.64.rc → 4.0.66.rc

Sign up to get free protection for your applications and to get access to all the features.
@@ -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,146 @@ 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
+ # @return [ItemDigitalItemResponse]
168
+ def get_digital_item(digital_item_oid, opts = {})
169
+ data, _status_code, _headers = get_digital_item_with_http_info(digital_item_oid, opts)
170
+ data
171
+ end
172
+
173
+ # Retrieve a digital item from the digital library, which are digital files that may be attached to normal items
174
+ # 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.
175
+ # @param digital_item_oid [Integer] The digital item oid to retrieve.
176
+ # @param [Hash] opts the optional parameters
177
+ # @return [Array<(ItemDigitalItemResponse, Integer, Hash)>] ItemDigitalItemResponse data, response status code and response headers
178
+ def get_digital_item_with_http_info(digital_item_oid, opts = {})
179
+ if @api_client.config.debugging
180
+ @api_client.config.logger.debug 'Calling API: ItemApi.get_digital_item ...'
181
+ end
182
+ # verify the required parameter 'digital_item_oid' is set
183
+ if @api_client.config.client_side_validation && digital_item_oid.nil?
184
+ fail ArgumentError, "Missing the required parameter 'digital_item_oid' when calling ItemApi.get_digital_item"
185
+ end
186
+ # resource path
187
+ local_var_path = '/item/digital_library/{digital_item_oid}'.sub('{' + 'digital_item_oid' + '}', CGI.escape(digital_item_oid.to_s))
188
+
189
+ # query parameters
190
+ query_params = opts[:query_params] || {}
191
+
192
+ # header parameters
193
+ header_params = opts[:header_params] || {}
194
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
195
+ # HTTP header 'Accept' (if needed)
196
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
197
+
198
+ # form parameters
199
+ form_params = opts[:form_params] || {}
200
+
201
+ # http body (model)
202
+ post_body = opts[:debug_body]
203
+
204
+ # return_type
205
+ return_type = opts[:debug_return_type] || 'ItemDigitalItemResponse'
206
+
207
+ # auth_names
208
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
209
+
210
+ new_options = opts.merge(
211
+ :operation => :"ItemApi.get_digital_item",
212
+ :header_params => header_params,
213
+ :query_params => query_params,
214
+ :form_params => form_params,
215
+ :body => post_body,
216
+ :auth_names => auth_names,
217
+ :return_type => return_type
218
+ )
219
+
220
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
221
+ if @api_client.config.debugging
222
+ @api_client.config.logger.debug "API called: ItemApi#get_digital_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
223
+ end
224
+ return data, status_code, headers
225
+ end
226
+
227
+ # Retrieve digital items from the digital library which are digital files that may be attached to normal items
228
+ # 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.
229
+ # @param [Hash] opts the optional parameters
230
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Default 100, Max 2000) (default to 100)
231
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
232
+ # @option opts [String] :_since Fetch items that have been created/modified since this date/time.
233
+ # @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.
234
+ # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
235
+ # @option opts [Boolean] :_placeholders Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API.
236
+ # @return [ItemDigitalItemsResponse]
237
+ def get_digital_items(opts = {})
238
+ data, _status_code, _headers = get_digital_items_with_http_info(opts)
239
+ data
240
+ end
241
+
242
+ # Retrieve digital items from the digital library which are digital files that may be attached to normal items
243
+ # 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.
244
+ # @param [Hash] opts the optional parameters
245
+ # @option opts [Integer] :_limit The maximum number of records to return on this one API call. (Default 100, Max 2000) (default to 100)
246
+ # @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
247
+ # @option opts [String] :_since Fetch items that have been created/modified since this date/time.
248
+ # @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.
249
+ # @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
250
+ # @option opts [Boolean] :_placeholders Whether or not placeholder values should be returned in the result. Useful for UIs that consume this REST API.
251
+ # @return [Array<(ItemDigitalItemsResponse, Integer, Hash)>] ItemDigitalItemsResponse data, response status code and response headers
252
+ def get_digital_items_with_http_info(opts = {})
253
+ if @api_client.config.debugging
254
+ @api_client.config.logger.debug 'Calling API: ItemApi.get_digital_items ...'
255
+ end
256
+ # resource path
257
+ local_var_path = '/item/digital_library'
258
+
259
+ # query parameters
260
+ query_params = opts[:query_params] || {}
261
+ query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
262
+ query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
263
+ query_params[:'_since'] = opts[:'_since'] if !opts[:'_since'].nil?
264
+ query_params[:'_sort'] = opts[:'_sort'] if !opts[:'_sort'].nil?
265
+ query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?
266
+ query_params[:'_placeholders'] = opts[:'_placeholders'] if !opts[:'_placeholders'].nil?
267
+
268
+ # header parameters
269
+ header_params = opts[:header_params] || {}
270
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
271
+ # HTTP header 'Accept' (if needed)
272
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
273
+
274
+ # form parameters
275
+ form_params = opts[:form_params] || {}
276
+
277
+ # http body (model)
278
+ post_body = opts[:debug_body]
279
+
280
+ # return_type
281
+ return_type = opts[:debug_return_type] || 'ItemDigitalItemsResponse'
282
+
283
+ # auth_names
284
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
285
+
286
+ new_options = opts.merge(
287
+ :operation => :"ItemApi.get_digital_items",
288
+ :header_params => header_params,
289
+ :query_params => query_params,
290
+ :form_params => form_params,
291
+ :body => post_body,
292
+ :auth_names => auth_names,
293
+ :return_type => return_type
294
+ )
295
+
296
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
297
+ if @api_client.config.debugging
298
+ @api_client.config.logger.debug "API called: ItemApi#get_digital_items\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
299
+ end
300
+ return data, status_code, headers
301
+ end
302
+
99
303
  # Retrieve an item
100
304
  # Retrieves a single item using the specified item oid.
101
305
  # @param merchant_item_oid [Integer] The item oid to retrieve.
@@ -379,6 +583,75 @@ module UltracartClient
379
583
  return data, status_code, headers
380
584
  end
381
585
 
586
+ # Create a file within the digital library
587
+ # 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.
588
+ # @param digital_item [ItemDigitalItem] Digital item to create
589
+ # @param [Hash] opts the optional parameters
590
+ # @return [ItemDigitalItemResponse]
591
+ def insert_digital_item(digital_item, opts = {})
592
+ data, _status_code, _headers = insert_digital_item_with_http_info(digital_item, opts)
593
+ data
594
+ end
595
+
596
+ # Create a file within the digital library
597
+ # 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.
598
+ # @param digital_item [ItemDigitalItem] Digital item to create
599
+ # @param [Hash] opts the optional parameters
600
+ # @return [Array<(ItemDigitalItemResponse, Integer, Hash)>] ItemDigitalItemResponse data, response status code and response headers
601
+ def insert_digital_item_with_http_info(digital_item, opts = {})
602
+ if @api_client.config.debugging
603
+ @api_client.config.logger.debug 'Calling API: ItemApi.insert_digital_item ...'
604
+ end
605
+ # verify the required parameter 'digital_item' is set
606
+ if @api_client.config.client_side_validation && digital_item.nil?
607
+ fail ArgumentError, "Missing the required parameter 'digital_item' when calling ItemApi.insert_digital_item"
608
+ end
609
+ # resource path
610
+ local_var_path = '/item/digital_library'
611
+
612
+ # query parameters
613
+ query_params = opts[:query_params] || {}
614
+
615
+ # header parameters
616
+ header_params = opts[:header_params] || {}
617
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
618
+ # HTTP header 'Accept' (if needed)
619
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
620
+ # HTTP header 'Content-Type'
621
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
622
+ if !content_type.nil?
623
+ header_params['Content-Type'] = content_type
624
+ end
625
+
626
+ # form parameters
627
+ form_params = opts[:form_params] || {}
628
+
629
+ # http body (model)
630
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(digital_item)
631
+
632
+ # return_type
633
+ return_type = opts[:debug_return_type] || 'ItemDigitalItemResponse'
634
+
635
+ # auth_names
636
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
637
+
638
+ new_options = opts.merge(
639
+ :operation => :"ItemApi.insert_digital_item",
640
+ :header_params => header_params,
641
+ :query_params => query_params,
642
+ :form_params => form_params,
643
+ :body => post_body,
644
+ :auth_names => auth_names,
645
+ :return_type => return_type
646
+ )
647
+
648
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
649
+ if @api_client.config.debugging
650
+ @api_client.config.logger.debug "API called: ItemApi#insert_digital_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
651
+ end
652
+ return data, status_code, headers
653
+ end
654
+
382
655
  # Create an item
383
656
  # Create a new item on the UltraCart account.
384
657
  # @param item [Item] Item to create
@@ -454,6 +727,81 @@ module UltracartClient
454
727
  return data, status_code, headers
455
728
  end
456
729
 
730
+ # Updates a file within the digital library
731
+ # 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.
732
+ # @param digital_item_oid [Integer] The digital item oid to update.
733
+ # @param digital_item [ItemDigitalItem] Digital item to update
734
+ # @param [Hash] opts the optional parameters
735
+ # @return [ItemDigitalItemResponse]
736
+ def update_digital_item(digital_item_oid, digital_item, opts = {})
737
+ data, _status_code, _headers = update_digital_item_with_http_info(digital_item_oid, digital_item, opts)
738
+ data
739
+ end
740
+
741
+ # Updates a file within the digital library
742
+ # 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.
743
+ # @param digital_item_oid [Integer] The digital item oid to update.
744
+ # @param digital_item [ItemDigitalItem] Digital item to update
745
+ # @param [Hash] opts the optional parameters
746
+ # @return [Array<(ItemDigitalItemResponse, Integer, Hash)>] ItemDigitalItemResponse data, response status code and response headers
747
+ def update_digital_item_with_http_info(digital_item_oid, digital_item, opts = {})
748
+ if @api_client.config.debugging
749
+ @api_client.config.logger.debug 'Calling API: ItemApi.update_digital_item ...'
750
+ end
751
+ # verify the required parameter 'digital_item_oid' is set
752
+ if @api_client.config.client_side_validation && digital_item_oid.nil?
753
+ fail ArgumentError, "Missing the required parameter 'digital_item_oid' when calling ItemApi.update_digital_item"
754
+ end
755
+ # verify the required parameter 'digital_item' is set
756
+ if @api_client.config.client_side_validation && digital_item.nil?
757
+ fail ArgumentError, "Missing the required parameter 'digital_item' when calling ItemApi.update_digital_item"
758
+ end
759
+ # resource path
760
+ local_var_path = '/item/digital_library/{digital_item_oid}'.sub('{' + 'digital_item_oid' + '}', CGI.escape(digital_item_oid.to_s))
761
+
762
+ # query parameters
763
+ query_params = opts[:query_params] || {}
764
+
765
+ # header parameters
766
+ header_params = opts[:header_params] || {}
767
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
768
+ # HTTP header 'Accept' (if needed)
769
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
770
+ # HTTP header 'Content-Type'
771
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
772
+ if !content_type.nil?
773
+ header_params['Content-Type'] = content_type
774
+ end
775
+
776
+ # form parameters
777
+ form_params = opts[:form_params] || {}
778
+
779
+ # http body (model)
780
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(digital_item)
781
+
782
+ # return_type
783
+ return_type = opts[:debug_return_type] || 'ItemDigitalItemResponse'
784
+
785
+ # auth_names
786
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
787
+
788
+ new_options = opts.merge(
789
+ :operation => :"ItemApi.update_digital_item",
790
+ :header_params => header_params,
791
+ :query_params => query_params,
792
+ :form_params => form_params,
793
+ :body => post_body,
794
+ :auth_names => auth_names,
795
+ :return_type => return_type
796
+ )
797
+
798
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
799
+ if @api_client.config.debugging
800
+ @api_client.config.logger.debug "API called: ItemApi#update_digital_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
801
+ end
802
+ return data, status_code, headers
803
+ end
804
+
457
805
  # Update an item
458
806
  # Update a new item on the UltraCart account.
459
807
  # @param merchant_item_oid [Integer] The item oid to update.
@@ -15,29 +15,44 @@ require 'time'
15
15
 
16
16
  module UltracartClient
17
17
  class ItemDigitalItem
18
+ # Click wrap agreement is presented to the customer before they can purchase your product.
19
+ attr_accessor :click_wrap_agreement
20
+
18
21
  # File creation date
19
22
  attr_accessor :creation_dts
20
23
 
21
24
  # Description of the digital item
22
25
  attr_accessor :description
23
26
 
27
+ # 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.
28
+ attr_accessor :digital_item_oid
29
+
24
30
  # File size
25
31
  attr_accessor :file_size
26
32
 
33
+ # 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.
34
+ attr_accessor :import_from_url
35
+
27
36
  # Mime type associated with the file
28
37
  attr_accessor :mime_type
29
38
 
30
39
  # Original filename
31
40
  attr_accessor :original_filename
32
41
 
42
+ attr_accessor :pdf_meta
43
+
33
44
  # Attribute mapping from ruby-style variable name to JSON key.
34
45
  def self.attribute_map
35
46
  {
47
+ :'click_wrap_agreement' => :'click_wrap_agreement',
36
48
  :'creation_dts' => :'creation_dts',
37
49
  :'description' => :'description',
50
+ :'digital_item_oid' => :'digital_item_oid',
38
51
  :'file_size' => :'file_size',
52
+ :'import_from_url' => :'import_from_url',
39
53
  :'mime_type' => :'mime_type',
40
- :'original_filename' => :'original_filename'
54
+ :'original_filename' => :'original_filename',
55
+ :'pdf_meta' => :'pdf_meta'
41
56
  }
42
57
  end
43
58
 
@@ -49,11 +64,15 @@ module UltracartClient
49
64
  # Attribute type mapping.
50
65
  def self.openapi_types
51
66
  {
67
+ :'click_wrap_agreement' => :'String',
52
68
  :'creation_dts' => :'String',
53
69
  :'description' => :'String',
70
+ :'digital_item_oid' => :'Integer',
54
71
  :'file_size' => :'Integer',
72
+ :'import_from_url' => :'String',
55
73
  :'mime_type' => :'String',
56
- :'original_filename' => :'String'
74
+ :'original_filename' => :'String',
75
+ :'pdf_meta' => :'ItemDigitalItemPdfMeta'
57
76
  }
58
77
  end
59
78
 
@@ -78,6 +97,10 @@ module UltracartClient
78
97
  h[k.to_sym] = v
79
98
  }
80
99
 
100
+ if attributes.key?(:'click_wrap_agreement')
101
+ self.click_wrap_agreement = attributes[:'click_wrap_agreement']
102
+ end
103
+
81
104
  if attributes.key?(:'creation_dts')
82
105
  self.creation_dts = attributes[:'creation_dts']
83
106
  end
@@ -86,10 +109,18 @@ module UltracartClient
86
109
  self.description = attributes[:'description']
87
110
  end
88
111
 
112
+ if attributes.key?(:'digital_item_oid')
113
+ self.digital_item_oid = attributes[:'digital_item_oid']
114
+ end
115
+
89
116
  if attributes.key?(:'file_size')
90
117
  self.file_size = attributes[:'file_size']
91
118
  end
92
119
 
120
+ if attributes.key?(:'import_from_url')
121
+ self.import_from_url = attributes[:'import_from_url']
122
+ end
123
+
93
124
  if attributes.key?(:'mime_type')
94
125
  self.mime_type = attributes[:'mime_type']
95
126
  end
@@ -97,6 +128,10 @@ module UltracartClient
97
128
  if attributes.key?(:'original_filename')
98
129
  self.original_filename = attributes[:'original_filename']
99
130
  end
131
+
132
+ if attributes.key?(:'pdf_meta')
133
+ self.pdf_meta = attributes[:'pdf_meta']
134
+ end
100
135
  end
101
136
 
102
137
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -162,11 +197,15 @@ module UltracartClient
162
197
  def ==(o)
163
198
  return true if self.equal?(o)
164
199
  self.class == o.class &&
200
+ click_wrap_agreement == o.click_wrap_agreement &&
165
201
  creation_dts == o.creation_dts &&
166
202
  description == o.description &&
203
+ digital_item_oid == o.digital_item_oid &&
167
204
  file_size == o.file_size &&
205
+ import_from_url == o.import_from_url &&
168
206
  mime_type == o.mime_type &&
169
- original_filename == o.original_filename
207
+ original_filename == o.original_filename &&
208
+ pdf_meta == o.pdf_meta
170
209
  end
171
210
 
172
211
  # @see the `==` method
@@ -178,7 +217,7 @@ module UltracartClient
178
217
  # Calculates hash code according to all attributes.
179
218
  # @return [Integer] Hash code
180
219
  def hash
181
- [creation_dts, description, file_size, mime_type, original_filename].hash
220
+ [click_wrap_agreement, creation_dts, description, digital_item_oid, file_size, import_from_url, mime_type, original_filename, pdf_meta].hash
182
221
  end
183
222
 
184
223
  # Builds the object from hash