ultracart_api 4.0.138 → 4.0.139

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: fa5f2374106efb08b3ea023776ff2022f925d0d4af3cc8e0d5953fbae8c9d781
4
- data.tar.gz: 5f7f8723cb8fa2ad2ce67f25d91bc37a603a943a40c7ed3476ceb8080498adb5
3
+ metadata.gz: 0ce7f59685244a28188e13ed6c037ddddbaa28513b898206abb574056a8d9401
4
+ data.tar.gz: 843646f29e2e51b35e8b740d25046c195e9be1a59328ed76d6555efe0729ae1b
5
5
  SHA512:
6
- metadata.gz: 3c0d2a2f0c601e33fbb12872613b1d4b0fa0d9781d2e828aff746f415a93f5606006f1905b9f2b1ee58dc12aaafdca0ba04a1a1dcc6b1c5e24a9f1f29cb84aa4
7
- data.tar.gz: f2b70b07493cd04ebc39d5d7215274e1488a1e1b26503daf499d7a3b30a6b68e7be4021b7590e15379f557e0f33750ed8a43acaeffc8978e078b9133491e7a6a
6
+ metadata.gz: 3e5d7f095772e2c5f0c0f786f0216c7746ee8479154eed2e6526767cceeaf4bfdda841b034d18a81b1c77db444845f94052c4ce008deab6446f03912425067f4
7
+ data.tar.gz: 744003a775fb34645b7ffe0fd0855b94dc6bbc0cbae4fcd93637db949ed63d11f869277ad94023f98269683fa5f221cf93192b26e4d857ac94e20821ec9c4b51
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 4.0.138
10
+ - Package version: 4.0.139
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
13
13
 
