ultracart_api 3.10.105 → 3.10.106

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: 15db4fd92033b5a4ba8feb10486cce1da679c93269c7e529341ee550723f2a60
4
- data.tar.gz: 316b4551e5fdc7d1fe5e689e3203dfcddc97eb0cb25dee71ba0218c96d89d224
3
+ metadata.gz: d3f36076b042b214c4579487347fe265e0c748648ad77e94f80c540fd608ac79
4
+ data.tar.gz: 283b1c5f6335470a8ffb210cbc2e816dba6953a6d915760e920e98d2db10b0d3
5
5
  SHA512:
6
- metadata.gz: 0a9f1a6ae31b460ccc05863a239e131cf9946b00e961cfa9d3d6f5b4ac58ebbf2735fa82c144ec573e10a700d873dd1d76b9a863175e5151d2e117b11dd3df75
7
- data.tar.gz: e6f0239d6481e916ff3b02b86447f74959fb7c11a1c3fdae849a42d036d5d360dd09ad2da4105f17089bc9e01e927181432f687ecc7906c1da5a77e9a8a297b3
6
+ metadata.gz: 367491fdee95ded52be2a46eafd4dff23c8f583998e4d07ad14425f3d1ce92edf46b7442a29b1a1d41619d61bbbb8d2337bc7ac40bd34f269d61b32e411c690c
7
+ data.tar.gz: f98dafe4dd4540224ff4705941644fa1b647e7761ea59938bc1d0da9df55d61f088d8394cc1d21ca9fdf3e00f131a9bb62efe913fc6cd4cb358bbf0fb7a59807
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.105
10
+ - Package version: 3.10.106
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.105.gem
27
+ gem install ./ultracart_api-3.10.106.gem
28
28
  ```
29
- (for development, run `gem install --dev ./ultracart_api-3.10.105.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./ultracart_api-3.10.106.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.105'
35
+ gem 'ultracart_api', '~> 3.10.106'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -242,6 +242,7 @@ Class | Method | HTTP request | Description
242
242
  *UltracartClient::OrderApi* | [**delete_order**](docs/OrderApi.md#delete_order) | **DELETE** /order/orders/{order_id} | Delete an order
243
243
  *UltracartClient::OrderApi* | [**duplicate_order**](docs/OrderApi.md#duplicate_order) | **POST** /order/orders/{order_id}/duplicate | Duplicate an order
244
244
  *UltracartClient::OrderApi* | [**format**](docs/OrderApi.md#format) | **POST** /order/orders/{order_id}/format | Format order
245
+ *UltracartClient::OrderApi* | [**generate_invoice**](docs/OrderApi.md#generate_invoice) | **GET** /order/orders/{order_id}/invoice | Generate an invoice for this order.
245
246
  *UltracartClient::OrderApi* | [**generate_order_token**](docs/OrderApi.md#generate_order_token) | **GET** /order/orders/token/{order_id} | Generate an order token for a given order id
246
247
  *UltracartClient::OrderApi* | [**generate_packing_slip_all_dc**](docs/OrderApi.md#generate_packing_slip_all_dc) | **GET** /order/orders/{order_id}/packing_slip | Generate a packing slip for this order across all distribution centers.
247
248
  *UltracartClient::OrderApi* | [**generate_packing_slip_specific_dc**](docs/OrderApi.md#generate_packing_slip_specific_dc) | **GET** /order/orders/{order_id}/packing_slip/{distribution_center_code} | Generate a packing slip for this order for the given distribution center.
@@ -1049,6 +1050,7 @@ Class | Method | HTTP request | Description
1049
1050
  - [UltracartClient::OrderGift](docs/OrderGift.md)
1050
1051
  - [UltracartClient::OrderGiftCertificate](docs/OrderGiftCertificate.md)
1051
1052
  - [UltracartClient::OrderInternal](docs/OrderInternal.md)
1053
+ - [UltracartClient::OrderInvoiceResponse](docs/OrderInvoiceResponse.md)
1052
1054
  - [UltracartClient::OrderItem](docs/OrderItem.md)
1053
1055
  - [UltracartClient::OrderItemEdi](docs/OrderItemEdi.md)
1054
1056
  - [UltracartClient::OrderItemEdiIdentification](docs/OrderItemEdiIdentification.md)
@@ -1290,6 +1292,7 @@ Not every change is committed to every SDK.
1290
1292
 
1291
1293
  | Version | Date | Comments |
1292
1294
  | --: | :-: | --- |
1295
+ | 3.10.106 | 01/25/2023 | order api method generateInvoice |
1293
1296
  | 3.10.105 | 01/24/2023 | auto order - cancel minimum and change balance options |
1294
1297
  | 3.10.104 | 01/23/2023 | conversation - method to fetch single engagement record |
1295
1298
  | 3.10.103 | 01/19/2023 | added skip_on_rebill field to coupon object |
data/docs/OrderApi.md CHANGED
@@ -9,6 +9,7 @@ Method | HTTP request | Description
9
9
  [**delete_order**](OrderApi.md#delete_order) | **DELETE** /order/orders/{order_id} | Delete an order
10
10
  [**duplicate_order**](OrderApi.md#duplicate_order) | **POST** /order/orders/{order_id}/duplicate | Duplicate an order
11
11
  [**format**](OrderApi.md#format) | **POST** /order/orders/{order_id}/format | Format order
12
+ [**generate_invoice**](OrderApi.md#generate_invoice) | **GET** /order/orders/{order_id}/invoice | Generate an invoice for this order.
12
13
  [**generate_order_token**](OrderApi.md#generate_order_token) | **GET** /order/orders/token/{order_id} | Generate an order token for a given order id
13
14
  [**generate_packing_slip_all_dc**](OrderApi.md#generate_packing_slip_all_dc) | **GET** /order/orders/{order_id}/packing_slip | Generate a packing slip for this order across all distribution centers.
14
15
  [**generate_packing_slip_specific_dc**](OrderApi.md#generate_packing_slip_specific_dc) | **GET** /order/orders/{order_id}/packing_slip/{distribution_center_code} | Generate a packing slip for this order for the given distribution center.
@@ -289,6 +290,56 @@ Name | Type | Description | Notes
289
290
 
290
291
 
291
292
 
293
+ # **generate_invoice**
294
+ > OrderInvoiceResponse generate_invoice(order_id)
295
+
296
+ Generate an invoice for this order.
297
+
298
+ The invoice PDF that is returned is base 64 encoded
299
+
300
+ ### Example
301
+ ```ruby
302
+ # load the gem
303
+ require 'ultracart_api'
304
+
305
+ # Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
306
+ simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
307
+ api_instance = UltracartClient::OrderApi.new_using_api_key(simple_key, false, false)
308
+
309
+
310
+ order_id = 'order_id_example' # String | Order ID
311
+
312
+
313
+ begin
314
+ #Generate an invoice for this order.
315
+ result = api_instance.generate_invoice(order_id)
316
+ p result
317
+ rescue UltracartClient::ApiError => e
318
+ puts "Exception when calling OrderApi->generate_invoice: #{e}"
319
+ end
320
+ ```
321
+
322
+ ### Parameters
323
+
324
+ Name | Type | Description | Notes
325
+ ------------- | ------------- | ------------- | -------------
326
+ **order_id** | **String**| Order ID |
327
+
328
+ ### Return type
329
+
330
+ [**OrderInvoiceResponse**](OrderInvoiceResponse.md)
331
+
332
+ ### Authorization
333
+
334
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
335
+
336
+ ### HTTP request headers
337
+
338
+ - **Content-Type**: application/json
339
+ - **Accept**: application/json
340
+
341
+
342
+
292
343
  # **generate_order_token**
293
344
  > OrderTokenResponse generate_order_token(order_id)
294
345
 
@@ -0,0 +1,12 @@
1
+ # UltracartClient::OrderInvoiceResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **error** | [**Error**](Error.md) | | [optional]
7
+ **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
8
+ **pdf_base64** | **String** | pdf_base64 | [optional]
9
+ **success** | **BOOLEAN** | Indicates if API call was successful | [optional]
10
+ **warning** | [**Warning**](Warning.md) | | [optional]
11
+
12
+
@@ -321,6 +321,61 @@ module UltracartClient
321
321
  end
322
322
  return data, status_code, headers
323
323
  end
324
+ # Generate an invoice for this order.
325
+ # The invoice PDF that is returned is base 64 encoded
326
+ # @param order_id Order ID
327
+ # @param [Hash] opts the optional parameters
328
+ # @return [OrderInvoiceResponse]
329
+ def generate_invoice(order_id, opts = {})
330
+ data, _status_code, _headers = generate_invoice_with_http_info(order_id, opts)
331
+ data
332
+ end
333
+
334
+ # Generate an invoice for this order.
335
+ # The invoice PDF that is returned is base 64 encoded
336
+ # @param order_id Order ID
337
+ # @param [Hash] opts the optional parameters
338
+ # @return [Array<(OrderInvoiceResponse, Fixnum, Hash)>] OrderInvoiceResponse data, response status code and response headers
339
+ def generate_invoice_with_http_info(order_id, opts = {})
340
+ if @api_client.config.debugging
341
+ @api_client.config.logger.debug 'Calling API: OrderApi.generate_invoice ...'
342
+ end
343
+ # verify the required parameter 'order_id' is set
344
+ if @api_client.config.client_side_validation && order_id.nil?
345
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.generate_invoice"
346
+ end
347
+ # resource path
348
+ local_var_path = '/order/orders/{order_id}/invoice'.sub('{' + 'order_id' + '}', order_id.to_s)
349
+
350
+ # query parameters
351
+ query_params = {}
352
+
353
+ # header parameters
354
+ header_params = {}
355
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
356
+ # HTTP header 'Accept' (if needed)
357
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
358
+ # HTTP header 'Content-Type'
359
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
360
+
361
+ # form parameters
362
+ form_params = {}
363
+
364
+ # http body (model)
365
+ post_body = nil
366
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
367
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
368
+ :header_params => header_params,
369
+ :query_params => query_params,
370
+ :form_params => form_params,
371
+ :body => post_body,
372
+ :auth_names => auth_names,
373
+ :return_type => 'OrderInvoiceResponse')
374
+ if @api_client.config.debugging
375
+ @api_client.config.logger.debug "API called: OrderApi#generate_invoice\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
376
+ end
377
+ return data, status_code, headers
378
+ end
324
379
  # Generate an order token for a given order id
325
380
  # Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
326
381
  # @param order_id The order id to generate a token for.
@@ -0,0 +1,222 @@
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 OrderInvoiceResponse
17
+ attr_accessor :error
18
+
19
+ attr_accessor :metadata
20
+
21
+ # pdf_base64
22
+ attr_accessor :pdf_base64
23
+
24
+ # Indicates if API call was successful
25
+ attr_accessor :success
26
+
27
+ attr_accessor :warning
28
+
29
+ # Attribute mapping from ruby-style variable name to JSON key.
30
+ def self.attribute_map
31
+ {
32
+ :'error' => :'error',
33
+ :'metadata' => :'metadata',
34
+ :'pdf_base64' => :'pdfBase64',
35
+ :'success' => :'success',
36
+ :'warning' => :'warning'
37
+ }
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.swagger_types
42
+ {
43
+ :'error' => :'Error',
44
+ :'metadata' => :'ResponseMetadata',
45
+ :'pdf_base64' => :'String',
46
+ :'success' => :'BOOLEAN',
47
+ :'warning' => :'Warning'
48
+ }
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ return unless attributes.is_a?(Hash)
55
+
56
+ # convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
58
+
59
+ if attributes.has_key?(:'error')
60
+ self.error = attributes[:'error']
61
+ end
62
+
63
+ if attributes.has_key?(:'metadata')
64
+ self.metadata = attributes[:'metadata']
65
+ end
66
+
67
+ if attributes.has_key?(:'pdfBase64')
68
+ self.pdf_base64 = attributes[:'pdfBase64']
69
+ end
70
+
71
+ if attributes.has_key?(:'success')
72
+ self.success = attributes[:'success']
73
+ end
74
+
75
+ if attributes.has_key?(:'warning')
76
+ self.warning = attributes[:'warning']
77
+ end
78
+ end
79
+
80
+ # Show invalid properties with the reasons. Usually used together with valid?
81
+ # @return Array for valid properties with the reasons
82
+ def list_invalid_properties
83
+ invalid_properties = Array.new
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ true
91
+ end
92
+
93
+ # Checks equality by comparing each attribute.
94
+ # @param [Object] Object to be compared
95
+ def ==(o)
96
+ return true if self.equal?(o)
97
+ self.class == o.class &&
98
+ error == o.error &&
99
+ metadata == o.metadata &&
100
+ pdf_base64 == o.pdf_base64 &&
101
+ success == o.success &&
102
+ warning == o.warning
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Fixnum] Hash code
113
+ def hash
114
+ [error, metadata, pdf_base64, success, warning].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ self.class.swagger_types.each_pair do |key, type|
123
+ if type =~ /\AArray<(.*)>/i
124
+ # check to ensure the input is an array given that the attribute
125
+ # is documented as an array but the input is not
126
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
127
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
128
+ end
129
+ elsif !attributes[self.class.attribute_map[key]].nil?
130
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
131
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
132
+ end
133
+
134
+ self
135
+ end
136
+
137
+ # Deserializes the data based on type
138
+ # @param string type Data type
139
+ # @param string value Value to be deserialized
140
+ # @return [Object] Deserialized data
141
+ def _deserialize(type, value)
142
+ case type.to_sym
143
+ when :DateTime
144
+ DateTime.parse(value)
145
+ when :Date
146
+ Date.parse(value)
147
+ when :String
148
+ value.to_s
149
+ when :Integer
150
+ value.to_i
151
+ when :Float
152
+ value.to_f
153
+ when :BOOLEAN
154
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
155
+ true
156
+ else
157
+ false
158
+ end
159
+ when :Object
160
+ # generic object (usually a Hash), return directly
161
+ value
162
+ when /\AArray<(?<inner_type>.+)>\z/
163
+ inner_type = Regexp.last_match[:inner_type]
164
+ value.map { |v| _deserialize(inner_type, v) }
165
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
166
+ k_type = Regexp.last_match[:k_type]
167
+ v_type = Regexp.last_match[:v_type]
168
+ {}.tap do |hash|
169
+ value.each do |k, v|
170
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
171
+ end
172
+ end
173
+ else # model
174
+ temp_model = UltracartClient.const_get(type).new
175
+ temp_model.build_from_hash(value)
176
+ end
177
+ end
178
+
179
+ # Returns the string representation of the object
180
+ # @return [String] String presentation of the object
181
+ def to_s
182
+ to_hash.to_s
183
+ end
184
+
185
+ # to_body is an alias to to_hash (backward compatibility)
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_body
188
+ to_hash
189
+ end
190
+
191
+ # Returns the object in the form of hash
192
+ # @return [Hash] Returns the object in the form of hash
193
+ def to_hash
194
+ hash = {}
195
+ self.class.attribute_map.each_pair do |attr, param|
196
+ value = self.send(attr)
197
+ next if value.nil?
198
+ hash[param] = _to_hash(value)
199
+ end
200
+ hash
201
+ end
202
+
203
+ # Outputs non-array value in the form of hash
204
+ # For object, use to_hash. Otherwise, just return the value
205
+ # @param [Object] value Any valid value
206
+ # @return [Hash] Returns the value in the form of hash
207
+ def _to_hash(value)
208
+ if value.is_a?(Array)
209
+ value.compact.map { |v| _to_hash(v) }
210
+ elsif value.is_a?(Hash)
211
+ {}.tap do |hash|
212
+ value.each { |k, v| hash[k] = _to_hash(v) }
213
+ end
214
+ elsif value.respond_to? :to_hash
215
+ value.to_hash
216
+ else
217
+ value
218
+ end
219
+ end
220
+
221
+ end
222
+ 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.105'
14
+ VERSION = '3.10.106'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -578,6 +578,7 @@ require 'ultracart_api/models/order_fraud_score'
578
578
  require 'ultracart_api/models/order_gift'
579
579
  require 'ultracart_api/models/order_gift_certificate'
580
580
  require 'ultracart_api/models/order_internal'
581
+ require 'ultracart_api/models/order_invoice_response'
581
582
  require 'ultracart_api/models/order_item'
582
583
  require 'ultracart_api/models/order_item_edi'
583
584
  require 'ultracart_api/models/order_item_edi_identification'
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.105
4
+ version: 3.10.106
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-24 00:00:00.000000000 Z
11
+ date: 2023-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -796,6 +796,7 @@ files:
796
796
  - docs/OrderGift.md
797
797
  - docs/OrderGiftCertificate.md
798
798
  - docs/OrderInternal.md
799
+ - docs/OrderInvoiceResponse.md
799
800
  - docs/OrderItem.md
800
801
  - docs/OrderItemEdi.md
801
802
  - docs/OrderItemEdiIdentification.md
@@ -1557,6 +1558,7 @@ files:
1557
1558
  - lib/ultracart_api/models/order_gift.rb
1558
1559
  - lib/ultracart_api/models/order_gift_certificate.rb
1559
1560
  - lib/ultracart_api/models/order_internal.rb
1561
+ - lib/ultracart_api/models/order_invoice_response.rb
1560
1562
  - lib/ultracart_api/models/order_item.rb
1561
1563
  - lib/ultracart_api/models/order_item_edi.rb
1562
1564
  - lib/ultracart_api/models/order_item_edi_identification.rb