ultracart_api 4.1.87 → 4.1.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b52c55df79bfa993a5bf17317604d6e41791b4bf81e0f6364c87ce9e30f87e6
4
- data.tar.gz: 541bc62a5406b94c5719e30a975e8a0f3afd8c89d3609440f96838512f1e7074
3
+ metadata.gz: efaed1b31d103f12d7258eae8733cb3a28e9c0f41de39ebce07c499cf266ef6c
4
+ data.tar.gz: b691f33913b5f6a6582ce264ab4b52cd97c080cedfb6ed162f558ea5db9fd6c4
5
5
  SHA512:
6
- metadata.gz: 1a0b39ad2c4ad93d11d00d27be6a6e4e6b499ecafb6392ed8d15d8eb16f2b4211924b1a1c4dc4d80f85be50bdcbb081d628290957ee008160a67e8dc48e1524e
7
- data.tar.gz: bc9b11eedcd22ae64d942fdadcfdda36cdc38693a476ee38e245e3406b89ff3fcfc978b29dc9fa8e979f9eb0072f8c3ba8cac0a77c3c51701887639b79110969
6
+ metadata.gz: 1a1dd42c639e6b0d2ad68b48aabae53b1d5c6b4b62d0e60d3b0e6920c736ec0a97daf8131c8e11c49c613ac77014efe308a4c88c2ad0c780b84ddc459efb99f5
7
+ data.tar.gz: bfe67f849bb4fe24ba696f571c151c28fb332612ebeb86e131f4e574c87450018ca281dcad7b37a77c05ee98e4bdd92b492ed25c6da9a60bd1758afecac1d9da
data/README.md CHANGED
@@ -7,7 +7,7 @@ Note: Every method has a sample for every language. See https://github.com/Ultr
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.1.87
10
+ - Package version: 4.1.88
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  - For more information, please visit [http://www.ultracart.com/api/](http://www.ultracart.com/api/)
13
13
 
@@ -16,7 +16,7 @@ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-g
16
16
  gemfile:
17
17
 
18
18
  ```shell
19
- gem 'ultracart_api', '4.1.87'
19
+ gem 'ultracart_api', '4.1.88'
20
20
  ```
21
21
 
22
22
  install:
@@ -422,6 +422,7 @@ Class | Method | HTTP request | Description
422
422
  *UltracartClient::OrderApi* | [**get_order_by_token**](docs/OrderApi.md#get_order_by_token) | **POST** /order/orders/token | Retrieve an order using a token
423
423
  *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.
424
424
  *UltracartClient::OrderApi* | [**get_order_emails**](docs/OrderApi.md#get_order_emails) | **GET** /order/orders/{order_id}/emails | Retrieve email delivery information for this order.
425
+ *UltracartClient::OrderApi* | [**get_order_page_view_history**](docs/OrderApi.md#get_order_page_view_history) | **GET** /order/orders/{order_id}/page_view_history | Retrieve page view history for this order.
425
426
  *UltracartClient::OrderApi* | [**get_order_upsell_cart**](docs/OrderApi.md#get_order_upsell_cart) | **PUT** /order/orders/{order_id}/upsell_with_cart | Get Order Upsell Cart
426
427
  *UltracartClient::OrderApi* | [**get_orders**](docs/OrderApi.md#get_orders) | **GET** /order/orders | Retrieve orders
427
428
  *UltracartClient::OrderApi* | [**get_orders_batch**](docs/OrderApi.md#get_orders_batch) | **POST** /order/orders/batch | Retrieve order batch
@@ -1448,6 +1449,10 @@ Class | Method | HTTP request | Description
1448
1449
  - [UltracartClient::OrderLinkedShipment](docs/OrderLinkedShipment.md)
1449
1450
  - [UltracartClient::OrderMarketing](docs/OrderMarketing.md)
1450
1451
  - [UltracartClient::OrderPackingSlipResponse](docs/OrderPackingSlipResponse.md)
1452
+ - [UltracartClient::OrderPageView](docs/OrderPageView.md)
1453
+ - [UltracartClient::OrderPageViewHistoryResponse](docs/OrderPageViewHistoryResponse.md)
1454
+ - [UltracartClient::OrderPageViewMetaData](docs/OrderPageViewMetaData.md)
1455
+ - [UltracartClient::OrderPageViewParam](docs/OrderPageViewParam.md)
1451
1456
  - [UltracartClient::OrderPayment](docs/OrderPayment.md)
1452
1457
  - [UltracartClient::OrderPaymentCheck](docs/OrderPaymentCheck.md)
1453
1458
  - [UltracartClient::OrderPaymentCreditCard](docs/OrderPaymentCreditCard.md)
@@ -1741,6 +1746,7 @@ Not every change is committed to every SDK.
1741
1746
 
1742
1747
  | Version | Date | Comments |
1743
1748
  | --: | :-: | --- |
1749
+ | 4.1.88 | 05/08/2026 | order page view history |
1744
1750
  | 4.1.87 | 05/08/2026 | order and auto order emails |
1745
1751
  | 4.1.86 | 05/07/2026 | rest auto order api - additional item cancel request parameter for no orders after dts |
1746
1752
  | 4.1.85 | 05/05/2026 | improved warning object for customer insertCustomer and updateCustomer |
data/docs/OrderApi.md CHANGED
@@ -23,6 +23,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
23
23
  | [**get_order_by_token**](OrderApi.md#get_order_by_token) | **POST** /order/orders/token | Retrieve an order using a token |
24
24
  | [**get_order_edi_documents**](OrderApi.md#get_order_edi_documents) | **GET** /order/orders/{order_id}/edi | Retrieve EDI documents associated with this order. |
25
25
  | [**get_order_emails**](OrderApi.md#get_order_emails) | **GET** /order/orders/{order_id}/emails | Retrieve email delivery information for this order. |
26
+ | [**get_order_page_view_history**](OrderApi.md#get_order_page_view_history) | **GET** /order/orders/{order_id}/page_view_history | Retrieve page view history for this order. |
26
27
  | [**get_order_upsell_cart**](OrderApi.md#get_order_upsell_cart) | **PUT** /order/orders/{order_id}/upsell_with_cart | Get Order Upsell Cart |
27
28
  | [**get_orders**](OrderApi.md#get_orders) | **GET** /order/orders | Retrieve orders |
28
29
  | [**get_orders_batch**](OrderApi.md#get_orders_batch) | **POST** /order/orders/batch | Retrieve order batch |
@@ -1413,6 +1414,59 @@ end
1413
1414
  - **Accept**: application/json
1414
1415
 
1415
1416
 
1417
+ ## get_order_page_view_history
1418
+
1419
+ > <OrderPageViewHistoryResponse> get_order_page_view_history(order_id)
1420
+
1421
+ Retrieve page view history for this order.
1422
+
1423
+ Retrieves the page views captured during the session that placed this order.
1424
+
1425
+
1426
+ ### Examples
1427
+
1428
+
1429
+ (No example for this operation).
1430
+
1431
+
1432
+ #### Using the get_order_page_view_history_with_http_info variant
1433
+
1434
+ This returns an Array which contains the response data, status code and headers.
1435
+
1436
+ > <Array(<OrderPageViewHistoryResponse>, Integer, Hash)> get_order_page_view_history_with_http_info(order_id)
1437
+
1438
+ ```ruby
1439
+ begin
1440
+ # Retrieve page view history for this order.
1441
+ data, status_code, headers = api_instance.get_order_page_view_history_with_http_info(order_id)
1442
+ p status_code # => 2xx
1443
+ p headers # => { ... }
1444
+ p data # => <OrderPageViewHistoryResponse>
1445
+ rescue UltracartClient::ApiError => e
1446
+ puts "Error when calling OrderApi->get_order_page_view_history_with_http_info: #{e}"
1447
+ end
1448
+ ```
1449
+
1450
+ ### Parameters
1451
+
1452
+ | Name | Type | Description | Notes |
1453
+ | ---- | ---- | ----------- | ----- |
1454
+ | **order_id** | **String** | The order id to retrieve page view history for. | |
1455
+
1456
+ ### Return type
1457
+
1458
+ [**OrderPageViewHistoryResponse**](OrderPageViewHistoryResponse.md)
1459
+
1460
+ ### Authorization
1461
+
1462
+ [ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
1463
+
1464
+ ### HTTP request headers
1465
+
1466
+ - **Content-Type**: Not defined
1467
+ - **Accept**: application/json
1468
+
1469
+
1416
1470
  ## get_order_upsell_cart
1417
1471
 
1418
1472
  > <OrderResponse> get_order_upsell_cart(order_id, upsell_cart_request, opts)
@@ -0,0 +1,26 @@
1
+ # UltracartClient::OrderPageView
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **meta_data** | [**Array&lt;OrderPageViewMetaData&gt;**](OrderPageViewMetaData.md) | Meta tag name/value pairs captured on the page view | [optional] |
8
+ | **params** | [**Array&lt;OrderPageViewParam&gt;**](OrderPageViewParam.md) | Query string parameters captured on the page view | [optional] |
9
+ | **time_on_page** | **Integer** | Time spent on the page in seconds | [optional] |
10
+ | **url** | **String** | URL of the page that was viewed | [optional] |
11
+ | **view_dts** | **String** | Date/time the page was viewed | [optional] |
12
+
13
+ ## Example
14
+
15
+ ```ruby
16
+ require 'ultracart_api'
17
+
18
+ instance = UltracartClient::OrderPageView.new(
19
+ meta_data: null,
20
+ params: null,
21
+ time_on_page: null,
22
+ url: null,
23
+ view_dts: null
24
+ )
25
+ ```
26
+
@@ -0,0 +1,28 @@
1
+ # UltracartClient::OrderPageViewHistoryResponse
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **error** | [**Error**](Error.md) | | [optional] |
8
+ | **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
9
+ | **page_views** | [**Array&lt;OrderPageView&gt;**](OrderPageView.md) | Page views captured during the session that placed this order | [optional] |
10
+ | **referrer** | **String** | HTTP referrer captured at the start of the session that placed this order | [optional] |
11
+ | **success** | **Boolean** | Indicates if API call was successful | [optional] |
12
+ | **warning** | [**Warning**](Warning.md) | | [optional] |
13
+
14
+ ## Example
15
+
16
+ ```ruby
17
+ require 'ultracart_api'
18
+
19
+ instance = UltracartClient::OrderPageViewHistoryResponse.new(
20
+ error: null,
21
+ metadata: null,
22
+ page_views: null,
23
+ referrer: null,
24
+ success: null,
25
+ warning: null
26
+ )
27
+ ```
28
+
@@ -0,0 +1,20 @@
1
+ # UltracartClient::OrderPageViewMetaData
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | Meta tag name | [optional] |
8
+ | **value** | **String** | Meta tag value | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'ultracart_api'
14
+
15
+ instance = UltracartClient::OrderPageViewMetaData.new(
16
+ name: null,
17
+ value: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,20 @@
1
+ # UltracartClient::OrderPageViewParam
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **name** | **String** | Query string parameter name | [optional] |
8
+ | **value** | **String** | Query string parameter value | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'ultracart_api'
14
+
15
+ instance = UltracartClient::OrderPageViewParam.new(
16
+ name: null,
17
+ value: null
18
+ )
19
+ ```
20
+
@@ -1300,6 +1300,70 @@ module UltracartClient
1300
1300
  return data, status_code, headers
1301
1301
  end
1302
1302
 
1303
+ # Retrieve page view history for this order.
1304
+ # Retrieves the page views captured during the session that placed this order.
1305
+ # @param order_id [String] The order id to retrieve page view history for.
1306
+ # @param [Hash] opts the optional parameters
1307
+ # @return [OrderPageViewHistoryResponse]
1308
+ def get_order_page_view_history(order_id, opts = {})
1309
+ data, _status_code, _headers = get_order_page_view_history_with_http_info(order_id, opts)
1310
+ data
1311
+ end
1312
+
1313
+ # Retrieve page view history for this order.
1314
+ # Retrieves the page views captured during the session that placed this order.
1315
+ # @param order_id [String] The order id to retrieve page view history for.
1316
+ # @param [Hash] opts the optional parameters
1317
+ # @return [Array<(OrderPageViewHistoryResponse, Integer, Hash)>] OrderPageViewHistoryResponse data, response status code and response headers
1318
+ def get_order_page_view_history_with_http_info(order_id, opts = {})
1319
+ if @api_client.config.debugging
1320
+ @api_client.config.logger.debug 'Calling API: OrderApi.get_order_page_view_history ...'
1321
+ end
1322
+ # verify the required parameter 'order_id' is set
1323
+ if @api_client.config.client_side_validation && order_id.nil?
1324
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.get_order_page_view_history"
1325
+ end
1326
+ # resource path
1327
+ local_var_path = '/order/orders/{order_id}/page_view_history'.sub('{' + 'order_id' + '}', CGI.escape(order_id.to_s))
1328
+
1329
+ # query parameters
1330
+ query_params = opts[:query_params] || {}
1331
+
1332
+ # header parameters
1333
+ header_params = opts[:header_params] || {}
1334
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
1335
+ # HTTP header 'Accept' (if needed)
1336
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1337
+
1338
+ # form parameters
1339
+ form_params = opts[:form_params] || {}
1340
+
1341
+ # http body (model)
1342
+ post_body = opts[:debug_body]
1343
+
1344
+ # return_type
1345
+ return_type = opts[:debug_return_type] || 'OrderPageViewHistoryResponse'
1346
+
1347
+ # auth_names
1348
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
1349
+
1350
+ new_options = opts.merge(
1351
+ :operation => :"OrderApi.get_order_page_view_history",
1352
+ :header_params => header_params,
1353
+ :query_params => query_params,
1354
+ :form_params => form_params,
1355
+ :body => post_body,
1356
+ :auth_names => auth_names,
1357
+ :return_type => return_type
1358
+ )
1359
+
1360
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1361
+ if @api_client.config.debugging
1362
+ @api_client.config.logger.debug "API called: OrderApi#get_order_page_view_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1363
+ end
1364
+ return data, status_code, headers
1365
+ end
1366
+
1303
1367
  # Get Order Upsell Cart
1304
1368
  # Creates a new cart using cloned information from the order, but with a specific set of items, coupons and optionally a checkout URL to return the customer to
1305
1369
  # @param order_id [String] The order id to base things on.
@@ -0,0 +1,264 @@
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 OrderPageView
18
+ # Meta tag name/value pairs captured on the page view
19
+ attr_accessor :meta_data
20
+
21
+ # Query string parameters captured on the page view
22
+ attr_accessor :params
23
+
24
+ # Time spent on the page in seconds
25
+ attr_accessor :time_on_page
26
+
27
+ # URL of the page that was viewed
28
+ attr_accessor :url
29
+
30
+ # Date/time the page was viewed
31
+ attr_accessor :view_dts
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'meta_data' => :'meta_data',
37
+ :'params' => :'params',
38
+ :'time_on_page' => :'time_on_page',
39
+ :'url' => :'url',
40
+ :'view_dts' => :'view_dts'
41
+ }
42
+ end
43
+
44
+ # Returns all the JSON keys this model knows about
45
+ def self.acceptable_attributes
46
+ attribute_map.values
47
+ end
48
+
49
+ # Attribute type mapping.
50
+ def self.openapi_types
51
+ {
52
+ :'meta_data' => :'Array<OrderPageViewMetaData>',
53
+ :'params' => :'Array<OrderPageViewParam>',
54
+ :'time_on_page' => :'Integer',
55
+ :'url' => :'String',
56
+ :'view_dts' => :'String'
57
+ }
58
+ end
59
+
60
+ # List of attributes with nullable: true
61
+ def self.openapi_nullable
62
+ Set.new([
63
+ ])
64
+ end
65
+
66
+ # Initializes the object
67
+ # @param [Hash] attributes Model attributes in the form of hash
68
+ def initialize(attributes = {})
69
+ if (!attributes.is_a?(Hash))
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::OrderPageView` initialize method"
71
+ end
72
+
73
+ # check to see if the attribute exists and convert string to symbol for hash key
74
+ attributes = attributes.each_with_object({}) { |(k, v), h|
75
+ if (!self.class.attribute_map.key?(k.to_sym))
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::OrderPageView`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
77
+ end
78
+ h[k.to_sym] = v
79
+ }
80
+
81
+ if attributes.key?(:'meta_data')
82
+ if (value = attributes[:'meta_data']).is_a?(Array)
83
+ self.meta_data = value
84
+ end
85
+ end
86
+
87
+ if attributes.key?(:'params')
88
+ if (value = attributes[:'params']).is_a?(Array)
89
+ self.params = value
90
+ end
91
+ end
92
+
93
+ if attributes.key?(:'time_on_page')
94
+ self.time_on_page = attributes[:'time_on_page']
95
+ end
96
+
97
+ if attributes.key?(:'url')
98
+ self.url = attributes[:'url']
99
+ end
100
+
101
+ if attributes.key?(:'view_dts')
102
+ self.view_dts = attributes[:'view_dts']
103
+ end
104
+ end
105
+
106
+ # Show invalid properties with the reasons. Usually used together with valid?
107
+ # @return Array for valid properties with the reasons
108
+ def list_invalid_properties
109
+ invalid_properties = Array.new
110
+ invalid_properties
111
+ end
112
+
113
+ # Check to see if the all the properties in the model are valid
114
+ # @return true if the model is valid
115
+ def valid?
116
+ true
117
+ end
118
+
119
+ # Checks equality by comparing each attribute.
120
+ # @param [Object] Object to be compared
121
+ def ==(o)
122
+ return true if self.equal?(o)
123
+ self.class == o.class &&
124
+ meta_data == o.meta_data &&
125
+ params == o.params &&
126
+ time_on_page == o.time_on_page &&
127
+ url == o.url &&
128
+ view_dts == o.view_dts
129
+ end
130
+
131
+ # @see the `==` method
132
+ # @param [Object] Object to be compared
133
+ def eql?(o)
134
+ self == o
135
+ end
136
+
137
+ # Calculates hash code according to all attributes.
138
+ # @return [Integer] Hash code
139
+ def hash
140
+ [meta_data, params, time_on_page, url, view_dts].hash
141
+ end
142
+
143
+ # Builds the object from hash
144
+ # @param [Hash] attributes Model attributes in the form of hash
145
+ # @return [Object] Returns the model itself
146
+ def self.build_from_hash(attributes)
147
+ new.build_from_hash(attributes)
148
+ end
149
+
150
+ # Builds the object from hash
151
+ # @param [Hash] attributes Model attributes in the form of hash
152
+ # @return [Object] Returns the model itself
153
+ def build_from_hash(attributes)
154
+ return nil unless attributes.is_a?(Hash)
155
+ attributes = attributes.transform_keys(&:to_sym)
156
+ self.class.openapi_types.each_pair do |key, type|
157
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
158
+ self.send("#{key}=", nil)
159
+ elsif type =~ /\AArray<(.*)>/i
160
+ # check to ensure the input is an array given that the attribute
161
+ # is documented as an array but the input is not
162
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
163
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
164
+ end
165
+ elsif !attributes[self.class.attribute_map[key]].nil?
166
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
167
+ end
168
+ end
169
+
170
+ self
171
+ end
172
+
173
+ # Deserializes the data based on type
174
+ # @param string type Data type
175
+ # @param string value Value to be deserialized
176
+ # @return [Object] Deserialized data
177
+ def _deserialize(type, value)
178
+ case type.to_sym
179
+ when :Time
180
+ Time.parse(value)
181
+ when :Date
182
+ Date.parse(value)
183
+ when :String
184
+ value.to_s
185
+ when :Integer
186
+ value.to_i
187
+ when :Float
188
+ value.to_f
189
+ when :Boolean
190
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
191
+ true
192
+ else
193
+ false
194
+ end
195
+ when :Object
196
+ # generic object (usually a Hash), return directly
197
+ value
198
+ when /\AArray<(?<inner_type>.+)>\z/
199
+ inner_type = Regexp.last_match[:inner_type]
200
+ value.map { |v| _deserialize(inner_type, v) }
201
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
202
+ k_type = Regexp.last_match[:k_type]
203
+ v_type = Regexp.last_match[:v_type]
204
+ {}.tap do |hash|
205
+ value.each do |k, v|
206
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
207
+ end
208
+ end
209
+ else # model
210
+ # models (e.g. Pet) or oneOf
211
+ klass = UltracartClient.const_get(type)
212
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
213
+ end
214
+ end
215
+
216
+ # Returns the string representation of the object
217
+ # @return [String] String presentation of the object
218
+ def to_s
219
+ to_hash.to_s
220
+ end
221
+
222
+ # to_body is an alias to to_hash (backward compatibility)
223
+ # @return [Hash] Returns the object in the form of hash
224
+ def to_body
225
+ to_hash
226
+ end
227
+
228
+ # Returns the object in the form of hash
229
+ # @return [Hash] Returns the object in the form of hash
230
+ def to_hash
231
+ hash = {}
232
+ self.class.attribute_map.each_pair do |attr, param|
233
+ value = self.send(attr)
234
+ if value.nil?
235
+ is_nullable = self.class.openapi_nullable.include?(attr)
236
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
237
+ end
238
+
239
+ hash[param] = _to_hash(value)
240
+ end
241
+ hash
242
+ end
243
+
244
+ # Outputs non-array value in the form of hash
245
+ # For object, use to_hash. Otherwise, just return the value
246
+ # @param [Object] value Any valid value
247
+ # @return [Hash] Returns the value in the form of hash
248
+ def _to_hash(value)
249
+ if value.is_a?(Array)
250
+ value.compact.map { |v| _to_hash(v) }
251
+ elsif value.is_a?(Hash)
252
+ {}.tap do |hash|
253
+ value.each { |k, v| hash[k] = _to_hash(v) }
254
+ end
255
+ elsif value.respond_to? :to_hash
256
+ value.to_hash
257
+ else
258
+ value
259
+ end
260
+ end
261
+
262
+ end
263
+
264
+ end
@@ -0,0 +1,269 @@
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 OrderPageViewHistoryResponse
18
+ attr_accessor :error
19
+
20
+ attr_accessor :metadata
21
+
22
+ # Page views captured during the session that placed this order
23
+ attr_accessor :page_views
24
+
25
+ # HTTP referrer captured at the start of the session that placed this order
26
+ attr_accessor :referrer
27
+
28
+ # Indicates if API call was successful
29
+ attr_accessor :success
30
+
31
+ attr_accessor :warning
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'error' => :'error',
37
+ :'metadata' => :'metadata',
38
+ :'page_views' => :'page_views',
39
+ :'referrer' => :'referrer',
40
+ :'success' => :'success',
41
+ :'warning' => :'warning'
42
+ }
43
+ end
44
+
45
+ # Returns all the JSON keys this model knows about
46
+ def self.acceptable_attributes
47
+ attribute_map.values
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.openapi_types
52
+ {
53
+ :'error' => :'Error',
54
+ :'metadata' => :'ResponseMetadata',
55
+ :'page_views' => :'Array<OrderPageView>',
56
+ :'referrer' => :'String',
57
+ :'success' => :'Boolean',
58
+ :'warning' => :'Warning'
59
+ }
60
+ end
61
+
62
+ # List of attributes with nullable: true
63
+ def self.openapi_nullable
64
+ Set.new([
65
+ ])
66
+ end
67
+
68
+ # Initializes the object
69
+ # @param [Hash] attributes Model attributes in the form of hash
70
+ def initialize(attributes = {})
71
+ if (!attributes.is_a?(Hash))
72
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::OrderPageViewHistoryResponse` initialize method"
73
+ end
74
+
75
+ # check to see if the attribute exists and convert string to symbol for hash key
76
+ attributes = attributes.each_with_object({}) { |(k, v), h|
77
+ if (!self.class.attribute_map.key?(k.to_sym))
78
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::OrderPageViewHistoryResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
79
+ end
80
+ h[k.to_sym] = v
81
+ }
82
+
83
+ if attributes.key?(:'error')
84
+ self.error = attributes[:'error']
85
+ end
86
+
87
+ if attributes.key?(:'metadata')
88
+ self.metadata = attributes[:'metadata']
89
+ end
90
+
91
+ if attributes.key?(:'page_views')
92
+ if (value = attributes[:'page_views']).is_a?(Array)
93
+ self.page_views = value
94
+ end
95
+ end
96
+
97
+ if attributes.key?(:'referrer')
98
+ self.referrer = attributes[:'referrer']
99
+ end
100
+
101
+ if attributes.key?(:'success')
102
+ self.success = attributes[:'success']
103
+ end
104
+
105
+ if attributes.key?(:'warning')
106
+ self.warning = attributes[:'warning']
107
+ end
108
+ end
109
+
110
+ # Show invalid properties with the reasons. Usually used together with valid?
111
+ # @return Array for valid properties with the reasons
112
+ def list_invalid_properties
113
+ invalid_properties = Array.new
114
+ invalid_properties
115
+ end
116
+
117
+ # Check to see if the all the properties in the model are valid
118
+ # @return true if the model is valid
119
+ def valid?
120
+ true
121
+ end
122
+
123
+ # Checks equality by comparing each attribute.
124
+ # @param [Object] Object to be compared
125
+ def ==(o)
126
+ return true if self.equal?(o)
127
+ self.class == o.class &&
128
+ error == o.error &&
129
+ metadata == o.metadata &&
130
+ page_views == o.page_views &&
131
+ referrer == o.referrer &&
132
+ success == o.success &&
133
+ warning == o.warning
134
+ end
135
+
136
+ # @see the `==` method
137
+ # @param [Object] Object to be compared
138
+ def eql?(o)
139
+ self == o
140
+ end
141
+
142
+ # Calculates hash code according to all attributes.
143
+ # @return [Integer] Hash code
144
+ def hash
145
+ [error, metadata, page_views, referrer, success, warning].hash
146
+ end
147
+
148
+ # Builds the object from hash
149
+ # @param [Hash] attributes Model attributes in the form of hash
150
+ # @return [Object] Returns the model itself
151
+ def self.build_from_hash(attributes)
152
+ new.build_from_hash(attributes)
153
+ end
154
+
155
+ # Builds the object from hash
156
+ # @param [Hash] attributes Model attributes in the form of hash
157
+ # @return [Object] Returns the model itself
158
+ def build_from_hash(attributes)
159
+ return nil unless attributes.is_a?(Hash)
160
+ attributes = attributes.transform_keys(&:to_sym)
161
+ self.class.openapi_types.each_pair do |key, type|
162
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
163
+ self.send("#{key}=", nil)
164
+ elsif type =~ /\AArray<(.*)>/i
165
+ # check to ensure the input is an array given that the attribute
166
+ # is documented as an array but the input is not
167
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
168
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
169
+ end
170
+ elsif !attributes[self.class.attribute_map[key]].nil?
171
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
172
+ end
173
+ end
174
+
175
+ self
176
+ end
177
+
178
+ # Deserializes the data based on type
179
+ # @param string type Data type
180
+ # @param string value Value to be deserialized
181
+ # @return [Object] Deserialized data
182
+ def _deserialize(type, value)
183
+ case type.to_sym
184
+ when :Time
185
+ Time.parse(value)
186
+ when :Date
187
+ Date.parse(value)
188
+ when :String
189
+ value.to_s
190
+ when :Integer
191
+ value.to_i
192
+ when :Float
193
+ value.to_f
194
+ when :Boolean
195
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
196
+ true
197
+ else
198
+ false
199
+ end
200
+ when :Object
201
+ # generic object (usually a Hash), return directly
202
+ value
203
+ when /\AArray<(?<inner_type>.+)>\z/
204
+ inner_type = Regexp.last_match[:inner_type]
205
+ value.map { |v| _deserialize(inner_type, v) }
206
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
207
+ k_type = Regexp.last_match[:k_type]
208
+ v_type = Regexp.last_match[:v_type]
209
+ {}.tap do |hash|
210
+ value.each do |k, v|
211
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
212
+ end
213
+ end
214
+ else # model
215
+ # models (e.g. Pet) or oneOf
216
+ klass = UltracartClient.const_get(type)
217
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
218
+ end
219
+ end
220
+
221
+ # Returns the string representation of the object
222
+ # @return [String] String presentation of the object
223
+ def to_s
224
+ to_hash.to_s
225
+ end
226
+
227
+ # to_body is an alias to to_hash (backward compatibility)
228
+ # @return [Hash] Returns the object in the form of hash
229
+ def to_body
230
+ to_hash
231
+ end
232
+
233
+ # Returns the object in the form of hash
234
+ # @return [Hash] Returns the object in the form of hash
235
+ def to_hash
236
+ hash = {}
237
+ self.class.attribute_map.each_pair do |attr, param|
238
+ value = self.send(attr)
239
+ if value.nil?
240
+ is_nullable = self.class.openapi_nullable.include?(attr)
241
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
242
+ end
243
+
244
+ hash[param] = _to_hash(value)
245
+ end
246
+ hash
247
+ end
248
+
249
+ # Outputs non-array value in the form of hash
250
+ # For object, use to_hash. Otherwise, just return the value
251
+ # @param [Object] value Any valid value
252
+ # @return [Hash] Returns the value in the form of hash
253
+ def _to_hash(value)
254
+ if value.is_a?(Array)
255
+ value.compact.map { |v| _to_hash(v) }
256
+ elsif value.is_a?(Hash)
257
+ {}.tap do |hash|
258
+ value.each { |k, v| hash[k] = _to_hash(v) }
259
+ end
260
+ elsif value.respond_to? :to_hash
261
+ value.to_hash
262
+ else
263
+ value
264
+ end
265
+ end
266
+
267
+ end
268
+
269
+ end
@@ -0,0 +1,230 @@
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 OrderPageViewMetaData
18
+ # Meta tag name
19
+ attr_accessor :name
20
+
21
+ # Meta tag value
22
+ attr_accessor :value
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'name' => :'name',
28
+ :'value' => :'value'
29
+ }
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'name' => :'String',
41
+ :'value' => :'String'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::OrderPageViewMetaData` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!self.class.attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::OrderPageViewMetaData`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'name')
67
+ self.name = attributes[:'name']
68
+ end
69
+
70
+ if attributes.key?(:'value')
71
+ self.value = attributes[:'value']
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ invalid_properties = Array.new
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ name == o.name &&
94
+ value == o.value
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Integer] Hash code
105
+ def hash
106
+ [name, value].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def self.build_from_hash(attributes)
113
+ new.build_from_hash(attributes)
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ attributes = attributes.transform_keys(&:to_sym)
122
+ self.class.openapi_types.each_pair do |key, type|
123
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
124
+ self.send("#{key}=", nil)
125
+ elsif type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
129
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
130
+ end
131
+ elsif !attributes[self.class.attribute_map[key]].nil?
132
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
+ end
134
+ end
135
+
136
+ self
137
+ end
138
+
139
+ # Deserializes the data based on type
140
+ # @param string type Data type
141
+ # @param string value Value to be deserialized
142
+ # @return [Object] Deserialized data
143
+ def _deserialize(type, value)
144
+ case type.to_sym
145
+ when :Time
146
+ Time.parse(value)
147
+ when :Date
148
+ Date.parse(value)
149
+ when :String
150
+ value.to_s
151
+ when :Integer
152
+ value.to_i
153
+ when :Float
154
+ value.to_f
155
+ when :Boolean
156
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
157
+ true
158
+ else
159
+ false
160
+ end
161
+ when :Object
162
+ # generic object (usually a Hash), return directly
163
+ value
164
+ when /\AArray<(?<inner_type>.+)>\z/
165
+ inner_type = Regexp.last_match[:inner_type]
166
+ value.map { |v| _deserialize(inner_type, v) }
167
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
168
+ k_type = Regexp.last_match[:k_type]
169
+ v_type = Regexp.last_match[:v_type]
170
+ {}.tap do |hash|
171
+ value.each do |k, v|
172
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
173
+ end
174
+ end
175
+ else # model
176
+ # models (e.g. Pet) or oneOf
177
+ klass = UltracartClient.const_get(type)
178
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
179
+ end
180
+ end
181
+
182
+ # Returns the string representation of the object
183
+ # @return [String] String presentation of the object
184
+ def to_s
185
+ to_hash.to_s
186
+ end
187
+
188
+ # to_body is an alias to to_hash (backward compatibility)
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_body
191
+ to_hash
192
+ end
193
+
194
+ # Returns the object in the form of hash
195
+ # @return [Hash] Returns the object in the form of hash
196
+ def to_hash
197
+ hash = {}
198
+ self.class.attribute_map.each_pair do |attr, param|
199
+ value = self.send(attr)
200
+ if value.nil?
201
+ is_nullable = self.class.openapi_nullable.include?(attr)
202
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
203
+ end
204
+
205
+ hash[param] = _to_hash(value)
206
+ end
207
+ hash
208
+ end
209
+
210
+ # Outputs non-array value in the form of hash
211
+ # For object, use to_hash. Otherwise, just return the value
212
+ # @param [Object] value Any valid value
213
+ # @return [Hash] Returns the value in the form of hash
214
+ def _to_hash(value)
215
+ if value.is_a?(Array)
216
+ value.compact.map { |v| _to_hash(v) }
217
+ elsif value.is_a?(Hash)
218
+ {}.tap do |hash|
219
+ value.each { |k, v| hash[k] = _to_hash(v) }
220
+ end
221
+ elsif value.respond_to? :to_hash
222
+ value.to_hash
223
+ else
224
+ value
225
+ end
226
+ end
227
+
228
+ end
229
+
230
+ end
@@ -0,0 +1,230 @@
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 OrderPageViewParam
18
+ # Query string parameter name
19
+ attr_accessor :name
20
+
21
+ # Query string parameter value
22
+ attr_accessor :value
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'name' => :'name',
28
+ :'value' => :'value'
29
+ }
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'name' => :'String',
41
+ :'value' => :'String'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.openapi_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::OrderPageViewParam` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!self.class.attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::OrderPageViewParam`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'name')
67
+ self.name = attributes[:'name']
68
+ end
69
+
70
+ if attributes.key?(:'value')
71
+ self.value = attributes[:'value']
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ invalid_properties = Array.new
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ name == o.name &&
94
+ value == o.value
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Integer] Hash code
105
+ def hash
106
+ [name, value].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def self.build_from_hash(attributes)
113
+ new.build_from_hash(attributes)
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ attributes = attributes.transform_keys(&:to_sym)
122
+ self.class.openapi_types.each_pair do |key, type|
123
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
124
+ self.send("#{key}=", nil)
125
+ elsif type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
129
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
130
+ end
131
+ elsif !attributes[self.class.attribute_map[key]].nil?
132
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
+ end
134
+ end
135
+
136
+ self
137
+ end
138
+
139
+ # Deserializes the data based on type
140
+ # @param string type Data type
141
+ # @param string value Value to be deserialized
142
+ # @return [Object] Deserialized data
143
+ def _deserialize(type, value)
144
+ case type.to_sym
145
+ when :Time
146
+ Time.parse(value)
147
+ when :Date
148
+ Date.parse(value)
149
+ when :String
150
+ value.to_s
151
+ when :Integer
152
+ value.to_i
153
+ when :Float
154
+ value.to_f
155
+ when :Boolean
156
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
157
+ true
158
+ else
159
+ false
160
+ end
161
+ when :Object
162
+ # generic object (usually a Hash), return directly
163
+ value
164
+ when /\AArray<(?<inner_type>.+)>\z/
165
+ inner_type = Regexp.last_match[:inner_type]
166
+ value.map { |v| _deserialize(inner_type, v) }
167
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
168
+ k_type = Regexp.last_match[:k_type]
169
+ v_type = Regexp.last_match[:v_type]
170
+ {}.tap do |hash|
171
+ value.each do |k, v|
172
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
173
+ end
174
+ end
175
+ else # model
176
+ # models (e.g. Pet) or oneOf
177
+ klass = UltracartClient.const_get(type)
178
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
179
+ end
180
+ end
181
+
182
+ # Returns the string representation of the object
183
+ # @return [String] String presentation of the object
184
+ def to_s
185
+ to_hash.to_s
186
+ end
187
+
188
+ # to_body is an alias to to_hash (backward compatibility)
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_body
191
+ to_hash
192
+ end
193
+
194
+ # Returns the object in the form of hash
195
+ # @return [Hash] Returns the object in the form of hash
196
+ def to_hash
197
+ hash = {}
198
+ self.class.attribute_map.each_pair do |attr, param|
199
+ value = self.send(attr)
200
+ if value.nil?
201
+ is_nullable = self.class.openapi_nullable.include?(attr)
202
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
203
+ end
204
+
205
+ hash[param] = _to_hash(value)
206
+ end
207
+ hash
208
+ end
209
+
210
+ # Outputs non-array value in the form of hash
211
+ # For object, use to_hash. Otherwise, just return the value
212
+ # @param [Object] value Any valid value
213
+ # @return [Hash] Returns the value in the form of hash
214
+ def _to_hash(value)
215
+ if value.is_a?(Array)
216
+ value.compact.map { |v| _to_hash(v) }
217
+ elsif value.is_a?(Hash)
218
+ {}.tap do |hash|
219
+ value.each { |k, v| hash[k] = _to_hash(v) }
220
+ end
221
+ elsif value.respond_to? :to_hash
222
+ value.to_hash
223
+ else
224
+ value
225
+ end
226
+ end
227
+
228
+ end
229
+
230
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.1.87'
14
+ VERSION = '4.1.88'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -779,6 +779,10 @@ require 'ultracart_api/models/order_item_tag'
779
779
  require 'ultracart_api/models/order_linked_shipment'
780
780
  require 'ultracart_api/models/order_marketing'
781
781
  require 'ultracart_api/models/order_packing_slip_response'
782
+ require 'ultracart_api/models/order_page_view'
783
+ require 'ultracart_api/models/order_page_view_history_response'
784
+ require 'ultracart_api/models/order_page_view_meta_data'
785
+ require 'ultracart_api/models/order_page_view_param'
782
786
  require 'ultracart_api/models/order_payment'
783
787
  require 'ultracart_api/models/order_payment_check'
784
788
  require 'ultracart_api/models/order_payment_credit_card'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.87
4
+ version: 4.1.88
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
@@ -838,6 +838,10 @@ files:
838
838
  - docs/OrderLinkedShipment.md
839
839
  - docs/OrderMarketing.md
840
840
  - docs/OrderPackingSlipResponse.md
841
+ - docs/OrderPageView.md
842
+ - docs/OrderPageViewHistoryResponse.md
843
+ - docs/OrderPageViewMetaData.md
844
+ - docs/OrderPageViewParam.md
841
845
  - docs/OrderPayment.md
842
846
  - docs/OrderPaymentCheck.md
843
847
  - docs/OrderPaymentCreditCard.md
@@ -1850,6 +1854,10 @@ files:
1850
1854
  - lib/ultracart_api/models/order_linked_shipment.rb
1851
1855
  - lib/ultracart_api/models/order_marketing.rb
1852
1856
  - lib/ultracart_api/models/order_packing_slip_response.rb
1857
+ - lib/ultracart_api/models/order_page_view.rb
1858
+ - lib/ultracart_api/models/order_page_view_history_response.rb
1859
+ - lib/ultracart_api/models/order_page_view_meta_data.rb
1860
+ - lib/ultracart_api/models/order_page_view_param.rb
1853
1861
  - lib/ultracart_api/models/order_payment.rb
1854
1862
  - lib/ultracart_api/models/order_payment_check.rb
1855
1863
  - lib/ultracart_api/models/order_payment_credit_card.rb