@@ -24,16 +24,16 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-4.0.138.gem
27
+ gem install ./ultracart_api-4.0.139.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./ultracart_api-4.0.138.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./ultracart_api-4.0.139.gem` to install the development dependencies)
31
31
 
32
32
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
33
 
34
34
  Finally add this to the Gemfile:
35
35
 
36
- gem 'ultracart_api', '~> 4.0.138'
36
+ gem 'ultracart_api', '~> 4.0.139'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -260,6 +260,7 @@ Class | Method | HTTP request | Description
260
260
  *UltracartClient::OrderApi* | [**get_accounts_receivable_retry_stats**](docs/OrderApi.md#get_accounts_receivable_retry_stats) | **GET** /order/accountsReceivableRetryConfig/stats | Retrieve A/R Retry Statistics
261
261
  *UltracartClient::OrderApi* | [**get_order**](docs/OrderApi.md#get_order) | **GET** /order/orders/{order_id} | Retrieve an order
262
262
  *UltracartClient::OrderApi* | [**get_order_by_token**](docs/OrderApi.md#get_order_by_token) | **POST** /order/orders/token | Retrieve an order using a token
263
+ *UltracartClient::OrderApi* | [**get_order_edi_documents**](docs/OrderApi.md#get_order_edi_documents) | **GET** /order/orders/{order_id}/edi | Retrieve EDI documents associated with this order.
263
264
  *UltracartClient::OrderApi* | [**get_orders**](docs/OrderApi.md#get_orders) | **GET** /order/orders | Retrieve orders
264
265
  *UltracartClient::OrderApi* | [**get_orders_batch**](docs/OrderApi.md#get_orders_batch) | **POST** /order/orders/batch | Retrieve order batch
265
266
  *UltracartClient::OrderApi* | [**get_orders_by_query**](docs/OrderApi.md#get_orders_by_query) | **POST** /order/orders/query | Retrieve orders by query
@@ -1059,6 +1060,8 @@ Class | Method | HTTP request | Description
1059
1060
  - [UltracartClient::OrderDigitalItem](docs/OrderDigitalItem.md)
1060
1061
  - [UltracartClient::OrderDigitalOrder](docs/OrderDigitalOrder.md)
1061
1062
  - [UltracartClient::OrderEdi](docs/OrderEdi.md)
1063
+ - [UltracartClient::OrderEdiDocument](docs/OrderEdiDocument.md)
1064
+ - [UltracartClient::OrderEdiDocumentsResponse](docs/OrderEdiDocumentsResponse.md)
1062
1065
  - [UltracartClient::OrderFormat](docs/OrderFormat.md)
1063
1066
  - [UltracartClient::OrderFormatResponse](docs/OrderFormatResponse.md)
1064
1067
  - [UltracartClient::OrderFraudScore](docs/OrderFraudScore.md)
@@ -1312,6 +1315,7 @@ Not every change is committed to every SDK.
1312
1315
 
1313
1316
  | Version | Date | Comments |
1314
1317
  | --: | :-: | --- |
1318
+ | 4.0.139 | 03/14/2023 | order.getOrderEdiDocuments |
1315
1319
  | 4.0.138 | 03/01/2023 | convo - add sentiment record to conversation obj |
1316
1320
  | 4.0.137 | 02/22/2023 | convo - customer initiated flag on engagement |
1317
1321
  | 4.0.136 | 02/20/2023 | refund reasons |
data/docs/OrderApi.md CHANGED
@@ -17,6 +17,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
17
17
  | [**get_accounts_receivable_retry_stats**](OrderApi.md#get_accounts_receivable_retry_stats) | **GET** /order/accountsReceivableRetryConfig/stats | Retrieve A/R Retry Statistics |
18
18
  | [**get_order**](OrderApi.md#get_order) | **GET** /order/orders/{order_id} | Retrieve an order |
19
19
  | [**get_order_by_token**](OrderApi.md#get_order_by_token) | **POST** /order/orders/token | Retrieve an order using a token |
20
+ | [**get_order_edi_documents**](OrderApi.md#get_order_edi_documents) | **GET** /order/orders/{order_id}/edi | Retrieve EDI documents associated with this order. |
20
21
  | [**get_orders**](OrderApi.md#get_orders) | **GET** /order/orders | Retrieve orders |
21
22
  | [**get_orders_batch**](OrderApi.md#get_orders_batch) | **POST** /order/orders/batch | Retrieve order batch |
22
23
  | [**get_orders_by_query**](OrderApi.md#get_orders_by_query) | **POST** /order/orders/query | Retrieve orders by query |
@@ -972,6 +973,77 @@ end
972
973
  - **Accept**: application/json
973
974
 
974
975
 
976
+ ## get_order_edi_documents
977
+
978
+ > <OrderEdiDocumentsResponse> get_order_edi_documents(order_id)
979
+
980
+ Retrieve EDI documents associated with this order.
981
+
982
+ Retrieve EDI documents associated with this order.
983
+
984
+ ### Examples
985
+
986
+ ```ruby
987
+ require 'time'
988
+ require 'ultracart_api'
989
+ require 'json'
990
+ require 'yaml'
991
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
992
+
993
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
994
+ # As such, this might not be the best way to use this object.
995
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
996
+
997
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
998
+ order_id = 'order_id_example' # String | The order id to retrieve EDI documents for.
999
+
1000
+ begin
1001
+ # Retrieve EDI documents associated with this order.
1002
+ result = api_instance.get_order_edi_documents(order_id)
1003
+ p result
1004
+ rescue UltracartClient::ApiError => e
1005
+ puts "Error when calling OrderApi->get_order_edi_documents: #{e}"
1006
+ end
1007
+ ```
1008
+
1009
+ #### Using the get_order_edi_documents_with_http_info variant
1010
+
1011
+ This returns an Array which contains the response data, status code and headers.
1012
+
1013
+ > <Array(<OrderEdiDocumentsResponse>, Integer, Hash)> get_order_edi_documents_with_http_info(order_id)
1014
+
1015
+ ```ruby
1016
+ begin
1017
+ # Retrieve EDI documents associated with this order.
1018
+ data, status_code, headers = api_instance.get_order_edi_documents_with_http_info(order_id)
1019
+ p status_code # => 2xx
1020
+ p headers # => { ... }
1021
+ p data # => <OrderEdiDocumentsResponse>
1022
+ rescue UltracartClient::ApiError => e
1023
+ puts "Error when calling OrderApi->get_order_edi_documents_with_http_info: #{e}"
1024
+ end
1025
+ ```
1026
+
1027
+ ### Parameters
1028
+
1029
+ | Name | Type | Description | Notes |
1030
+ | ---- | ---- | ----------- | ----- |
1031
+ | **order_id** | **String** | The order id to retrieve EDI documents for. | |
1032
+
1033
+ ### Return type
1034
+
1035
+ [**OrderEdiDocumentsResponse**](OrderEdiDocumentsResponse.md)
1036
+
1037
+ ### Authorization
1038
+
1039
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
1040
+
1041
+ ### HTTP request headers
1042
+
1043
+ - **Content-Type**: Not defined
1044
+ - **Accept**: application/json
1045
+
1046
+
975
1047
  ## get_orders
976
1048
 
977
1049
  > <OrdersResponse> get_orders(opts)
@@ -0,0 +1,44 @@
1
+ # UltracartClient::OrderEdiDocument
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **direction** | **String** | Direction the document flowed | [optional] |
8
+ | **doc_dts** | **String** | Date/time the document was created/received | [optional] |
9
+ | **document** | **String** | | [optional] |
10
+ | **document_type_description** | **String** | | [optional] |
11
+ | **document_type_number** | **Integer** | | [optional] |
12
+ | **external_id** | **String** | | [optional] |
13
+ | **functional_acknowledgement** | **String** | | [optional] |
14
+ | **functional_acknowledgement_dts** | **String** | | [optional] |
15
+ | **functional_acknowledgement_pending** | **Boolean** | | [optional] |
16
+ | **group_control_number** | **Integer** | | [optional] |
17
+ | **internal_id** | **String** | | [optional] |
18
+ | **merchant_id** | **String** | | [optional] |
19
+ | **order_id** | **String** | | [optional] |
20
+ | **test_mode** | **Boolean** | | [optional] |
21
+
22
+ ## Example
23
+
24
+ ```ruby
25
+ require 'ultracart_api'
26
+
27
+ instance = UltracartClient::OrderEdiDocument.new(
28
+ direction: null,
29
+ doc_dts: null,
30
+ document: null,
31
+ document_type_description: null,
32
+ document_type_number: null,
33
+ external_id: null,
34
+ functional_acknowledgement: null,
35
+ functional_acknowledgement_dts: null,
36
+ functional_acknowledgement_pending: null,
37
+ group_control_number: null,
38
+ internal_id: null,
39
+ merchant_id: null,
40
+ order_id: null,
41
+ test_mode: null
42
+ )
43
+ ```
44
+
@@ -0,0 +1,26 @@
1
+ # UltracartClient::OrderEdiDocumentsResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **edi_documents** | [**Array&lt;OrderEdiDocument&gt;**](OrderEdiDocument.md) | edi_documents | [optional] |
8
+ | **error** | [**Error**](Error.md) | | [optional] |
9
+ | **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
10
+ | **success** | **Boolean** | Indicates if API call was successful | [optional] |
11
+ | **warning** | [**Warning**](Warning.md) | | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'ultracart_api'
17
+
18
+ instance = UltracartClient::OrderEdiDocumentsResponse.new(
19
+ edi_documents: null,
20
+ error: null,
21
+ metadata: null,
22
+ success: null,
23
+ warning: null
24
+ )
25
+ ```
26
+
@@ -895,6 +895,70 @@ module UltracartClient
895
895
  return data, status_code, headers
