ultracart_api 3.11.15 → 3.11.16
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 +4 -4
- data/README.md +9 -7
- data/docs/CustomReportsResponse.md +12 -0
- data/docs/DatawarehouseApi.md +46 -0
- data/docs/OrderApi.md +4 -75
- data/docs/WebhookApi.md +0 -16
- data/lib/ultracart_api/api/datawarehouse_api.rb +49 -0
- data/lib/ultracart_api/api/order_api.rb +4 -86
- data/lib/ultracart_api/api/webhook_api.rb +0 -24
- data/lib/ultracart_api/models/custom_reports_response.rb +224 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +1 -0
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5193e746267b3197311ac8f0a9c849c2385e078ff3c58b7aa3d598e32a357ebf
|
4
|
+
data.tar.gz: fea6ee29a16616b6b3061392d707ddac908bf54e8913db5d45a2cc6b7389f560
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bea4d273179b62709428014f6a031bd2a25ae94214a3318a478f0045ddedce66763f319222bfc65f8c78adb35f5fb5771b11d39aca7188cb735e5cc4322b3569
|
7
|
+
data.tar.gz: 1512b5a8a1124216f36815e8cdc8876b1fa02e9a9a11e1bf40f585bdad3f5db450a7bcdd50eb1d750fe456b0fe1dd2a39b8236d2bd5a95b1cc246a55051264bf
|
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.11.
|
10
|
+
- Package version: 3.11.16
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [http://www.ultracart.com/api/](http://www.ultracart.com/api/)
|
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.11.
|
27
|
+
gem install ./ultracart_api-3.11.16.gem
|
28
28
|
```
|
29
|
-
(for development, run `gem install --dev ./ultracart_api-3.11.
|
29
|
+
(for development, run `gem install --dev ./ultracart_api-3.11.16.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.11.
|
35
|
+
gem 'ultracart_api', '~> 3.11.16'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -276,6 +276,7 @@ Class | Method | HTTP request | Description
|
|
276
276
|
*UltracartClient::DatawarehouseApi* | [**execute_report_queries**](docs/DatawarehouseApi.md#execute_report_queries) | **PUT** /datawarehouse/reports/execute | Execute the report queries
|
277
277
|
*UltracartClient::DatawarehouseApi* | [**get_custom_report**](docs/DatawarehouseApi.md#get_custom_report) | **GET** /datawarehouse/custom_reports/{custom_report_oid} | Get a custom report
|
278
278
|
*UltracartClient::DatawarehouseApi* | [**get_custom_report_account_config**](docs/DatawarehouseApi.md#get_custom_report_account_config) | **GET** /datawarehouse/custom_reports/account_config | Get custom report account configuration
|
279
|
+
*UltracartClient::DatawarehouseApi* | [**get_custom_reports**](docs/DatawarehouseApi.md#get_custom_reports) | **GET** /datawarehouse/custom_reports | Get custom reports
|
279
280
|
*UltracartClient::DatawarehouseApi* | [**get_report**](docs/DatawarehouseApi.md#get_report) | **GET** /datawarehouse/reports/{report_oid} | Get a report
|
280
281
|
*UltracartClient::DatawarehouseApi* | [**get_report_data_set**](docs/DatawarehouseApi.md#get_report_data_set) | **GET** /datawarehouse/reports/dataset/{dataset_uuid} | Get a report data set
|
281
282
|
*UltracartClient::DatawarehouseApi* | [**get_report_data_set_page**](docs/DatawarehouseApi.md#get_report_data_set_page) | **GET** /datawarehouse/reports/dataset/{dataset_uuid}/pages/{page_number} | Get a report data set page
|
@@ -331,7 +332,7 @@ Class | Method | HTTP request | Description
|
|
331
332
|
*UltracartClient::OauthApi* | [**oauth_access_token**](docs/OauthApi.md#oauth_access_token) | **POST** /oauth/token | Exchange authorization code for access token.
|
332
333
|
*UltracartClient::OauthApi* | [**oauth_revoke**](docs/OauthApi.md#oauth_revoke) | **POST** /oauth/revoke | Revoke this OAuth application.
|
333
334
|
*UltracartClient::OrderApi* | [**adjust_order_total**](docs/OrderApi.md#adjust_order_total) | **POST** /order/orders/{order_id}/adjust_order_total/{desired_total} | Adjusts an order total
|
334
|
-
*UltracartClient::OrderApi* | [**block_refund_on_order**](docs/OrderApi.md#block_refund_on_order) | **
|
335
|
+
*UltracartClient::OrderApi* | [**block_refund_on_order**](docs/OrderApi.md#block_refund_on_order) | **GET** /order/orders/{order_id}/refund_block | Set a refund block on an order
|
335
336
|
*UltracartClient::OrderApi* | [**cancel_order**](docs/OrderApi.md#cancel_order) | **POST** /order/orders/{order_id}/cancel | Cancel an order
|
336
337
|
*UltracartClient::OrderApi* | [**delete_order**](docs/OrderApi.md#delete_order) | **DELETE** /order/orders/{order_id} | Delete an order
|
337
338
|
*UltracartClient::OrderApi* | [**duplicate_order**](docs/OrderApi.md#duplicate_order) | **POST** /order/orders/{order_id}/duplicate | Duplicate an order
|
@@ -352,11 +353,10 @@ Class | Method | HTTP request | Description
|
|
352
353
|
*UltracartClient::OrderApi* | [**is_refundable_order**](docs/OrderApi.md#is_refundable_order) | **GET** /order/orders/{order_id}/refundable | Determine if an order can be refunded
|
353
354
|
*UltracartClient::OrderApi* | [**process_payment**](docs/OrderApi.md#process_payment) | **POST** /order/orders/{order_id}/process_payment | Process payment
|
354
355
|
*UltracartClient::OrderApi* | [**refund_order**](docs/OrderApi.md#refund_order) | **PUT** /order/orders/{order_id}/refund | Refund an order
|
355
|
-
*UltracartClient::OrderApi* | [**refund_order_completely**](docs/OrderApi.md#refund_order_completely) | **PUT** /order/orders/{order_id}/refund_completely | Refund an order completely
|
356
356
|
*UltracartClient::OrderApi* | [**replacement**](docs/OrderApi.md#replacement) | **POST** /order/orders/{order_id}/replacement | Replacement order
|
357
357
|
*UltracartClient::OrderApi* | [**resend_receipt**](docs/OrderApi.md#resend_receipt) | **POST** /order/orders/{order_id}/resend_receipt | Resend receipt
|
358
358
|
*UltracartClient::OrderApi* | [**resend_shipment_confirmation**](docs/OrderApi.md#resend_shipment_confirmation) | **POST** /order/orders/{order_id}/resend_shipment_confirmation | Resend shipment confirmation
|
359
|
-
*UltracartClient::OrderApi* | [**unblock_refund_on_order**](docs/OrderApi.md#unblock_refund_on_order) | **
|
359
|
+
*UltracartClient::OrderApi* | [**unblock_refund_on_order**](docs/OrderApi.md#unblock_refund_on_order) | **GET** /order/orders/{order_id}/refund_unblock | Remove a refund block on an order
|
360
360
|
*UltracartClient::OrderApi* | [**update_accounts_receivable_retry_config**](docs/OrderApi.md#update_accounts_receivable_retry_config) | **POST** /order/accountsReceivableRetryConfig | Update A/R Retry Configuration
|
361
361
|
*UltracartClient::OrderApi* | [**update_order**](docs/OrderApi.md#update_order) | **PUT** /order/orders/{order_id} | Update an order
|
362
362
|
*UltracartClient::OrderApi* | [**validate_order**](docs/OrderApi.md#validate_order) | **POST** /order/validate | Validate
|
@@ -920,6 +920,7 @@ Class | Method | HTTP request | Description
|
|
920
920
|
- [UltracartClient::CustomReportQuery](docs/CustomReportQuery.md)
|
921
921
|
- [UltracartClient::CustomReportResponse](docs/CustomReportResponse.md)
|
922
922
|
- [UltracartClient::CustomReportTooltip](docs/CustomReportTooltip.md)
|
923
|
+
- [UltracartClient::CustomReportsResponse](docs/CustomReportsResponse.md)
|
923
924
|
- [UltracartClient::Customer](docs/Customer.md)
|
924
925
|
- [UltracartClient::CustomerActivity](docs/CustomerActivity.md)
|
925
926
|
- [UltracartClient::CustomerAffiliate](docs/CustomerAffiliate.md)
|
@@ -1551,6 +1552,7 @@ Not every change is committed to every SDK.
|
|
1551
1552
|
|
1552
1553
|
| Version | Date | Comments |
|
1553
1554
|
| --: | :-: | --- |
|
1555
|
+
| 3.11.16 | 07/28/2025 | updated doc samples |
|
1554
1556
|
| 3.11.15 | 07/28/2025 | new order methods for blocking and unblocking refunds |
|
1555
1557
|
| 3.11.14 | 07/10/2025 | automation test |
|
1556
1558
|
| 3.11.13 | 05/20/2025 | conversation - virtual agent flag and virtual agent cost |
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# UltracartClient::CustomReportsResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**error** | [**Error**](Error.md) | | [optional]
|
7
|
+
**metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
|
8
|
+
**reports** | [**Array<CustomReport>**](CustomReport.md) | reports | [optional]
|
9
|
+
**success** | **BOOLEAN** | Indicates if API call was successful | [optional]
|
10
|
+
**warning** | [**Warning**](Warning.md) | | [optional]
|
11
|
+
|
12
|
+
|
data/docs/DatawarehouseApi.md
CHANGED
@@ -11,6 +11,7 @@ Method | HTTP request | Description
|
|
11
11
|
[**execute_report_queries**](DatawarehouseApi.md#execute_report_queries) | **PUT** /datawarehouse/reports/execute | Execute the report queries
|
12
12
|
[**get_custom_report**](DatawarehouseApi.md#get_custom_report) | **GET** /datawarehouse/custom_reports/{custom_report_oid} | Get a custom report
|
13
13
|
[**get_custom_report_account_config**](DatawarehouseApi.md#get_custom_report_account_config) | **GET** /datawarehouse/custom_reports/account_config | Get custom report account configuration
|
14
|
+
[**get_custom_reports**](DatawarehouseApi.md#get_custom_reports) | **GET** /datawarehouse/custom_reports | Get custom reports
|
14
15
|
[**get_report**](DatawarehouseApi.md#get_report) | **GET** /datawarehouse/reports/{report_oid} | Get a report
|
15
16
|
[**get_report_data_set**](DatawarehouseApi.md#get_report_data_set) | **GET** /datawarehouse/reports/dataset/{dataset_uuid} | Get a report data set
|
16
17
|
[**get_report_data_set_page**](DatawarehouseApi.md#get_report_data_set_page) | **GET** /datawarehouse/reports/dataset/{dataset_uuid}/pages/{page_number} | Get a report data set page
|
@@ -368,6 +369,51 @@ This endpoint does not need any parameter.
|
|
368
369
|
|
369
370
|
|
370
371
|
|
372
|
+
# **get_custom_reports**
|
373
|
+
> CustomReportsResponse get_custom_reports
|
374
|
+
|
375
|
+
Get custom reports
|
376
|
+
|
377
|
+
Retrieve a custom reports
|
378
|
+
|
379
|
+
### Example
|
380
|
+
```ruby
|
381
|
+
# load the gem
|
382
|
+
require 'ultracart_api'
|
383
|
+
|
384
|
+
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
|
385
|
+
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
|
386
|
+
api_instance = UltracartClient::DatawarehouseApi.new_using_api_key(simple_key, false, false)
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
begin
|
391
|
+
#Get custom reports
|
392
|
+
result = api_instance.get_custom_reports
|
393
|
+
p result
|
394
|
+
rescue UltracartClient::ApiError => e
|
395
|
+
puts "Exception when calling DatawarehouseApi->get_custom_reports: #{e}"
|
396
|
+
end
|
397
|
+
```
|
398
|
+
|
399
|
+
### Parameters
|
400
|
+
This endpoint does not need any parameter.
|
401
|
+
|
402
|
+
### Return type
|
403
|
+
|
404
|
+
[**CustomReportsResponse**](CustomReportsResponse.md)
|
405
|
+
|
406
|
+
### Authorization
|
407
|
+
|
408
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
409
|
+
|
410
|
+
### HTTP request headers
|
411
|
+
|
412
|
+
- **Content-Type**: application/json
|
413
|
+
- **Accept**: application/json
|
414
|
+
|
415
|
+
|
416
|
+
|
371
417
|
# **get_report**
|
372
418
|
> ReportResponse get_report(report_oid)
|
373
419
|
|
data/docs/OrderApi.md
CHANGED
@@ -5,7 +5,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
5
5
|
Method | HTTP request | Description
|
6
6
|
------------- | ------------- | -------------
|
7
7
|
[**adjust_order_total**](OrderApi.md#adjust_order_total) | **POST** /order/orders/{order_id}/adjust_order_total/{desired_total} | Adjusts an order total
|
8
|
-
[**block_refund_on_order**](OrderApi.md#block_refund_on_order) | **
|
8
|
+
[**block_refund_on_order**](OrderApi.md#block_refund_on_order) | **GET** /order/orders/{order_id}/refund_block | Set a refund block on an order
|
9
9
|
[**cancel_order**](OrderApi.md#cancel_order) | **POST** /order/orders/{order_id}/cancel | Cancel an order
|
10
10
|
[**delete_order**](OrderApi.md#delete_order) | **DELETE** /order/orders/{order_id} | Delete an order
|
11
11
|
[**duplicate_order**](OrderApi.md#duplicate_order) | **POST** /order/orders/{order_id}/duplicate | Duplicate an order
|
@@ -26,11 +26,10 @@ Method | HTTP request | Description
|
|
26
26
|
[**is_refundable_order**](OrderApi.md#is_refundable_order) | **GET** /order/orders/{order_id}/refundable | Determine if an order can be refunded
|
27
27
|
[**process_payment**](OrderApi.md#process_payment) | **POST** /order/orders/{order_id}/process_payment | Process payment
|
28
28
|
[**refund_order**](OrderApi.md#refund_order) | **PUT** /order/orders/{order_id}/refund | Refund an order
|
29
|
-
[**refund_order_completely**](OrderApi.md#refund_order_completely) | **PUT** /order/orders/{order_id}/refund_completely | Refund an order completely
|
30
29
|
[**replacement**](OrderApi.md#replacement) | **POST** /order/orders/{order_id}/replacement | Replacement order
|
31
30
|
[**resend_receipt**](OrderApi.md#resend_receipt) | **POST** /order/orders/{order_id}/resend_receipt | Resend receipt
|
32
31
|
[**resend_shipment_confirmation**](OrderApi.md#resend_shipment_confirmation) | **POST** /order/orders/{order_id}/resend_shipment_confirmation | Resend shipment confirmation
|
33
|
-
[**unblock_refund_on_order**](OrderApi.md#unblock_refund_on_order) | **
|
32
|
+
[**unblock_refund_on_order**](OrderApi.md#unblock_refund_on_order) | **GET** /order/orders/{order_id}/refund_unblock | Remove a refund block on an order
|
34
33
|
[**update_accounts_receivable_retry_config**](OrderApi.md#update_accounts_receivable_retry_config) | **POST** /order/accountsReceivableRetryConfig | Update A/R Retry Configuration
|
35
34
|
[**update_order**](OrderApi.md#update_order) | **PUT** /order/orders/{order_id} | Update an order
|
36
35
|
[**validate_order**](OrderApi.md#validate_order) | **POST** /order/validate | Validate
|
@@ -137,7 +136,7 @@ nil (empty response body)
|
|
137
136
|
|
138
137
|
### HTTP request headers
|
139
138
|
|
140
|
-
- **Content-Type**: application/json
|
139
|
+
- **Content-Type**: application/json
|
141
140
|
- **Accept**: application/json
|
142
141
|
|
143
142
|
|
@@ -1266,76 +1265,6 @@ Name | Type | Description | Notes
|
|
1266
1265
|
|
1267
1266
|
|
1268
1267
|
|
1269
|
-
# **refund_order_completely**
|
1270
|
-
> OrderResponse refund_order_completely(order_id, opts)
|
1271
|
-
|
1272
|
-
Refund an order completely
|
1273
|
-
|
1274
|
-
Perform a refund operation on an order and then update the order if successful.
|
1275
|
-
|
1276
|
-
### Example
|
1277
|
-
```ruby
|
1278
|
-
# load the gem
|
1279
|
-
require 'ultracart_api'
|
1280
|
-
|
1281
|
-
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
|
1282
|
-
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
|
1283
|
-
api_instance = UltracartClient::OrderApi.new_using_api_key(simple_key, false, false)
|
1284
|
-
|
1285
|
-
|
1286
|
-
order_id = 'order_id_example' # String | The order id to refund.
|
1287
|
-
|
1288
|
-
opts = {
|
1289
|
-
reject_after_refund: false, # BOOLEAN | Reject order after refund
|
1290
|
-
skip_customer_notification: false, # BOOLEAN | Skip customer email notification
|
1291
|
-
auto_order_cancel: false, # BOOLEAN | Cancel associated auto orders
|
1292
|
-
manual_refund: false, # BOOLEAN | Consider a manual refund done externally
|
1293
|
-
reverse_affiliate_transactions: true, # BOOLEAN | Reverse affiliate transactions
|
1294
|
-
issue_store_credit: false, # BOOLEAN | Issue a store credit instead of refunding the original payment method, loyalty must be configured on merchant account
|
1295
|
-
auto_order_cancel_reason: 'auto_order_cancel_reason_example', # String | Reason for auto orders cancellation
|
1296
|
-
refund_reason: 'refund_reason_example', # String | Reason for refund
|
1297
|
-
reject_reason: 'reject_reason_example' # String | Reason for reject
|
1298
|
-
}
|
1299
|
-
|
1300
|
-
begin
|
1301
|
-
#Refund an order completely
|
1302
|
-
result = api_instance.refund_order_completely(order_id, opts)
|
1303
|
-
p result
|
1304
|
-
rescue UltracartClient::ApiError => e
|
1305
|
-
puts "Exception when calling OrderApi->refund_order_completely: #{e}"
|
1306
|
-
end
|
1307
|
-
```
|
1308
|
-
|
1309
|
-
### Parameters
|
1310
|
-
|
1311
|
-
Name | Type | Description | Notes
|
1312
|
-
------------- | ------------- | ------------- | -------------
|
1313
|
-
**order_id** | **String**| The order id to refund. |
|
1314
|
-
**reject_after_refund** | **BOOLEAN**| Reject order after refund | [optional] [default to false]
|
1315
|
-
**skip_customer_notification** | **BOOLEAN**| Skip customer email notification | [optional] [default to false]
|
1316
|
-
**auto_order_cancel** | **BOOLEAN**| Cancel associated auto orders | [optional] [default to false]
|
1317
|
-
**manual_refund** | **BOOLEAN**| Consider a manual refund done externally | [optional] [default to false]
|
1318
|
-
**reverse_affiliate_transactions** | **BOOLEAN**| Reverse affiliate transactions | [optional] [default to true]
|
1319
|
-
**issue_store_credit** | **BOOLEAN**| Issue a store credit instead of refunding the original payment method, loyalty must be configured on merchant account | [optional] [default to false]
|
1320
|
-
**auto_order_cancel_reason** | **String**| Reason for auto orders cancellation | [optional]
|
1321
|
-
**refund_reason** | **String**| Reason for refund | [optional]
|
1322
|
-
**reject_reason** | **String**| Reason for reject | [optional]
|
1323
|
-
|
1324
|
-
### Return type
|
1325
|
-
|
1326
|
-
[**OrderResponse**](OrderResponse.md)
|
1327
|
-
|
1328
|
-
### Authorization
|
1329
|
-
|
1330
|
-
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
1331
|
-
|
1332
|
-
### HTTP request headers
|
1333
|
-
|
1334
|
-
- **Content-Type**: application/json; charset=UTF-8
|
1335
|
-
- **Accept**: application/json
|
1336
|
-
|
1337
|
-
|
1338
|
-
|
1339
1268
|
# **replacement**
|
1340
1269
|
> OrderReplacementResponse replacement(order_id, replacement)
|
1341
1270
|
|
@@ -1533,7 +1462,7 @@ nil (empty response body)
|
|
1533
1462
|
|
1534
1463
|
### HTTP request headers
|
1535
1464
|
|
1536
|
-
- **Content-Type**: application/json
|
1465
|
+
- **Content-Type**: application/json
|
1537
1466
|
- **Accept**: application/json
|
1538
1467
|
|
1539
1468
|
|
data/docs/WebhookApi.md
CHANGED
@@ -186,14 +186,6 @@ api_instance = UltracartClient::WebhookApi.new_using_api_key(simple_key, false,
|
|
186
186
|
webhook_oid = 56 # Integer | The webhook oid to retrieve log summaries for.
|
187
187
|
|
188
188
|
opts = {
|
189
|
-
request_id: 'request_id_example', # String |
|
190
|
-
begin_date: 'begin_date_example', # String |
|
191
|
-
end_date: 'end_date_example', # String |
|
192
|
-
status: 'status_example', # String |
|
193
|
-
event: 'event_example', # String |
|
194
|
-
order_id: 'order_id_example', # String |
|
195
|
-
request: 'request_example', # String |
|
196
|
-
duration: 56, # Integer |
|
197
189
|
_limit: 100, # Integer | The maximum number of records to return on this one API call.
|
198
190
|
_offset: 0, # Integer | Pagination of the record set. Offset is a zero based index.
|
199
191
|
_since: '_since_example' # String | Fetch log summaries that have been delivered since this date/time.
|
@@ -213,14 +205,6 @@ end
|
|
213
205
|
Name | Type | Description | Notes
|
214
206
|
------------- | ------------- | ------------- | -------------
|
215
207
|
**webhook_oid** | **Integer**| The webhook oid to retrieve log summaries for. |
|
216
|
-
**request_id** | **String**| | [optional]
|
217
|
-
**begin_date** | **String**| | [optional]
|
218
|
-
**end_date** | **String**| | [optional]
|
219
|
-
**status** | **String**| | [optional]
|
220
|
-
**event** | **String**| | [optional]
|
221
|
-
**order_id** | **String**| | [optional]
|
222
|
-
**request** | **String**| | [optional]
|
223
|
-
**duration** | **Integer**| | [optional]
|
224
208
|
**_limit** | **Integer**| The maximum number of records to return on this one API call. | [optional] [default to 100]
|
225
209
|
**_offset** | **Integer**| Pagination of the record set. Offset is a zero based index. | [optional] [default to 0]
|
226
210
|
**_since** | **String**| Fetch log summaries that have been delivered since this date/time. | [optional]
|
@@ -414,6 +414,55 @@ module UltracartClient
|
|
414
414
|
end
|
415
415
|
return data, status_code, headers
|
416
416
|
end
|
417
|
+
# Get custom reports
|
418
|
+
# Retrieve a custom reports
|
419
|
+
# @param [Hash] opts the optional parameters
|
420
|
+
# @return [CustomReportsResponse]
|
421
|
+
def get_custom_reports(opts = {})
|
422
|
+
data, _status_code, _headers = get_custom_reports_with_http_info(opts)
|
423
|
+
data
|
424
|
+
end
|
425
|
+
|
426
|
+
# Get custom reports
|
427
|
+
# Retrieve a custom reports
|
428
|
+
# @param [Hash] opts the optional parameters
|
429
|
+
# @return [Array<(CustomReportsResponse, Fixnum, Hash)>] CustomReportsResponse data, response status code and response headers
|
430
|
+
def get_custom_reports_with_http_info(opts = {})
|
431
|
+
if @api_client.config.debugging
|
432
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.get_custom_reports ...'
|
433
|
+
end
|
434
|
+
# resource path
|
435
|
+
local_var_path = '/datawarehouse/custom_reports'
|
436
|
+
|
437
|
+
# query parameters
|
438
|
+
query_params = {}
|
439
|
+
|
440
|
+
# header parameters
|
441
|
+
header_params = {}
|
442
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
443
|
+
# HTTP header 'Accept' (if needed)
|
444
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
445
|
+
# HTTP header 'Content-Type'
|
446
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
447
|
+
|
448
|
+
# form parameters
|
449
|
+
form_params = {}
|
450
|
+
|
451
|
+
# http body (model)
|
452
|
+
post_body = nil
|
453
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
454
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
455
|
+
:header_params => header_params,
|
456
|
+
:query_params => query_params,
|
457
|
+
:form_params => form_params,
|
458
|
+
:body => post_body,
|
459
|
+
:auth_names => auth_names,
|
460
|
+
:return_type => 'CustomReportsResponse')
|
461
|
+
if @api_client.config.debugging
|
462
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#get_custom_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
463
|
+
end
|
464
|
+
return data, status_code, headers
|
465
|
+
end
|
417
466
|
# Get a report
|
418
467
|
# Retrieve a report
|
419
468
|
# @param report_oid
|
@@ -131,7 +131,7 @@ module UltracartClient
|
|
131
131
|
# HTTP header 'Accept' (if needed)
|
132
132
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
133
133
|
# HTTP header 'Content-Type'
|
134
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json
|
134
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
135
135
|
|
136
136
|
# form parameters
|
137
137
|
form_params = {}
|
@@ -139,7 +139,7 @@ module UltracartClient
|
|
139
139
|
# http body (model)
|
140
140
|
post_body = nil
|
141
141
|
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
142
|
-
data, status_code, headers = @api_client.call_api(:
|
142
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
143
143
|
:header_params => header_params,
|
144
144
|
:query_params => query_params,
|
145
145
|
:form_params => form_params,
|
@@ -1411,88 +1411,6 @@ module UltracartClient
|
|
1411
1411
|
end
|
1412
1412
|
return data, status_code, headers
|
1413
1413
|
end
|
1414
|
-
# Refund an order completely
|
1415
|
-
# Perform a refund operation on an order and then update the order if successful.
|
1416
|
-
# @param order_id The order id to refund.
|
1417
|
-
# @param [Hash] opts the optional parameters
|
1418
|
-
# @option opts [BOOLEAN] :reject_after_refund Reject order after refund (default to false)
|
1419
|
-
# @option opts [BOOLEAN] :skip_customer_notification Skip customer email notification (default to false)
|
1420
|
-
# @option opts [BOOLEAN] :auto_order_cancel Cancel associated auto orders (default to false)
|
1421
|
-
# @option opts [BOOLEAN] :manual_refund Consider a manual refund done externally (default to false)
|
1422
|
-
# @option opts [BOOLEAN] :reverse_affiliate_transactions Reverse affiliate transactions (default to true)
|
1423
|
-
# @option opts [BOOLEAN] :issue_store_credit Issue a store credit instead of refunding the original payment method, loyalty must be configured on merchant account (default to false)
|
1424
|
-
# @option opts [String] :auto_order_cancel_reason Reason for auto orders cancellation
|
1425
|
-
# @option opts [String] :refund_reason Reason for refund
|
1426
|
-
# @option opts [String] :reject_reason Reason for reject
|
1427
|
-
# @return [OrderResponse]
|
1428
|
-
def refund_order_completely(order_id, opts = {})
|
1429
|
-
data, _status_code, _headers = refund_order_completely_with_http_info(order_id, opts)
|
1430
|
-
data
|
1431
|
-
end
|
1432
|
-
|
1433
|
-
# Refund an order completely
|
1434
|
-
# Perform a refund operation on an order and then update the order if successful.
|
1435
|
-
# @param order_id The order id to refund.
|
1436
|
-
# @param [Hash] opts the optional parameters
|
1437
|
-
# @option opts [BOOLEAN] :reject_after_refund Reject order after refund
|
1438
|
-
# @option opts [BOOLEAN] :skip_customer_notification Skip customer email notification
|
1439
|
-
# @option opts [BOOLEAN] :auto_order_cancel Cancel associated auto orders
|
1440
|
-
# @option opts [BOOLEAN] :manual_refund Consider a manual refund done externally
|
1441
|
-
# @option opts [BOOLEAN] :reverse_affiliate_transactions Reverse affiliate transactions
|
1442
|
-
# @option opts [BOOLEAN] :issue_store_credit Issue a store credit instead of refunding the original payment method, loyalty must be configured on merchant account
|
1443
|
-
# @option opts [String] :auto_order_cancel_reason Reason for auto orders cancellation
|
1444
|
-
# @option opts [String] :refund_reason Reason for refund
|
1445
|
-
# @option opts [String] :reject_reason Reason for reject
|
1446
|
-
# @return [Array<(OrderResponse, Fixnum, Hash)>] OrderResponse data, response status code and response headers
|
1447
|
-
def refund_order_completely_with_http_info(order_id, opts = {})
|
1448
|
-
if @api_client.config.debugging
|
1449
|
-
@api_client.config.logger.debug 'Calling API: OrderApi.refund_order_completely ...'
|
1450
|
-
end
|
1451
|
-
# verify the required parameter 'order_id' is set
|
1452
|
-
if @api_client.config.client_side_validation && order_id.nil?
|
1453
|
-
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.refund_order_completely"
|
1454
|
-
end
|
1455
|
-
# resource path
|
1456
|
-
local_var_path = '/order/orders/{order_id}/refund_completely'.sub('{' + 'order_id' + '}', order_id.to_s)
|
1457
|
-
|
1458
|
-
# query parameters
|
1459
|
-
query_params = {}
|
1460
|
-
query_params[:'reject_after_refund'] = opts[:'reject_after_refund'] if !opts[:'reject_after_refund'].nil?
|
1461
|
-
query_params[:'skip_customer_notification'] = opts[:'skip_customer_notification'] if !opts[:'skip_customer_notification'].nil?
|
1462
|
-
query_params[:'auto_order_cancel'] = opts[:'auto_order_cancel'] if !opts[:'auto_order_cancel'].nil?
|
1463
|
-
query_params[:'manual_refund'] = opts[:'manual_refund'] if !opts[:'manual_refund'].nil?
|
1464
|
-
query_params[:'reverse_affiliate_transactions'] = opts[:'reverse_affiliate_transactions'] if !opts[:'reverse_affiliate_transactions'].nil?
|
1465
|
-
query_params[:'issue_store_credit'] = opts[:'issue_store_credit'] if !opts[:'issue_store_credit'].nil?
|
1466
|
-
query_params[:'auto_order_cancel_reason'] = opts[:'auto_order_cancel_reason'] if !opts[:'auto_order_cancel_reason'].nil?
|
1467
|
-
query_params[:'refund_reason'] = opts[:'refund_reason'] if !opts[:'refund_reason'].nil?
|
1468
|
-
query_params[:'reject_reason'] = opts[:'reject_reason'] if !opts[:'reject_reason'].nil?
|
1469
|
-
|
1470
|
-
# header parameters
|
1471
|
-
header_params = {}
|
1472
|
-
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
1473
|
-
# HTTP header 'Accept' (if needed)
|
1474
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1475
|
-
# HTTP header 'Content-Type'
|
1476
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
1477
|
-
|
1478
|
-
# form parameters
|
1479
|
-
form_params = {}
|
1480
|
-
|
1481
|
-
# http body (model)
|
1482
|
-
post_body = nil
|
1483
|
-
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
1484
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
1485
|
-
:header_params => header_params,
|
1486
|
-
:query_params => query_params,
|
1487
|
-
:form_params => form_params,
|
1488
|
-
:body => post_body,
|
1489
|
-
:auth_names => auth_names,
|
1490
|
-
:return_type => 'OrderResponse')
|
1491
|
-
if @api_client.config.debugging
|
1492
|
-
@api_client.config.logger.debug "API called: OrderApi#refund_order_completely\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1493
|
-
end
|
1494
|
-
return data, status_code, headers
|
1495
|
-
end
|
1496
1414
|
# Replacement order
|
1497
1415
|
# Create a replacement order based upon a previous order
|
1498
1416
|
# @param order_id The order id to generate a replacement for.
|
@@ -1699,7 +1617,7 @@ module UltracartClient
|
|
1699
1617
|
# HTTP header 'Accept' (if needed)
|
1700
1618
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1701
1619
|
# HTTP header 'Content-Type'
|
1702
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json
|
1620
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1703
1621
|
|
1704
1622
|
# form parameters
|
1705
1623
|
form_params = {}
|
@@ -1707,7 +1625,7 @@ module UltracartClient
|
|
1707
1625
|
# http body (model)
|
1708
1626
|
post_body = nil
|
1709
1627
|
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
1710
|
-
data, status_code, headers = @api_client.call_api(:
|
1628
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
1711
1629
|
:header_params => header_params,
|
1712
1630
|
:query_params => query_params,
|
1713
1631
|
:form_params => form_params,
|
@@ -206,14 +206,6 @@ module UltracartClient
|
|
206
206
|
# Retrieves the log summary information for a given webhook. This is useful for displaying all the various logs that can be viewed.
|
207
207
|
# @param webhook_oid The webhook oid to retrieve log summaries for.
|
208
208
|
# @param [Hash] opts the optional parameters
|
209
|
-
# @option opts [String] :request_id
|
210
|
-
# @option opts [String] :begin_date
|
211
|
-
# @option opts [String] :end_date
|
212
|
-
# @option opts [String] :status
|
213
|
-
# @option opts [String] :event
|
214
|
-
# @option opts [String] :order_id
|
215
|
-
# @option opts [String] :request
|
216
|
-
# @option opts [Integer] :duration
|
217
209
|
# @option opts [Integer] :_limit The maximum number of records to return on this one API call. (default to 100)
|
218
210
|
# @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
|
219
211
|
# @option opts [String] :_since Fetch log summaries that have been delivered since this date/time.
|
@@ -227,14 +219,6 @@ module UltracartClient
|
|
227
219
|
# Retrieves the log summary information for a given webhook. This is useful for displaying all the various logs that can be viewed.
|
228
220
|
# @param webhook_oid The webhook oid to retrieve log summaries for.
|
229
221
|
# @param [Hash] opts the optional parameters
|
230
|
-
# @option opts [String] :request_id
|
231
|
-
# @option opts [String] :begin_date
|
232
|
-
# @option opts [String] :end_date
|
233
|
-
# @option opts [String] :status
|
234
|
-
# @option opts [String] :event
|
235
|
-
# @option opts [String] :order_id
|
236
|
-
# @option opts [String] :request
|
237
|
-
# @option opts [Integer] :duration
|
238
222
|
# @option opts [Integer] :_limit The maximum number of records to return on this one API call.
|
239
223
|
# @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index.
|
240
224
|
# @option opts [String] :_since Fetch log summaries that have been delivered since this date/time.
|
@@ -252,14 +236,6 @@ module UltracartClient
|
|
252
236
|
|
253
237
|
# query parameters
|
254
238
|
query_params = {}
|
255
|
-
query_params[:'requestId'] = opts[:'request_id'] if !opts[:'request_id'].nil?
|
256
|
-
query_params[:'beginDate'] = opts[:'begin_date'] if !opts[:'begin_date'].nil?
|
257
|
-
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
258
|
-
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
259
|
-
query_params[:'event'] = opts[:'event'] if !opts[:'event'].nil?
|
260
|
-
query_params[:'orderId'] = opts[:'order_id'] if !opts[:'order_id'].nil?
|
261
|
-
query_params[:'request'] = opts[:'request'] if !opts[:'request'].nil?
|
262
|
-
query_params[:'duration'] = opts[:'duration'] if !opts[:'duration'].nil?
|
263
239
|
query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
|
264
240
|
query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
|
265
241
|
query_params[:'_since'] = opts[:'_since'] if !opts[:'_since'].nil?
|
@@ -0,0 +1,224 @@
|
|
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 CustomReportsResponse
|
17
|
+
attr_accessor :error
|
18
|
+
|
19
|
+
attr_accessor :metadata
|
20
|
+
|
21
|
+
# reports
|
22
|
+
attr_accessor :reports
|
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
|
+
:'reports' => :'reports',
|
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
|
+
:'reports' => :'Array<CustomReport>',
|
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?(:'reports')
|
68
|
+
if (value = attributes[:'reports']).is_a?(Array)
|
69
|
+
self.reports = value
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.has_key?(:'success')
|
74
|
+
self.success = attributes[:'success']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.has_key?(:'warning')
|
78
|
+
self.warning = attributes[:'warning']
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
83
|
+
# @return Array for valid properties with the reasons
|
84
|
+
def list_invalid_properties
|
85
|
+
invalid_properties = Array.new
|
86
|
+
invalid_properties
|
87
|
+
end
|
88
|
+
|
89
|
+
# Check to see if the all the properties in the model are valid
|
90
|
+
# @return true if the model is valid
|
91
|
+
def valid?
|
92
|
+
true
|
93
|
+
end
|
94
|
+
|
95
|
+
# Checks equality by comparing each attribute.
|
96
|
+
# @param [Object] Object to be compared
|
97
|
+
def ==(o)
|
98
|
+
return true if self.equal?(o)
|
99
|
+
self.class == o.class &&
|
100
|
+
error == o.error &&
|
101
|
+
metadata == o.metadata &&
|
102
|
+
reports == o.reports &&
|
103
|
+
success == o.success &&
|
104
|
+
warning == o.warning
|
105
|
+
end
|
106
|
+
|
107
|
+
# @see the `==` method
|
108
|
+
# @param [Object] Object to be compared
|
109
|
+
def eql?(o)
|
110
|
+
self == o
|
111
|
+
end
|
112
|
+
|
113
|
+
# Calculates hash code according to all attributes.
|
114
|
+
# @return [Fixnum] Hash code
|
115
|
+
def hash
|
116
|
+
[error, metadata, reports, success, warning].hash
|
117
|
+
end
|
118
|
+
|
119
|
+
# Builds the object from hash
|
120
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
121
|
+
# @return [Object] Returns the model itself
|
122
|
+
def build_from_hash(attributes)
|
123
|
+
return nil unless attributes.is_a?(Hash)
|
124
|
+
self.class.swagger_types.each_pair do |key, type|
|
125
|
+
if 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 # or else data not found in attributes(hash), not an issue as the data can be optional
|
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 :DateTime
|
146
|
+
DateTime.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
|
+
temp_model = UltracartClient.const_get(type).new
|
177
|
+
temp_model.build_from_hash(value)
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
# Returns the string representation of the object
|
182
|
+
# @return [String] String presentation of the object
|
183
|
+
def to_s
|
184
|
+
to_hash.to_s
|
185
|
+
end
|
186
|
+
|
187
|
+
# to_body is an alias to to_hash (backward compatibility)
|
188
|
+
# @return [Hash] Returns the object in the form of hash
|
189
|
+
def to_body
|
190
|
+
to_hash
|
191
|
+
end
|
192
|
+
|
193
|
+
# Returns the object in the form of hash
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
195
|
+
def to_hash
|
196
|
+
hash = {}
|
197
|
+
self.class.attribute_map.each_pair do |attr, param|
|
198
|
+
value = self.send(attr)
|
199
|
+
next if value.nil?
|
200
|
+
hash[param] = _to_hash(value)
|
201
|
+
end
|
202
|
+
hash
|
203
|
+
end
|
204
|
+
|
205
|
+
# Outputs non-array value in the form of hash
|
206
|
+
# For object, use to_hash. Otherwise, just return the value
|
207
|
+
# @param [Object] value Any valid value
|
208
|
+
# @return [Hash] Returns the value in the form of hash
|
209
|
+
def _to_hash(value)
|
210
|
+
if value.is_a?(Array)
|
211
|
+
value.compact.map { |v| _to_hash(v) }
|
212
|
+
elsif value.is_a?(Hash)
|
213
|
+
{}.tap do |hash|
|
214
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
215
|
+
end
|
216
|
+
elsif value.respond_to? :to_hash
|
217
|
+
value.to_hash
|
218
|
+
else
|
219
|
+
value
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
end
|
224
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
@@ -332,6 +332,7 @@ require 'ultracart_api/models/custom_report_parameter_option'
|
|
332
332
|
require 'ultracart_api/models/custom_report_query'
|
333
333
|
require 'ultracart_api/models/custom_report_response'
|
334
334
|
require 'ultracart_api/models/custom_report_tooltip'
|
335
|
+
require 'ultracart_api/models/custom_reports_response'
|
335
336
|
require 'ultracart_api/models/customer'
|
336
337
|
require 'ultracart_api/models/customer_activity'
|
337
338
|
require 'ultracart_api/models/customer_affiliate'
|
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: 3.11.
|
4
|
+
version: 3.11.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
@@ -543,6 +543,7 @@ files:
|
|
543
543
|
- docs/CustomReportQuery.md
|
544
544
|
- docs/CustomReportResponse.md
|
545
545
|
- docs/CustomReportTooltip.md
|
546
|
+
- docs/CustomReportsResponse.md
|
546
547
|
- docs/Customer.md
|
547
548
|
- docs/CustomerActivity.md
|
548
549
|
- docs/CustomerAffiliate.md
|
@@ -1457,6 +1458,7 @@ files:
|
|
1457
1458
|
- lib/ultracart_api/models/custom_report_query.rb
|
1458
1459
|
- lib/ultracart_api/models/custom_report_response.rb
|
1459
1460
|
- lib/ultracart_api/models/custom_report_tooltip.rb
|
1461
|
+
- lib/ultracart_api/models/custom_reports_response.rb
|
1460
1462
|
- lib/ultracart_api/models/customer.rb
|
1461
1463
|
- lib/ultracart_api/models/customer_activity.rb
|
1462
1464
|
- lib/ultracart_api/models/customer_affiliate.rb
|