ultracart_api 4.1.15 → 4.1.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 +7 -5
- data/docs/CustomReportsResponse.md +26 -0
- data/docs/DatawarehouseApi.md +52 -0
- data/docs/OrderApi.md +32 -67
- data/docs/WebhookApi.md +0 -8
- data/lib/ultracart_api/api/datawarehouse_api.rb +58 -0
- data/lib/ultracart_api/api/order_api.rb +2 -93
- data/lib/ultracart_api/api/webhook_api.rb +0 -24
- data/lib/ultracart_api/models/custom_reports_response.rb +259 -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: ba315b7e97b3e9067d6a15640d3cdb873006d13bd8f53f48cc2d0c40c4db11af
|
4
|
+
data.tar.gz: a159dbb08abcf2d9ff720194ddc58bd4206ee57978371297b0198308e45cc98e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7454402c148af2ee31f596640dce2191980bb65364017921129a8611ea360f7ee948461de64941c83be30d13dd04d5d43a3fe2577be6e4bfdfdbce7453080fa7
|
7
|
+
data.tar.gz: 2df955c52f353b0990ca11d1e6deb381bdf98033c45ff2ad60fc7326f2803f8540c553db78287a6b854d1241e432d361338e6dae419c65b40c064e0386d957ae
|
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.
|
10
|
+
- Package version: 4.1.16
|
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.
|
19
|
+
gem 'ultracart_api', '4.1.16'
|
20
20
|
```
|
21
21
|
|
22
22
|
install:
|
@@ -272,6 +272,7 @@ Class | Method | HTTP request | Description
|
|
272
272
|
*UltracartClient::DatawarehouseApi* | [**execute_report_queries**](docs/DatawarehouseApi.md#execute_report_queries) | **PUT** /datawarehouse/reports/execute | Execute the report queries
|
273
273
|
*UltracartClient::DatawarehouseApi* | [**get_custom_report**](docs/DatawarehouseApi.md#get_custom_report) | **GET** /datawarehouse/custom_reports/{custom_report_oid} | Get a custom report
|
274
274
|
*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
|
275
|
+
*UltracartClient::DatawarehouseApi* | [**get_custom_reports**](docs/DatawarehouseApi.md#get_custom_reports) | **GET** /datawarehouse/custom_reports | Get custom reports
|
275
276
|
*UltracartClient::DatawarehouseApi* | [**get_report**](docs/DatawarehouseApi.md#get_report) | **GET** /datawarehouse/reports/{report_oid} | Get a report
|
276
277
|
*UltracartClient::DatawarehouseApi* | [**get_report_data_set**](docs/DatawarehouseApi.md#get_report_data_set) | **GET** /datawarehouse/reports/dataset/{dataset_uuid} | Get a report data set
|
277
278
|
*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
|
@@ -327,7 +328,7 @@ Class | Method | HTTP request | Description
|
|
327
328
|
*UltracartClient::OauthApi* | [**oauth_access_token**](docs/OauthApi.md#oauth_access_token) | **POST** /oauth/token | Exchange authorization code for access token.
|
328
329
|
*UltracartClient::OauthApi* | [**oauth_revoke**](docs/OauthApi.md#oauth_revoke) | **POST** /oauth/revoke | Revoke this OAuth application.
|
329
330
|
*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
|
330
|
-
*UltracartClient::OrderApi* | [**block_refund_on_order**](docs/OrderApi.md#block_refund_on_order) | **
|
331
|
+
*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
|
331
332
|
*UltracartClient::OrderApi* | [**cancel_order**](docs/OrderApi.md#cancel_order) | **POST** /order/orders/{order_id}/cancel | Cancel an order
|
332
333
|
*UltracartClient::OrderApi* | [**delete_order**](docs/OrderApi.md#delete_order) | **DELETE** /order/orders/{order_id} | Delete an order
|
333
334
|
*UltracartClient::OrderApi* | [**duplicate_order**](docs/OrderApi.md#duplicate_order) | **POST** /order/orders/{order_id}/duplicate | Duplicate an order
|
@@ -348,11 +349,10 @@ Class | Method | HTTP request | Description
|
|
348
349
|
*UltracartClient::OrderApi* | [**is_refundable_order**](docs/OrderApi.md#is_refundable_order) | **GET** /order/orders/{order_id}/refundable | Determine if an order can be refunded
|
349
350
|
*UltracartClient::OrderApi* | [**process_payment**](docs/OrderApi.md#process_payment) | **POST** /order/orders/{order_id}/process_payment | Process payment
|
350
351
|
*UltracartClient::OrderApi* | [**refund_order**](docs/OrderApi.md#refund_order) | **PUT** /order/orders/{order_id}/refund | Refund an order
|
351
|
-
*UltracartClient::OrderApi* | [**refund_order_completely**](docs/OrderApi.md#refund_order_completely) | **PUT** /order/orders/{order_id}/refund_completely | Refund an order completely
|
352
352
|
*UltracartClient::OrderApi* | [**replacement**](docs/OrderApi.md#replacement) | **POST** /order/orders/{order_id}/replacement | Replacement order
|
353
353
|
*UltracartClient::OrderApi* | [**resend_receipt**](docs/OrderApi.md#resend_receipt) | **POST** /order/orders/{order_id}/resend_receipt | Resend receipt
|
354
354
|
*UltracartClient::OrderApi* | [**resend_shipment_confirmation**](docs/OrderApi.md#resend_shipment_confirmation) | **POST** /order/orders/{order_id}/resend_shipment_confirmation | Resend shipment confirmation
|
355
|
-
*UltracartClient::OrderApi* | [**unblock_refund_on_order**](docs/OrderApi.md#unblock_refund_on_order) | **
|
355
|
+
*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
|
356
356
|
*UltracartClient::OrderApi* | [**update_accounts_receivable_retry_config**](docs/OrderApi.md#update_accounts_receivable_retry_config) | **POST** /order/accountsReceivableRetryConfig | Update A/R Retry Configuration
|
357
357
|
*UltracartClient::OrderApi* | [**update_order**](docs/OrderApi.md#update_order) | **PUT** /order/orders/{order_id} | Update an order
|
358
358
|
*UltracartClient::OrderApi* | [**validate_order**](docs/OrderApi.md#validate_order) | **POST** /order/validate | Validate
|
@@ -915,6 +915,7 @@ Class | Method | HTTP request | Description
|
|
915
915
|
- [UltracartClient::CustomReportQuery](docs/CustomReportQuery.md)
|
916
916
|
- [UltracartClient::CustomReportResponse](docs/CustomReportResponse.md)
|
917
917
|
- [UltracartClient::CustomReportTooltip](docs/CustomReportTooltip.md)
|
918
|
+
- [UltracartClient::CustomReportsResponse](docs/CustomReportsResponse.md)
|
918
919
|
- [UltracartClient::Customer](docs/Customer.md)
|
919
920
|
- [UltracartClient::CustomerActivity](docs/CustomerActivity.md)
|
920
921
|
- [UltracartClient::CustomerAffiliate](docs/CustomerAffiliate.md)
|
@@ -1549,6 +1550,7 @@ Not every change is committed to every SDK.
|
|
1549
1550
|
|
1550
1551
|
| Version | Date | Comments |
|
1551
1552
|
| --: | :-: | --- |
|
1553
|
+
| 4.1.16 | 07/28/2025 | updated doc samples |
|
1552
1554
|
| 4.1.15 | 07/28/2025 | new order methods for blocking and unblocking refunds |
|
1553
1555
|
| 4.1.14 | 07/10/2025 | automation test |
|
1554
1556
|
| 4.1.13 | 05/20/2025 | conversation - virtual agent flag and virtual agent cost |
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# UltracartClient::CustomReportsResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **error** | [**Error**](Error.md) | | [optional] |
|
8
|
+
| **metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional] |
|
9
|
+
| **reports** | [**Array<CustomReport>**](CustomReport.md) | reports | [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::CustomReportsResponse.new(
|
19
|
+
error: null,
|
20
|
+
metadata: null,
|
21
|
+
reports: null,
|
22
|
+
success: null,
|
23
|
+
warning: null
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
data/docs/DatawarehouseApi.md
CHANGED
@@ -11,6 +11,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
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 |
|
@@ -396,6 +397,57 @@ This endpoint does not need any parameter.
|
|
396
397
|
- **Accept**: application/json
|
397
398
|
|
398
399
|
|
400
|
+
## get_custom_reports
|
401
|
+
|
402
|
+
> <CustomReportsResponse> get_custom_reports
|
403
|
+
|
404
|
+
Get custom reports
|
405
|
+
|
406
|
+
Retrieve a custom reports
|
407
|
+
|
408
|
+
|
409
|
+
### Examples
|
410
|
+
|
411
|
+
|
412
|
+
(No example for this operation).
|
413
|
+
|
414
|
+
|
415
|
+
#### Using the get_custom_reports_with_http_info variant
|
416
|
+
|
417
|
+
This returns an Array which contains the response data, status code and headers.
|
418
|
+
|
419
|
+
> <Array(<CustomReportsResponse>, Integer, Hash)> get_custom_reports_with_http_info
|
420
|
+
|
421
|
+
```ruby
|
422
|
+
begin
|
423
|
+
# Get custom reports
|
424
|
+
data, status_code, headers = api_instance.get_custom_reports_with_http_info
|
425
|
+
p status_code # => 2xx
|
426
|
+
p headers # => { ... }
|
427
|
+
p data # => <CustomReportsResponse>
|
428
|
+
rescue UltracartClient::ApiError => e
|
429
|
+
puts "Error when calling DatawarehouseApi->get_custom_reports_with_http_info: #{e}"
|
430
|
+
end
|
431
|
+
```
|
432
|
+
|
433
|
+
### Parameters
|
434
|
+
|
435
|
+
This endpoint does not need any parameter.
|
436
|
+
|
437
|
+
### Return type
|
438
|
+
|
439
|
+
[**CustomReportsResponse**](CustomReportsResponse.md)
|
440
|
+
|
441
|
+
### Authorization
|
442
|
+
|
443
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
444
|
+
|
445
|
+
### HTTP request headers
|
446
|
+
|
447
|
+
- **Content-Type**: Not defined
|
448
|
+
- **Accept**: application/json
|
449
|
+
|
450
|
+
|
399
451
|
## get_report
|
400
452
|
|
401
453
|
> <ReportResponse> get_report(report_oid)
|
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 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
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 |
|
@@ -127,8 +126,22 @@ Sets a refund block on an order to prevent a user from performing a refund. Com
|
|
127
126
|
|
128
127
|
### Examples
|
129
128
|
|
129
|
+
```ruby
|
130
|
+
require 'ultracart_api'
|
131
|
+
require_relative '../constants'
|
130
132
|
|
131
|
-
|
133
|
+
#
|
134
|
+
# blockRefundOnOrder sets an order property that is considered when a refund request is made.
|
135
|
+
# If the property is present, the refund is denied. Being an order property allows for querying
|
136
|
+
# upon it within BigQuery for audit purposes.
|
137
|
+
#
|
138
|
+
order_api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY)
|
139
|
+
|
140
|
+
order_id = 'DEMO-0009105222'
|
141
|
+
order_api.block_refund_on_order(order_id, {block_reason: 'Chargeback'})
|
142
|
+
|
143
|
+
p 'Method executed successfully. Returns back 204 No Content'
|
144
|
+
```
|
132
145
|
|
133
146
|
|
134
147
|
#### Using the block_refund_on_order_with_http_info variant
|
@@ -2267,68 +2280,6 @@ end
|
|
2267
2280
|
- **Accept**: application/json
|
2268
2281
|
|
2269
2282
|
|
2270
|
-
## refund_order_completely
|
2271
|
-
|
2272
|
-
> <OrderResponse> refund_order_completely(order_id, opts)
|
2273
|
-
|
2274
|
-
Refund an order completely
|
2275
|
-
|
2276
|
-
Perform a refund operation on an order and then update the order if successful.
|
2277
|
-
|
2278
|
-
|
2279
|
-
### Examples
|
2280
|
-
|
2281
|
-
|
2282
|
-
(No example for this operation).
|
2283
|
-
|
2284
|
-
|
2285
|
-
#### Using the refund_order_completely_with_http_info variant
|
2286
|
-
|
2287
|
-
This returns an Array which contains the response data, status code and headers.
|
2288
|
-
|
2289
|
-
> <Array(<OrderResponse>, Integer, Hash)> refund_order_completely_with_http_info(order_id, opts)
|
2290
|
-
|
2291
|
-
```ruby
|
2292
|
-
begin
|
2293
|
-
# Refund an order completely
|
2294
|
-
data, status_code, headers = api_instance.refund_order_completely_with_http_info(order_id, opts)
|
2295
|
-
p status_code # => 2xx
|
2296
|
-
p headers # => { ... }
|
2297
|
-
p data # => <OrderResponse>
|
2298
|
-
rescue UltracartClient::ApiError => e
|
2299
|
-
puts "Error when calling OrderApi->refund_order_completely_with_http_info: #{e}"
|
2300
|
-
end
|
2301
|
-
```
|
2302
|
-
|
2303
|
-
### Parameters
|
2304
|
-
|
2305
|
-
| Name | Type | Description | Notes |
|
2306
|
-
| ---- | ---- | ----------- | ----- |
|
2307
|
-
| **order_id** | **String** | The order id to refund. | |
|
2308
|
-
| **reject_after_refund** | **Boolean** | Reject order after refund | [optional][default to false] |
|
2309
|
-
| **skip_customer_notification** | **Boolean** | Skip customer email notification | [optional][default to false] |
|
2310
|
-
| **auto_order_cancel** | **Boolean** | Cancel associated auto orders | [optional][default to false] |
|
2311
|
-
| **manual_refund** | **Boolean** | Consider a manual refund done externally | [optional][default to false] |
|
2312
|
-
| **reverse_affiliate_transactions** | **Boolean** | Reverse affiliate transactions | [optional][default to true] |
|
2313
|
-
| **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] |
|
2314
|
-
| **auto_order_cancel_reason** | **String** | Reason for auto orders cancellation | [optional] |
|
2315
|
-
| **refund_reason** | **String** | Reason for refund | [optional] |
|
2316
|
-
| **reject_reason** | **String** | Reason for reject | [optional] |
|
2317
|
-
|
2318
|
-
### Return type
|
2319
|
-
|
2320
|
-
[**OrderResponse**](OrderResponse.md)
|
2321
|
-
|
2322
|
-
### Authorization
|
2323
|
-
|
2324
|
-
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
2325
|
-
|
2326
|
-
### HTTP request headers
|
2327
|
-
|
2328
|
-
- **Content-Type**: Not defined
|
2329
|
-
- **Accept**: application/json
|
2330
|
-
|
2331
|
-
|
2332
2283
|
## replacement
|
2333
2284
|
|
2334
2285
|
> <OrderReplacementResponse> replacement(order_id, replacement)
|
@@ -2591,8 +2542,22 @@ Removes a refund block on an order to prevent a user from performing a refund.
|
|
2591
2542
|
|
2592
2543
|
### Examples
|
2593
2544
|
|
2545
|
+
```ruby
|
2546
|
+
require 'ultracart_api'
|
2547
|
+
require_relative '../constants'
|
2594
2548
|
|
2595
|
-
|
2549
|
+
#
|
2550
|
+
# unblockRefundOnOrder removes an order property that is considered when a refund request is made.
|
2551
|
+
# If the property is present, the refund is denied. Being an order property allows for querying
|
2552
|
+
# upon it within BigQuery for audit purposes.#
|
2553
|
+
#
|
2554
|
+
order_api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY)
|
2555
|
+
|
2556
|
+
order_id = 'DEMO-0009105222'
|
2557
|
+
order_api.unblock_refund_on_order(order_id)
|
2558
|
+
|
2559
|
+
p 'Method executed successfully. Returns back 204 No Content'
|
2560
|
+
```
|
2596
2561
|
|
2597
2562
|
|
2598
2563
|
#### Using the unblock_refund_on_order_with_http_info variant
|
data/docs/WebhookApi.md
CHANGED
@@ -310,14 +310,6 @@ end
|
|
310
310
|
| Name | Type | Description | Notes |
|
311
311
|
| ---- | ---- | ----------- | ----- |
|
312
312
|
| **webhook_oid** | **Integer** | The webhook oid to retrieve log summaries for. | |
|
313
|
-
| **request_id** | **String** | | [optional] |
|
314
|
-
| **begin_date** | **String** | | [optional] |
|
315
|
-
| **end_date** | **String** | | [optional] |
|
316
|
-
| **status** | **String** | | [optional] |
|
317
|
-
| **event** | **String** | | [optional] |
|
318
|
-
| **order_id** | **String** | | [optional] |
|
319
|
-
| **request** | **String** | | [optional] |
|
320
|
-
| **duration** | **Integer** | | [optional] |
|
321
313
|
| **_limit** | **Integer** | The maximum number of records to return on this one API call. | [optional][default to 100] |
|
322
314
|
| **_offset** | **Integer** | Pagination of the record set. Offset is a zero based index. | [optional][default to 0] |
|
323
315
|
| **_since** | **String** | Fetch log summaries that have been delivered since this date/time. | [optional] |
|
@@ -495,6 +495,64 @@ module UltracartClient
|
|
495
495
|
return data, status_code, headers
|
496
496
|
end
|
497
497
|
|
498
|
+
# Get custom reports
|
499
|
+
# Retrieve a custom reports
|
500
|
+
# @param [Hash] opts the optional parameters
|
501
|
+
# @return [CustomReportsResponse]
|
502
|
+
def get_custom_reports(opts = {})
|
503
|
+
data, _status_code, _headers = get_custom_reports_with_http_info(opts)
|
504
|
+
data
|
505
|
+
end
|
506
|
+
|
507
|
+
# Get custom reports
|
508
|
+
# Retrieve a custom reports
|
509
|
+
# @param [Hash] opts the optional parameters
|
510
|
+
# @return [Array<(CustomReportsResponse, Integer, Hash)>] CustomReportsResponse data, response status code and response headers
|
511
|
+
def get_custom_reports_with_http_info(opts = {})
|
512
|
+
if @api_client.config.debugging
|
513
|
+
@api_client.config.logger.debug 'Calling API: DatawarehouseApi.get_custom_reports ...'
|
514
|
+
end
|
515
|
+
# resource path
|
516
|
+
local_var_path = '/datawarehouse/custom_reports'
|
517
|
+
|
518
|
+
# query parameters
|
519
|
+
query_params = opts[:query_params] || {}
|
520
|
+
|
521
|
+
# header parameters
|
522
|
+
header_params = opts[:header_params] || {}
|
523
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
524
|
+
# HTTP header 'Accept' (if needed)
|
525
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
526
|
+
|
527
|
+
# form parameters
|
528
|
+
form_params = opts[:form_params] || {}
|
529
|
+
|
530
|
+
# http body (model)
|
531
|
+
post_body = opts[:debug_body]
|
532
|
+
|
533
|
+
# return_type
|
534
|
+
return_type = opts[:debug_return_type] || 'CustomReportsResponse'
|
535
|
+
|
536
|
+
# auth_names
|
537
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
538
|
+
|
539
|
+
new_options = opts.merge(
|
540
|
+
:operation => :"DatawarehouseApi.get_custom_reports",
|
541
|
+
:header_params => header_params,
|
542
|
+
:query_params => query_params,
|
543
|
+
:form_params => form_params,
|
544
|
+
:body => post_body,
|
545
|
+
:auth_names => auth_names,
|
546
|
+
:return_type => return_type
|
547
|
+
)
|
548
|
+
|
549
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
550
|
+
if @api_client.config.debugging
|
551
|
+
@api_client.config.logger.debug "API called: DatawarehouseApi#get_custom_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
552
|
+
end
|
553
|
+
return data, status_code, headers
|
554
|
+
end
|
555
|
+
|
498
556
|
# Get a report
|
499
557
|
# Retrieve a report
|
500
558
|
# @param report_oid [Integer]
|
@@ -162,7 +162,7 @@ module UltracartClient
|
|
162
162
|
:return_type => return_type
|
163
163
|
)
|
164
164
|
|
165
|
-
data, status_code, headers = @api_client.call_api(:
|
165
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
166
166
|
if @api_client.config.debugging
|
167
167
|
@api_client.config.logger.debug "API called: OrderApi#block_refund_on_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
168
168
|
end
|
@@ -1646,97 +1646,6 @@ module UltracartClient
|
|
1646
1646
|
return data, status_code, headers
|
1647
1647
|
end
|
1648
1648
|
|
1649
|
-
# Refund an order completely
|
1650
|
-
# Perform a refund operation on an order and then update the order if successful.
|
1651
|
-
# @param order_id [String] The order id to refund.
|
1652
|
-
# @param [Hash] opts the optional parameters
|
1653
|
-
# @option opts [Boolean] :reject_after_refund Reject order after refund (default to false)
|
1654
|
-
# @option opts [Boolean] :skip_customer_notification Skip customer email notification (default to false)
|
1655
|
-
# @option opts [Boolean] :auto_order_cancel Cancel associated auto orders (default to false)
|
1656
|
-
# @option opts [Boolean] :manual_refund Consider a manual refund done externally (default to false)
|
1657
|
-
# @option opts [Boolean] :reverse_affiliate_transactions Reverse affiliate transactions (default to true)
|
1658
|
-
# @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)
|
1659
|
-
# @option opts [String] :auto_order_cancel_reason Reason for auto orders cancellation
|
1660
|
-
# @option opts [String] :refund_reason Reason for refund
|
1661
|
-
# @option opts [String] :reject_reason Reason for reject
|
1662
|
-
# @return [OrderResponse]
|
1663
|
-
def refund_order_completely(order_id, opts = {})
|
1664
|
-
data, _status_code, _headers = refund_order_completely_with_http_info(order_id, opts)
|
1665
|
-
data
|
1666
|
-
end
|
1667
|
-
|
1668
|
-
# Refund an order completely
|
1669
|
-
# Perform a refund operation on an order and then update the order if successful.
|
1670
|
-
# @param order_id [String] The order id to refund.
|
1671
|
-
# @param [Hash] opts the optional parameters
|
1672
|
-
# @option opts [Boolean] :reject_after_refund Reject order after refund (default to false)
|
1673
|
-
# @option opts [Boolean] :skip_customer_notification Skip customer email notification (default to false)
|
1674
|
-
# @option opts [Boolean] :auto_order_cancel Cancel associated auto orders (default to false)
|
1675
|
-
# @option opts [Boolean] :manual_refund Consider a manual refund done externally (default to false)
|
1676
|
-
# @option opts [Boolean] :reverse_affiliate_transactions Reverse affiliate transactions (default to true)
|
1677
|
-
# @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)
|
1678
|
-
# @option opts [String] :auto_order_cancel_reason Reason for auto orders cancellation
|
1679
|
-
# @option opts [String] :refund_reason Reason for refund
|
1680
|
-
# @option opts [String] :reject_reason Reason for reject
|
1681
|
-
# @return [Array<(OrderResponse, Integer, Hash)>] OrderResponse data, response status code and response headers
|
1682
|
-
def refund_order_completely_with_http_info(order_id, opts = {})
|
1683
|
-
if @api_client.config.debugging
|
1684
|
-
@api_client.config.logger.debug 'Calling API: OrderApi.refund_order_completely ...'
|
1685
|
-
end
|
1686
|
-
# verify the required parameter 'order_id' is set
|
1687
|
-
if @api_client.config.client_side_validation && order_id.nil?
|
1688
|
-
fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.refund_order_completely"
|
1689
|
-
end
|
1690
|
-
# resource path
|
1691
|
-
local_var_path = '/order/orders/{order_id}/refund_completely'.sub('{' + 'order_id' + '}', CGI.escape(order_id.to_s))
|
1692
|
-
|
1693
|
-
# query parameters
|
1694
|
-
query_params = opts[:query_params] || {}
|
1695
|
-
query_params[:'reject_after_refund'] = opts[:'reject_after_refund'] if !opts[:'reject_after_refund'].nil?
|
1696
|
-
query_params[:'skip_customer_notification'] = opts[:'skip_customer_notification'] if !opts[:'skip_customer_notification'].nil?
|
1697
|
-
query_params[:'auto_order_cancel'] = opts[:'auto_order_cancel'] if !opts[:'auto_order_cancel'].nil?
|
1698
|
-
query_params[:'manual_refund'] = opts[:'manual_refund'] if !opts[:'manual_refund'].nil?
|
1699
|
-
query_params[:'reverse_affiliate_transactions'] = opts[:'reverse_affiliate_transactions'] if !opts[:'reverse_affiliate_transactions'].nil?
|
1700
|
-
query_params[:'issue_store_credit'] = opts[:'issue_store_credit'] if !opts[:'issue_store_credit'].nil?
|
1701
|
-
query_params[:'auto_order_cancel_reason'] = opts[:'auto_order_cancel_reason'] if !opts[:'auto_order_cancel_reason'].nil?
|
1702
|
-
query_params[:'refund_reason'] = opts[:'refund_reason'] if !opts[:'refund_reason'].nil?
|
1703
|
-
query_params[:'reject_reason'] = opts[:'reject_reason'] if !opts[:'reject_reason'].nil?
|
1704
|
-
|
1705
|
-
# header parameters
|
1706
|
-
header_params = opts[:header_params] || {}
|
1707
|
-
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
1708
|
-
# HTTP header 'Accept' (if needed)
|
1709
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1710
|
-
|
1711
|
-
# form parameters
|
1712
|
-
form_params = opts[:form_params] || {}
|
1713
|
-
|
1714
|
-
# http body (model)
|
1715
|
-
post_body = opts[:debug_body]
|
1716
|
-
|
1717
|
-
# return_type
|
1718
|
-
return_type = opts[:debug_return_type] || 'OrderResponse'
|
1719
|
-
|
1720
|
-
# auth_names
|
1721
|
-
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
1722
|
-
|
1723
|
-
new_options = opts.merge(
|
1724
|
-
:operation => :"OrderApi.refund_order_completely",
|
1725
|
-
:header_params => header_params,
|
1726
|
-
:query_params => query_params,
|
1727
|
-
:form_params => form_params,
|
1728
|
-
:body => post_body,
|
1729
|
-
:auth_names => auth_names,
|
1730
|
-
:return_type => return_type
|
1731
|
-
)
|
1732
|
-
|
1733
|
-
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1734
|
-
if @api_client.config.debugging
|
1735
|
-
@api_client.config.logger.debug "API called: OrderApi#refund_order_completely\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1736
|
-
end
|
1737
|
-
return data, status_code, headers
|
1738
|
-
end
|
1739
|
-
|
1740
1649
|
# Replacement order
|
1741
1650
|
# Create a replacement order based upon a previous order
|
1742
1651
|
# @param order_id [String] The order id to generate a replacement for.
|
@@ -1997,7 +1906,7 @@ module UltracartClient
|
|
1997
1906
|
:return_type => return_type
|
1998
1907
|
)
|
1999
1908
|
|
2000
|
-
data, status_code, headers = @api_client.call_api(:
|
1909
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
2001
1910
|
if @api_client.config.debugging
|
2002
1911
|
@api_client.config.logger.debug "API called: OrderApi#unblock_refund_on_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
2003
1912
|
end
|
@@ -239,14 +239,6 @@ module UltracartClient
|
|
239
239
|
# Retrieves the log summary information for a given webhook. This is useful for displaying all the various logs that can be viewed.
|
240
240
|
# @param webhook_oid [Integer] The webhook oid to retrieve log summaries for.
|
241
241
|
# @param [Hash] opts the optional parameters
|
242
|
-
# @option opts [String] :request_id
|
243
|
-
# @option opts [String] :begin_date
|
244
|
-
# @option opts [String] :end_date
|
245
|
-
# @option opts [String] :status
|
246
|
-
# @option opts [String] :event
|
247
|
-
# @option opts [String] :order_id
|
248
|
-
# @option opts [String] :request
|
249
|
-
# @option opts [Integer] :duration
|
250
242
|
# @option opts [Integer] :_limit The maximum number of records to return on this one API call. (default to 100)
|
251
243
|
# @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
|
252
244
|
# @option opts [String] :_since Fetch log summaries that have been delivered since this date/time.
|
@@ -260,14 +252,6 @@ module UltracartClient
|
|
260
252
|
# Retrieves the log summary information for a given webhook. This is useful for displaying all the various logs that can be viewed.
|
261
253
|
# @param webhook_oid [Integer] The webhook oid to retrieve log summaries for.
|
262
254
|
# @param [Hash] opts the optional parameters
|
263
|
-
# @option opts [String] :request_id
|
264
|
-
# @option opts [String] :begin_date
|
265
|
-
# @option opts [String] :end_date
|
266
|
-
# @option opts [String] :status
|
267
|
-
# @option opts [String] :event
|
268
|
-
# @option opts [String] :order_id
|
269
|
-
# @option opts [String] :request
|
270
|
-
# @option opts [Integer] :duration
|
271
255
|
# @option opts [Integer] :_limit The maximum number of records to return on this one API call. (default to 100)
|
272
256
|
# @option opts [Integer] :_offset Pagination of the record set. Offset is a zero based index. (default to 0)
|
273
257
|
# @option opts [String] :_since Fetch log summaries that have been delivered since this date/time.
|
@@ -285,14 +269,6 @@ module UltracartClient
|
|
285
269
|
|
286
270
|
# query parameters
|
287
271
|
query_params = opts[:query_params] || {}
|
288
|
-
query_params[:'requestId'] = opts[:'request_id'] if !opts[:'request_id'].nil?
|
289
|
-
query_params[:'beginDate'] = opts[:'begin_date'] if !opts[:'begin_date'].nil?
|
290
|
-
query_params[:'endDate'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
291
|
-
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
292
|
-
query_params[:'event'] = opts[:'event'] if !opts[:'event'].nil?
|
293
|
-
query_params[:'orderId'] = opts[:'order_id'] if !opts[:'order_id'].nil?
|
294
|
-
query_params[:'request'] = opts[:'request'] if !opts[:'request'].nil?
|
295
|
-
query_params[:'duration'] = opts[:'duration'] if !opts[:'duration'].nil?
|
296
272
|
query_params[:'_limit'] = opts[:'_limit'] if !opts[:'_limit'].nil?
|
297
273
|
query_params[:'_offset'] = opts[:'_offset'] if !opts[:'_offset'].nil?
|
298
274
|
query_params[:'_since'] = opts[:'_since'] if !opts[:'_since'].nil?
|
@@ -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 CustomReportsResponse
|
18
|
+
attr_accessor :error
|
19
|
+
|
20
|
+
attr_accessor :metadata
|
21
|
+
|
22
|
+
# reports
|
23
|
+
attr_accessor :reports
|
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
|
+
:'error' => :'error',
|
34
|
+
:'metadata' => :'metadata',
|
35
|
+
:'reports' => :'reports',
|
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
|
+
:'error' => :'Error',
|
50
|
+
:'metadata' => :'ResponseMetadata',
|
51
|
+
:'reports' => :'Array<CustomReport>',
|
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::CustomReportsResponse` 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::CustomReportsResponse`. 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?(:'error')
|
79
|
+
self.error = attributes[:'error']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.key?(:'metadata')
|
83
|
+
self.metadata = attributes[:'metadata']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes.key?(:'reports')
|
87
|
+
if (value = attributes[:'reports']).is_a?(Array)
|
88
|
+
self.reports = value
|
89
|
+
end
|
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
|
+
error == o.error &&
|
120
|
+
metadata == o.metadata &&
|
121
|
+
reports == o.reports &&
|
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
|
+
[error, metadata, reports, 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
|
data/lib/ultracart_api.rb
CHANGED
@@ -331,6 +331,7 @@ require 'ultracart_api/models/custom_report_parameter_option'
|
|
331
331
|
require 'ultracart_api/models/custom_report_query'
|
332
332
|
require 'ultracart_api/models/custom_report_response'
|
333
333
|
require 'ultracart_api/models/custom_report_tooltip'
|
334
|
+
require 'ultracart_api/models/custom_reports_response'
|
334
335
|
require 'ultracart_api/models/customer'
|
335
336
|
require 'ultracart_api/models/customer_activity'
|
336
337
|
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: 4.1.
|
4
|
+
version: 4.1.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
@@ -382,6 +382,7 @@ files:
|
|
382
382
|
- docs/CustomReportQuery.md
|
383
383
|
- docs/CustomReportResponse.md
|
384
384
|
- docs/CustomReportTooltip.md
|
385
|
+
- docs/CustomReportsResponse.md
|
385
386
|
- docs/Customer.md
|
386
387
|
- docs/CustomerActivity.md
|
387
388
|
- docs/CustomerAffiliate.md
|
@@ -1295,6 +1296,7 @@ files:
|
|
1295
1296
|
- lib/ultracart_api/models/custom_report_query.rb
|
1296
1297
|
- lib/ultracart_api/models/custom_report_response.rb
|
1297
1298
|
- lib/ultracart_api/models/custom_report_tooltip.rb
|
1299
|
+
- lib/ultracart_api/models/custom_reports_response.rb
|
1298
1300
|
- lib/ultracart_api/models/customer.rb
|
1299
1301
|
- lib/ultracart_api/models/customer_activity.rb
|
1300
1302
|
- lib/ultracart_api/models/customer_affiliate.rb
|