896
896
  end
897
897
 
898
+ # Retrieve EDI documents associated with this order.
899
+ # Retrieve EDI documents associated with this order.
900
+ # @param order_id [String] The order id to retrieve EDI documents for.
901
+ # @param [Hash] opts the optional parameters
902
+ # @return [OrderEdiDocumentsResponse]
903
+ def get_order_edi_documents(order_id, opts = {})
904
+ data, _status_code, _headers = get_order_edi_documents_with_http_info(order_id, opts)
905
+ data
906
+ end
907
+
908
+ # Retrieve EDI documents associated with this order.
909
+ # Retrieve EDI documents associated with this order.
910
+ # @param order_id [String] The order id to retrieve EDI documents for.
911
+ # @param [Hash] opts the optional parameters
912
+ # @return [Array<(OrderEdiDocumentsResponse, Integer, Hash)>] OrderEdiDocumentsResponse data, response status code and response headers
913
+ def get_order_edi_documents_with_http_info(order_id, opts = {})
914
+ if @api_client.config.debugging
915
+ @api_client.config.logger.debug 'Calling API: OrderApi.get_order_edi_documents ...'
916
+ end
917
+ # verify the required parameter 'order_id' is set
918
+ if @api_client.config.client_side_validation && order_id.nil?
919
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.get_order_edi_documents"
920
+ end
921
+ # resource path
922
+ local_var_path = '/order/orders/{order_id}/edi'.sub('{' + 'order_id' + '}', CGI.escape(order_id.to_s))
923
+
924
+ # query parameters
925
+ query_params = opts[:query_params] || {}
926
+
927
+ # header parameters
928
+ header_params = opts[:header_params] || {}
929
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
930
+ # HTTP header 'Accept' (if needed)
931
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
932
+
933
+ # form parameters
934
+ form_params = opts[:form_params] || {}
935
+
936
+ # http body (model)
937
+ post_body = opts[:debug_body]
938
+
939
+ # return_type
940
+ return_type = opts[:debug_return_type] || 'OrderEdiDocumentsResponse'
941
+
942
+ # auth_names
943
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
944
+
945
+ new_options = opts.merge(
946
+ :operation => :"OrderApi.get_order_edi_documents",
947
+ :header_params => header_params,
948
+ :query_params => query_params,
949
+ :form_params => form_params,
950
+ :body => post_body,
951
+ :auth_names => auth_names,
952
+ :return_type => return_type
953
+ )
954
+
955
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
956
+ if @api_client.config.debugging
957
+ @api_client.config.logger.debug "API called: OrderApi#get_order_edi_documents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
958
+ end
959
+ return data, status_code, headers
960
+ end
961
+
898
962
  # Retrieve orders
899
963
  # Retrieves a group of orders from the account. If no parameters are specified, the API call will fail with a bad request error. Always specify some parameters to limit the scope of the orders returned to ones you are truly interested in. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
900
964
  # @param [Hash] opts the optional parameters
@@ -0,0 +1,372 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class OrderEdiDocument
18
+ # Direction the document flowed
19
+ attr_accessor :direction
20
+
21
+ # Date/time the document was created/received
22
+ attr_accessor :doc_dts
23
+
24
+ attr_accessor :document
25
+
26
+ attr_accessor :document_type_description
27
+
28
+ attr_accessor :document_type_number
29
+
30
+ attr_accessor :external_id
31
+
32
+ attr_accessor :functional_acknowledgement
33
+
34
+ attr_accessor :functional_acknowledgement_dts
35
+
36
+ attr_accessor :functional_acknowledgement_pending
37
+
38
+ attr_accessor :group_control_number
39
+
40
+ attr_accessor :internal_id
41
+
42
+ attr_accessor :merchant_id
43
+
44
+ attr_accessor :order_id
45
+
46
+ attr_accessor :test_mode
47
+
48
+ class EnumAttributeValidator
49
+ attr_reader :datatype
50
+ attr_reader :allowable_values
51
+
52
+ def initialize(datatype, allowable_values)
53
+ @allowable_values = allowable_values.map do |value|
54
+ case datatype.to_s
55
+ when /Integer/i
56
+ value.to_i
57
+ when /Float/i
58
+ value.to_f
59
+ else
60
+ value
61
+ end
62
+ end
63
+ end
64
+
65
+ def valid?(value)
66
+ !value || allowable_values.include?(value)
67
+ end
68
+ end
69
+
70
+ # Attribute mapping from ruby-style variable name to JSON key.
71
+ def self.attribute_map
72
+ {
73
+ :'direction' => :'direction',
74
+ :'doc_dts' => :'doc_dts',
75
+ :'document' => :'document',
76
+ :'document_type_description' => :'document_type_description',
77
+ :'document_type_number' => :'document_type_number',
78
+ :'external_id' => :'external_id',
79
+ :'functional_acknowledgement' => :'functional_acknowledgement',
80
+ :'functional_acknowledgement_dts' => :'functional_acknowledgement_dts',
81
+ :'functional_acknowledgement_pending' => :'functional_acknowledgement_pending',
82
+ :'group_control_number' => :'group_control_number',
83
+ :'internal_id' => :'internal_id',
84
+ :'merchant_id' => :'merchant_id',
85
+ :'order_id' => :'order_id',
86
+ :'test_mode' => :'test_mode'
87
+ }
88
+ end
89
+
90
+ # Returns all the JSON keys this model knows about
91
+ def self.acceptable_attributes
92
+ attribute_map.values
93
+ end
94
+
95
+ # Attribute type mapping.
96
+ def self.openapi_types
97
+ {
98
+ :'direction' => :'String',
99
+ :'doc_dts' => :'String',
100
+ :'document' => :'String',
101
+ :'document_type_description' => :'String',
102
+ :'document_type_number' => :'Integer',
103
+ :'external_id' => :'String',
104
+ :'functional_acknowledgement' => :'String',
105
+ :'functional_acknowledgement_dts' => :'String',
106
+ :'functional_acknowledgement_pending' => :'Boolean',
107
+ :'group_control_number' => :'Integer',
108
+ :'internal_id' => :'String',
109
+ :'merchant_id' => :'String',
110
+ :'order_id' => :'String',
111
+ :'test_mode' => :'Boolean'
112
+ }
113
+ end
114
+
115
+ # List of attributes with nullable: true
116
+ def self.openapi_nullable
117
+ Set.new([
118
+ ])
119
+ end
120
+
121
+ # Initializes the object
122
+ # @param [Hash] attributes Model attributes in the form of hash
123
+ def initialize(attributes = {})
124
+ if (!attributes.is_a?(Hash))
125
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::OrderEdiDocument` initialize method"
126
+ end
127
+
128
+ # check to see if the attribute exists and convert string to symbol for hash key
129
+ attributes = attributes.each_with_object({}) { |(k, v), h|
130
+ if (!self.class.attribute_map.key?(k.to_sym))
131
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::OrderEdiDocument`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
132
+ end
133
+ h[k.to_sym] = v
134
+ }
135
+
136
+ if attributes.key?(:'direction')
137
+ self.direction = attributes[:'direction']
138
+ end
139
+
140
+ if attributes.key?(:'doc_dts')
141
+ self.doc_dts = attributes[:'doc_dts']
142
+ end
143
+
144
+ if attributes.key?(:'document')
145
+ self.document = attributes[:'document']
146
+ end
147
+
148
+ if attributes.key?(:'document_type_description')
149
+ self.document_type_description = attributes[:'document_type_description']
150
+ end
151
+
152
+ if attributes.key?(:'document_type_number')
153
+ self.document_type_number = attributes[:'document_type_number']
154
+ end
155
+
156
+ if attributes.key?(:'external_id')
157
+ self.external_id = attributes[:'external_id']
158
+ end
159
+
160
+ if attributes.key?(:'functional_acknowledgement')
161
+ self.functional_acknowledgement = attributes[:'functional_acknowledgement']
162
+ end
163
+
164
+ if attributes.key?(:'functional_acknowledgement_dts')
165
+ self.functional_acknowledgement_dts = attributes[:'functional_acknowledgement_dts']
166
+ end
167
+
168
+ if attributes.key?(:'functional_acknowledgement_pending')
169
+ self.functional_acknowledgement_pending = attributes[:'functional_acknowledgement_pending']
170
+ end
171
+
172
+ if attributes.key?(:'group_control_number')
173
+ self.group_control_number = attributes[:'group_control_number']
174
+ end
175
+
176
+ if attributes.key?(:'internal_id')
177
+ self.internal_id = attributes[:'internal_id']
178
+ end
179
+
180
+ if attributes.key?(:'merchant_id')
181
+ self.merchant_id = attributes[:'merchant_id']
182
+ end
183
+
184
+ if attributes.key?(:'order_id')
185
+ self.order_id = attributes[:'order_id']
186
+ end
187
+
188
+ if attributes.key?(:'test_mode')
189
+ self.test_mode = attributes[:'test_mode']
190
+ end
191
+ end
192
+
193
+ # Show invalid properties with the reasons. Usually used together with valid?
194
+ # @return Array for valid properties with the reasons
195
+ def list_invalid_properties
196
+ invalid_properties = Array.new
197
+ invalid_properties
198
+ end
199
+
200
+ # Check to see if the all the properties in the model are valid
201
+ # @return true if the model is valid
202
+ def valid?
203
+ direction_validator = EnumAttributeValidator.new('String', ["inbound", "outbound"])
204
+ return false unless direction_validator.valid?(@direction)
205
+ true
206
+ end
207
+
208
+ # Custom attribute writer method checking allowed values (enum).
209
+ # @param [Object] direction Object to be assigned
210
+ def direction=(direction)
211
+ validator = EnumAttributeValidator.new('String', ["inbound", "outbound"])
212
+ unless validator.valid?(direction)
213
+ fail ArgumentError, "invalid value for \"direction\", must be one of #{validator.allowable_values}."
214
+ end
215
+ @direction = direction
216
+ end
217
+
218
+ # Checks equality by comparing each attribute.
219
+ # @param [Object] Object to be compared
220
+ def ==(o)
221
+ return true if self.equal?(o)
222
+ self.class == o.class &&
223
+ direction == o.direction &&
224
+ doc_dts == o.doc_dts &&
225
+ document == o.document &&
226
+ document_type_description == o.document_type_description &&
227
+ document_type_number == o.document_type_number &&
228
+ external_id == o.external_id &&
229
+ functional_acknowledgement == o.functional_acknowledgement &&
230
+ functional_acknowledgement_dts == o.functional_acknowledgement_dts &&
231
+ functional_acknowledgement_pending == o.functional_acknowledgement_pending &&
232
+ group_control_number == o.group_control_number &&
233
+ internal_id == o.internal_id &&
234
+ merchant_id == o.merchant_id &&
235
+ order_id == o.order_id &&
236
+ test_mode == o.test_mode
237
+ end
238
+
239
+ # @see the `==` method
240
+ # @param [Object] Object to be compared
241
+ def eql?(o)
242
+ self == o
243
+ end
244
+
245
+ # Calculates hash code according to all attributes.
246
+ # @return [Integer] Hash code
247
+ def hash
248
+ [direction, doc_dts, document, document_type_description, document_type_number, external_id, functional_acknowledgement, functional_acknowledgement_dts, functional_acknowledgement_pending, group_control_number, internal_id, merchant_id, order_id, test_mode].hash
249
+ end
250
+
251
+ # Builds the object from hash
252
+ # @param [Hash] attributes Model attributes in the form of hash
253
+ # @return [Object] Returns the model itself
254
+ def self.build_from_hash(attributes)
255
+ new.build_from_hash(attributes)
256
+ end
257
+
258
+ # Builds the object from hash
259
+ # @param [Hash] attributes Model attributes in the form of hash
260
+ # @return [Object] Returns the model itself
261
+ def build_from_hash(attributes)
262
+ return nil unless attributes.is_a?(Hash)
263
+ attributes = attributes.transform_keys(&:to_sym)
264
+ self.class.openapi_types.each_pair do |key, type|
265
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
266
+ self.send("#{key}=", nil)
267
+ elsif type =~ /\AArray<(.*)>/i
268
+ # check to ensure the input is an array given that the attribute
269
+ # is documented as an array but the input is not
270
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
271
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
272
+ end
273
+ elsif !attributes[self.class.attribute_map[key]].nil?
274
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
275
+ end
276
+ end
277
+
278
+ self
279
+ end
280
+
281
+ # Deserializes the data based on type
282
+ # @param string type Data type
283
+ # @param string value Value to be deserialized
284
+ # @return [Object] Deserialized data
285
+ def _deserialize(type, value)
286
+ case type.to_sym
287
+ when :Time
288
+ Time.parse(value)
289
+ when :Date
290
+ Date.parse(value)
291
+ when :String
292
+ value.to_s
293
+ when :Integer
294
+ value.to_i
295
+ when :Float
296
+ value.to_f
297
+ when :Boolean
298
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
299
+ true
300
+ else
301
+ false
302
+ end
303
+ when :Object
304
+ # generic object (usually a Hash), return directly
305
+ value
306
+ when /\AArray<(?<inner_type>.+)>\z/
307
+ inner_type = Regexp.last_match[:inner_type]
308
+ value.map { |v| _deserialize(inner_type, v) }
309
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
310
+ k_type = Regexp.last_match[:k_type]
311
+ v_type = Regexp.last_match[:v_type]
312
+ {}.tap do |hash|
313
+ value.each do |k, v|
314
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
315
+ end
316
+ end
317
+ else # model
318
+ # models (e.g. Pet) or oneOf
319
+ klass = UltracartClient.const_get(type)
320
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
321
+ end
322
+ end
323
+
324
+ # Returns the string representation of the object
325
+ # @return [String] String presentation of the object
326
+ def to_s
327
+ to_hash.to_s
328
+ end
329
+
330
+ # to_body is an alias to to_hash (backward compatibility)
331
+ # @return [Hash] Returns the object in the form of hash
332
+ def to_body
333
+ to_hash
334
+ end
335
+
336
+ # Returns the object in the form of hash
337
+ # @return [Hash] Returns the object in the form of hash
338
+ def to_hash
339
+ hash = {}
340
+ self.class.attribute_map.each_pair do |attr, param|
341
+ value = self.send(attr)
342
+ if value.nil?
343
+ is_nullable = self.class.openapi_nullable.include?(attr)
344
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
345
+ end
346
+
347
+ hash[param] = _to_hash(value)
348
+ end
349
+ hash
350
+ end
351
+
352
+ # Outputs non-array value in the form of hash
353
+ # For object, use to_hash. Otherwise, just return the value
354
+ # @param [Object] value Any valid value
355
+ # @return [Hash] Returns the value in the form of hash
356
+ def _to_hash(value)
357
+ if value.is_a?(Array)
358
+ value.compact.map { |v| _to_hash(v) }
359
+ elsif value.is_a?(Hash)
360
+ {}.tap do |hash|
361
+ value.each { |k, v| hash[k] = _to_hash(v) }
362
+ end
363
+ elsif value.respond_to? :to_hash
364
+ value.to_hash
365
+ else
366
+ value
367
+ end
368
+ end
369
+
370
+ end
371
+
372
+ end
@@ -0,0 +1,259 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class OrderEdiDocumentsResponse
18
+ # edi_documents
19
+ attr_accessor :edi_documents
20
+
21
+ attr_accessor :error
22
+
23
+ attr_accessor :metadata
24
+
25
+ # Indicates if API call was successful
26
+ attr_accessor :success
27
+
28
+ attr_accessor :warning
29
+
30
+ # Attribute mapping from ruby-style variable name to JSON key.
31
+ def self.attribute_map
32
+ {
33
+ :'edi_documents' => :'ediDocuments',
34
+ :'error' => :'error',
35
+ :'metadata' => :'metadata',
36
+ :'success' => :'success',
37
+ :'warning' => :'warning'
38
+ }
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'edi_documents' => :'Array<OrderEdiDocument>',
50
+ :'error' => :'Error',
51
+ :'metadata' => :'ResponseMetadata',
52
+ :'success' => :'Boolean',
53
+ :'warning' => :'Warning'
54
+ }
55
+ end
56
+
57
+ # List of attributes with nullable: true
58
+ def self.openapi_nullable
59
+ Set.new([
60
+ ])
61
+ end
62
+
63
+ # Initializes the object
64
+ # @param [Hash] attributes Model attributes in the form of hash
65
+ def initialize(attributes = {})
66
+ if (!attributes.is_a?(Hash))
67
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::OrderEdiDocumentsResponse` initialize method"
68
+ end
69
+
70
+ # check to see if the attribute exists and convert string to symbol for hash key
71
+ attributes = attributes.each_with_object({}) { |(k, v), h|
72
+ if (!self.class.attribute_map.key?(k.to_sym))
73
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::OrderEdiDocumentsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
74
+ end
75
+ h[k.to_sym] = v
76
+ }
77
+
78
+ if attributes.key?(:'edi_documents')
79
+ if (value = attributes[:'edi_documents']).is_a?(Array)
80
+ self.edi_documents = value
81
+ end
82
+ end
83
+
84
+ if attributes.key?(:'error')
85
+ self.error = attributes[:'error']
86
+ end
87
+
88
+ if attributes.key?(:'metadata')
89
+ self.metadata = attributes[:'metadata']
90
+ end
91
+
92
+ if attributes.key?(:'success')
93
+ self.success = attributes[:'success']
94
+ end
95
+
96
+ if attributes.key?(:'warning')
97
+ self.warning = attributes[:'warning']
98
+ end
99
+ end
100
+
101
+ # Show invalid properties with the reasons. Usually used together with valid?
102
+ # @return Array for valid properties with the reasons
103
+ def list_invalid_properties
104
+ invalid_properties = Array.new
105
+ invalid_properties
106
+ end
107
+
108
+ # Check to see if the all the properties in the model are valid
109
+ # @return true if the model is valid
110
+ def valid?
111
+ true
112
+ end
113
+
114
+ # Checks equality by comparing each attribute.
115
+ # @param [Object] Object to be compared
116
+ def ==(o)
117
+ return true if self.equal?(o)
118
+ self.class == o.class &&
119
+ edi_documents == o.edi_documents &&
120
+ error == o.error &&
121
+ metadata == o.metadata &&
122
+ success == o.success &&
123
+ warning == o.warning
124
+ end
125
+
126
+ # @see the `==` method
127
+ # @param [Object] Object to be compared
128
+ def eql?(o)
129
+ self == o
130
+ end
131
+
132
+ # Calculates hash code according to all attributes.
133
+ # @return [Integer] Hash code
134
+ def hash
135
+ [edi_documents, error, metadata, success, warning].hash
136
+ end
137
+
138
+ # Builds the object from hash
139
+ # @param [Hash] attributes Model attributes in the form of hash
140
+ # @return [Object] Returns the model itself
141
+ def self.build_from_hash(attributes)
142
+ new.build_from_hash(attributes)
143
+ end
144
+
145
+ # Builds the object from hash
146
+ # @param [Hash] attributes Model attributes in the form of hash
147
+ # @return [Object] Returns the model itself
148
+ def build_from_hash(attributes)
149
+ return nil unless attributes.is_a?(Hash)
150
+ attributes = attributes.transform_keys(&:to_sym)
151
+ self.class.openapi_types.each_pair do |key, type|
152
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
153
+ self.send("#{key}=", nil)
154
+ elsif type =~ /\AArray<(.*)>/i
155
+ # check to ensure the input is an array given that the attribute
156
+ # is documented as an array but the input is not
157
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
158
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
159
+ end
160
+ elsif !attributes[self.class.attribute_map[key]].nil?
161
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
162
+ end
163
+ end
164
+
165
+ self
166
+ end
167
+
168
+ # Deserializes the data based on type
169
+ # @param string type Data type
170
+ # @param string value Value to be deserialized
171
+ # @return [Object] Deserialized data
172
+ def _deserialize(type, value)
173
+ case type.to_sym
174
+ when :Time
175
+ Time.parse(value)
176
+ when :Date
177
+ Date.parse(value)
178
+ when :String
179
+ value.to_s
180
+ when :Integer
181
+ value.to_i
182
+ when :Float
183
+ value.to_f
184
+ when :Boolean
185
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
186
+ true
187
+ else
188
+ false
189
+ end
190
+ when :Object
191
+ # generic object (usually a Hash), return directly
192
+ value
193
+ when /\AArray<(?<inner_type>.+)>\z/
194
+ inner_type = Regexp.last_match[:inner_type]
195
+ value.map { |v| _deserialize(inner_type, v) }
196
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
197
+ k_type = Regexp.last_match[:k_type]
198
+ v_type = Regexp.last_match[:v_type]
199
+ {}.tap do |hash|
200
+ value.each do |k, v|
201
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
202
+ end
203
+ end
204
+ else # model
205
+ # models (e.g. Pet) or oneOf
206
+ klass = UltracartClient.const_get(type)
207
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
208
+ end
209
+ end
210
+
211
+ # Returns the string representation of the object
212
+ # @return [String] String presentation of the object
213
+ def to_s
214
+ to_hash.to_s
215
+ end
216
+
217
+ # to_body is an alias to to_hash (backward compatibility)
218
+ # @return [Hash] Returns the object in the form of hash
219
+ def to_body
220
+ to_hash
221
+ end
222
+
223
+ # Returns the object in the form of hash
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_hash
226
+ hash = {}
227
+ self.class.attribute_map.each_pair do |attr, param|
228
+ value = self.send(attr)
229
+ if value.nil?
230
+ is_nullable = self.class.openapi_nullable.include?(attr)
231
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
232
+ end
233
+
234
+ hash[param] = _to_hash(value)
235
+ end
236
+ hash
237
+ end
238
+
239
+ # Outputs non-array value in the form of hash
240
+ # For object, use to_hash. Otherwise, just return the value
241
+ # @param [Object] value Any valid value
242
+ # @return [Hash] Returns the value in the form of hash
243
+ def _to_hash(value)
244
+ if value.is_a?(Array)
245
+ value.compact.map { |v| _to_hash(v) }
246
+ elsif value.is_a?(Hash)
247
+ {}.tap do |hash|
248
+ value.each { |k, v| hash[k] = _to_hash(v) }
249
+ end
250
+ elsif value.respond_to? :to_hash
251
+ value.to_hash
252
+ else
253
+ value
254
+ end
255
+ end
256
+
257
+ end
258
+
259
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.0.138'
14
+ VERSION = '4.0.139'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -577,6 +577,8 @@ require 'ultracart_api/models/order_coupon'
577
577
  require 'ultracart_api/models/order_digital_item'
578
578
  require 'ultracart_api/models/order_digital_order'
579
579
  require 'ultracart_api/models/order_edi'
580
+ require 'ultracart_api/models/order_edi_document'
581
+ require 'ultracart_api/models/order_edi_documents_response'
580
582
  require 'ultracart_api/models/order_format'
581
583
  require 'ultracart_api/models/order_format_response'
582
584
  require 'ultracart_api/models/order_fraud_score'
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: 4.0.138
4
+ version: 4.0.139
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-01 00:00:00.000000000 Z
11
+ date: 2023-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -635,6 +635,8 @@ files:
635
635
  - docs/OrderDigitalItem.md
636
636
  - docs/OrderDigitalOrder.md
637
637
  - docs/OrderEdi.md
638
+ - docs/OrderEdiDocument.md
639
+ - docs/OrderEdiDocumentsResponse.md
638
640
  - docs/OrderFormat.md
639
641
  - docs/OrderFormatResponse.md
640
642
  - docs/OrderFraudScore.md
@@ -1404,6 +1406,8 @@ files:
1404
1406
  - lib/ultracart_api/models/order_digital_item.rb
1405
1407
  - lib/ultracart_api/models/order_digital_order.rb
1406
1408
  - lib/ultracart_api/models/order_edi.rb
1409
+ - lib/ultracart_api/models/order_edi_document.rb
1410
+ - lib/ultracart_api/models/order_edi_documents_response.rb
1407
1411
  - lib/ultracart_api/models/order_format.rb
1408
1412
  - lib/ultracart_api/models/order_format_response.rb
1409
1413
  - lib/ultracart_api/models/order_fraud_score.rb