ultracart_api 3.11.7 → 3.11.8
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 -4
- data/docs/ChanelPartnerReasonCodesResponse.md +18 -0
- data/docs/ChannelPartnerApi.md +51 -0
- data/docs/OrderProperty.md +2 -0
- data/lib/ultracart_api/api/channel_partner_api.rb +55 -0
- data/lib/ultracart_api/models/chanel_partner_reason_codes_response.rb +290 -0
- data/lib/ultracart_api/models/order_property.rb +36 -1
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22827b8ab1175d8ee56620c7095bbbdbb1ee5ba0004c0697fca1b08dd60118cb
|
4
|
+
data.tar.gz: 359bbebb71978e5237d4e3cc2268e23d3f52f6b0f41de86361e9b12f048b99d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 165fef5da88b5f5c60c025c11c733b8476ae07e8e4e8e633ffd284a4ed8fccb456c550e1e15c7658d4ce2f22cdc3e8843f382cad5a69ae8027d458af1f9304cd
|
7
|
+
data.tar.gz: '083759c532517a888e44f974a006a2b6c0d547e53b06a9e233afc7eaf63d5be6a550f63b84879f54e50b3a67aca273c9f439e236a2bf96bfc1a6956c4d0c9037'
|
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.8
|
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.8.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.8.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.8'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -106,6 +106,7 @@ Class | Method | HTTP request | Description
|
|
106
106
|
*UltracartClient::ChannelPartnerApi* | [**estimate_tax_for_channel_partner_order**](docs/ChannelPartnerApi.md#estimate_tax_for_channel_partner_order) | **POST** /channel_partner/estimate_tax | Estimate tax for channel partner order
|
107
107
|
*UltracartClient::ChannelPartnerApi* | [**get_channel_partner_order**](docs/ChannelPartnerApi.md#get_channel_partner_order) | **GET** /channel_partner/orders/{order_id} | Retrieve a channel partner order
|
108
108
|
*UltracartClient::ChannelPartnerApi* | [**get_channel_partner_order_by_channel_partner_order_id**](docs/ChannelPartnerApi.md#get_channel_partner_order_by_channel_partner_order_id) | **GET** /channel_partner/orders/by_channel_partner_order_id/{order_id} | Retrieve a channel partner order by the channel partner order id
|
109
|
+
*UltracartClient::ChannelPartnerApi* | [**get_channel_partner_reason_codes**](docs/ChannelPartnerApi.md#get_channel_partner_reason_codes) | **GET** /channel_partner/channel_partners/{channel_partner_oid}/reason_codes | Retrieve reject and refund reason codes.
|
109
110
|
*UltracartClient::ChannelPartnerApi* | [**get_channel_partner_ship_to_preference**](docs/ChannelPartnerApi.md#get_channel_partner_ship_to_preference) | **GET** /channel_partner/channel_partners/{channel_partner_oid}/ship_to_preferences/{channel_partner_ship_to_preference_oid} | Retrieve the ship to preference associated with the channel partner and the specific id.
|
110
111
|
*UltracartClient::ChannelPartnerApi* | [**get_channel_partner_ship_to_preferences**](docs/ChannelPartnerApi.md#get_channel_partner_ship_to_preferences) | **GET** /channel_partner/channel_partners/{channel_partner_oid}/ship_to_preferences | Retrieve the ship to preferences associated with the channel partner.
|
111
112
|
*UltracartClient::ChannelPartnerApi* | [**get_channel_partners**](docs/ChannelPartnerApi.md#get_channel_partners) | **GET** /channel_partner/channel_partners | Retrieve the channel partners configured on the account.
|
@@ -693,6 +694,7 @@ Class | Method | HTTP request | Description
|
|
693
694
|
- [UltracartClient::CartUpsellAfter](docs/CartUpsellAfter.md)
|
694
695
|
- [UltracartClient::CartValidationRequest](docs/CartValidationRequest.md)
|
695
696
|
- [UltracartClient::CartValidationResponse](docs/CartValidationResponse.md)
|
697
|
+
- [UltracartClient::ChanelPartnerReasonCodesResponse](docs/ChanelPartnerReasonCodesResponse.md)
|
696
698
|
- [UltracartClient::ChannelPartner](docs/ChannelPartner.md)
|
697
699
|
- [UltracartClient::ChannelPartnerCancelResponse](docs/ChannelPartnerCancelResponse.md)
|
698
700
|
- [UltracartClient::ChannelPartnerEstimateShippingResponse](docs/ChannelPartnerEstimateShippingResponse.md)
|
@@ -1520,6 +1522,7 @@ Not every change is committed to every SDK.
|
|
1520
1522
|
|
1521
1523
|
| Version | Date | Comments |
|
1522
1524
|
| --: | :-: | --- |
|
1525
|
+
| 3.11.8 | 04/22/2025 | order property fields for created_by and created_dts |
|
1523
1526
|
| 3.11.7 | 04/21/2025 | conversation agent additional fields |
|
1524
1527
|
| 3.11.6 | 04/16/2025 | added channel partner order item properties |
|
1525
1528
|
| 3.11.5 | 03/28/2025 | added paypal fastlane constants for payments |
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# UltracartClient::ChanelPartnerReasonCodesResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**error** | [**Error**](Error.md) | | [optional]
|
7
|
+
**item_level_refund_reason_required** | **BOOLEAN** | True if the item level refund reason is required | [optional]
|
8
|
+
**item_level_refund_reasons** | [**Array<OrderReason>**](OrderReason.md) | Reason codes available at the item level. | [optional]
|
9
|
+
**item_level_return_reasons** | [**Array<OrderReason>**](OrderReason.md) | Return codes available at the item level. | [optional]
|
10
|
+
**metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
|
11
|
+
**order_level_refund_reason_required** | **BOOLEAN** | True if the order level refund reason is required | [optional]
|
12
|
+
**order_level_refund_reasons** | [**Array<OrderReason>**](OrderReason.md) | Reason codes available at the order level. | [optional]
|
13
|
+
**order_level_reject_reason_required** | **BOOLEAN** | True if the order level reject reason is required | [optional]
|
14
|
+
**order_level_reject_reasons** | [**Array<OrderReason>**](OrderReason.md) | Reject codes available at the order level. | [optional]
|
15
|
+
**success** | **BOOLEAN** | Indicates if API call was successful | [optional]
|
16
|
+
**warning** | [**Warning**](Warning.md) | | [optional]
|
17
|
+
|
18
|
+
|
data/docs/ChannelPartnerApi.md
CHANGED
@@ -11,6 +11,7 @@ Method | HTTP request | Description
|
|
11
11
|
[**estimate_tax_for_channel_partner_order**](ChannelPartnerApi.md#estimate_tax_for_channel_partner_order) | **POST** /channel_partner/estimate_tax | Estimate tax for channel partner order
|
12
12
|
[**get_channel_partner_order**](ChannelPartnerApi.md#get_channel_partner_order) | **GET** /channel_partner/orders/{order_id} | Retrieve a channel partner order
|
13
13
|
[**get_channel_partner_order_by_channel_partner_order_id**](ChannelPartnerApi.md#get_channel_partner_order_by_channel_partner_order_id) | **GET** /channel_partner/orders/by_channel_partner_order_id/{order_id} | Retrieve a channel partner order by the channel partner order id
|
14
|
+
[**get_channel_partner_reason_codes**](ChannelPartnerApi.md#get_channel_partner_reason_codes) | **GET** /channel_partner/channel_partners/{channel_partner_oid}/reason_codes | Retrieve reject and refund reason codes.
|
14
15
|
[**get_channel_partner_ship_to_preference**](ChannelPartnerApi.md#get_channel_partner_ship_to_preference) | **GET** /channel_partner/channel_partners/{channel_partner_oid}/ship_to_preferences/{channel_partner_ship_to_preference_oid} | Retrieve the ship to preference associated with the channel partner and the specific id.
|
15
16
|
[**get_channel_partner_ship_to_preferences**](ChannelPartnerApi.md#get_channel_partner_ship_to_preferences) | **GET** /channel_partner/channel_partners/{channel_partner_oid}/ship_to_preferences | Retrieve the ship to preferences associated with the channel partner.
|
16
17
|
[**get_channel_partners**](ChannelPartnerApi.md#get_channel_partners) | **GET** /channel_partner/channel_partners | Retrieve the channel partners configured on the account.
|
@@ -380,6 +381,56 @@ Name | Type | Description | Notes
|
|
380
381
|
|
381
382
|
|
382
383
|
|
384
|
+
# **get_channel_partner_reason_codes**
|
385
|
+
> ChanelPartnerReasonCodesResponse get_channel_partner_reason_codes(channel_partner_oid)
|
386
|
+
|
387
|
+
Retrieve reject and refund reason codes.
|
388
|
+
|
389
|
+
Retrieve reject and refund reason codes.
|
390
|
+
|
391
|
+
### Example
|
392
|
+
```ruby
|
393
|
+
# load the gem
|
394
|
+
require 'ultracart_api'
|
395
|
+
|
396
|
+
# Create a Simple Key: https://ultracart.atlassian.net/wiki/spaces/ucdoc/pages/38688545/API+Simple+Key
|
397
|
+
simple_key = '109ee846ee69f50177018ab12f008a00748a25aa28dbdc0177018ab12f008a00'
|
398
|
+
api_instance = UltracartClient::ChannelPartnerApi.new_using_api_key(simple_key, false, false)
|
399
|
+
|
400
|
+
|
401
|
+
channel_partner_oid = 56 # Integer |
|
402
|
+
|
403
|
+
|
404
|
+
begin
|
405
|
+
#Retrieve reject and refund reason codes.
|
406
|
+
result = api_instance.get_channel_partner_reason_codes(channel_partner_oid)
|
407
|
+
p result
|
408
|
+
rescue UltracartClient::ApiError => e
|
409
|
+
puts "Exception when calling ChannelPartnerApi->get_channel_partner_reason_codes: #{e}"
|
410
|
+
end
|
411
|
+
```
|
412
|
+
|
413
|
+
### Parameters
|
414
|
+
|
415
|
+
Name | Type | Description | Notes
|
416
|
+
------------- | ------------- | ------------- | -------------
|
417
|
+
**channel_partner_oid** | **Integer**| |
|
418
|
+
|
419
|
+
### Return type
|
420
|
+
|
421
|
+
[**ChanelPartnerReasonCodesResponse**](ChanelPartnerReasonCodesResponse.md)
|
422
|
+
|
423
|
+
### Authorization
|
424
|
+
|
425
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
426
|
+
|
427
|
+
### HTTP request headers
|
428
|
+
|
429
|
+
- **Content-Type**: application/json
|
430
|
+
- **Accept**: application/json
|
431
|
+
|
432
|
+
|
433
|
+
|
383
434
|
# **get_channel_partner_ship_to_preference**
|
384
435
|
> ChannelPartnerShipToPreferenceResponse get_channel_partner_ship_to_preference(channel_partner_oid, channel_partner_ship_to_preference_oid)
|
385
436
|
|
data/docs/OrderProperty.md
CHANGED
@@ -3,6 +3,8 @@
|
|
3
3
|
## Properties
|
4
4
|
Name | Type | Description | Notes
|
5
5
|
------------ | ------------- | ------------- | -------------
|
6
|
+
**created_by** | **String** | Created by user | [optional]
|
7
|
+
**created_dts** | **String** | The date/time that the property was created by the user | [optional]
|
6
8
|
**display** | **BOOLEAN** | True if this property is displayed to the customer | [optional]
|
7
9
|
**expiration_dts** | **String** | The date/time that the property expires and is deleted | [optional]
|
8
10
|
**name** | **String** | Name | [optional]
|
@@ -428,6 +428,61 @@ module UltracartClient
|
|
428
428
|
end
|
429
429
|
return data, status_code, headers
|
430
430
|
end
|
431
|
+
# Retrieve reject and refund reason codes.
|
432
|
+
# Retrieve reject and refund reason codes.
|
433
|
+
# @param channel_partner_oid
|
434
|
+
# @param [Hash] opts the optional parameters
|
435
|
+
# @return [ChanelPartnerReasonCodesResponse]
|
436
|
+
def get_channel_partner_reason_codes(channel_partner_oid, opts = {})
|
437
|
+
data, _status_code, _headers = get_channel_partner_reason_codes_with_http_info(channel_partner_oid, opts)
|
438
|
+
data
|
439
|
+
end
|
440
|
+
|
441
|
+
# Retrieve reject and refund reason codes.
|
442
|
+
# Retrieve reject and refund reason codes.
|
443
|
+
# @param channel_partner_oid
|
444
|
+
# @param [Hash] opts the optional parameters
|
445
|
+
# @return [Array<(ChanelPartnerReasonCodesResponse, Fixnum, Hash)>] ChanelPartnerReasonCodesResponse data, response status code and response headers
|
446
|
+
def get_channel_partner_reason_codes_with_http_info(channel_partner_oid, opts = {})
|
447
|
+
if @api_client.config.debugging
|
448
|
+
@api_client.config.logger.debug 'Calling API: ChannelPartnerApi.get_channel_partner_reason_codes ...'
|
449
|
+
end
|
450
|
+
# verify the required parameter 'channel_partner_oid' is set
|
451
|
+
if @api_client.config.client_side_validation && channel_partner_oid.nil?
|
452
|
+
fail ArgumentError, "Missing the required parameter 'channel_partner_oid' when calling ChannelPartnerApi.get_channel_partner_reason_codes"
|
453
|
+
end
|
454
|
+
# resource path
|
455
|
+
local_var_path = '/channel_partner/channel_partners/{channel_partner_oid}/reason_codes'.sub('{' + 'channel_partner_oid' + '}', channel_partner_oid.to_s)
|
456
|
+
|
457
|
+
# query parameters
|
458
|
+
query_params = {}
|
459
|
+
|
460
|
+
# header parameters
|
461
|
+
header_params = {}
|
462
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
463
|
+
# HTTP header 'Accept' (if needed)
|
464
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
465
|
+
# HTTP header 'Content-Type'
|
466
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
467
|
+
|
468
|
+
# form parameters
|
469
|
+
form_params = {}
|
470
|
+
|
471
|
+
# http body (model)
|
472
|
+
post_body = nil
|
473
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
474
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
475
|
+
:header_params => header_params,
|
476
|
+
:query_params => query_params,
|
477
|
+
:form_params => form_params,
|
478
|
+
:body => post_body,
|
479
|
+
:auth_names => auth_names,
|
480
|
+
:return_type => 'ChanelPartnerReasonCodesResponse')
|
481
|
+
if @api_client.config.debugging
|
482
|
+
@api_client.config.logger.debug "API called: ChannelPartnerApi#get_channel_partner_reason_codes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
483
|
+
end
|
484
|
+
return data, status_code, headers
|
485
|
+
end
|
431
486
|
# Retrieve the ship to preference associated with the channel partner and the specific id.
|
432
487
|
# Retrieve the ship to preference associated with the channel partner and the specific id.
|
433
488
|
# @param channel_partner_oid
|
@@ -0,0 +1,290 @@
|
|
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 ChanelPartnerReasonCodesResponse
|
17
|
+
attr_accessor :error
|
18
|
+
|
19
|
+
# True if the item level refund reason is required
|
20
|
+
attr_accessor :item_level_refund_reason_required
|
21
|
+
|
22
|
+
# Reason codes available at the item level.
|
23
|
+
attr_accessor :item_level_refund_reasons
|
24
|
+
|
25
|
+
# Return codes available at the item level.
|
26
|
+
attr_accessor :item_level_return_reasons
|
27
|
+
|
28
|
+
attr_accessor :metadata
|
29
|
+
|
30
|
+
# True if the order level refund reason is required
|
31
|
+
attr_accessor :order_level_refund_reason_required
|
32
|
+
|
33
|
+
# Reason codes available at the order level.
|
34
|
+
attr_accessor :order_level_refund_reasons
|
35
|
+
|
36
|
+
# True if the order level reject reason is required
|
37
|
+
attr_accessor :order_level_reject_reason_required
|
38
|
+
|
39
|
+
# Reject codes available at the order level.
|
40
|
+
attr_accessor :order_level_reject_reasons
|
41
|
+
|
42
|
+
# Indicates if API call was successful
|
43
|
+
attr_accessor :success
|
44
|
+
|
45
|
+
attr_accessor :warning
|
46
|
+
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
48
|
+
def self.attribute_map
|
49
|
+
{
|
50
|
+
:'error' => :'error',
|
51
|
+
:'item_level_refund_reason_required' => :'item_level_refund_reason_required',
|
52
|
+
:'item_level_refund_reasons' => :'item_level_refund_reasons',
|
53
|
+
:'item_level_return_reasons' => :'item_level_return_reasons',
|
54
|
+
:'metadata' => :'metadata',
|
55
|
+
:'order_level_refund_reason_required' => :'order_level_refund_reason_required',
|
56
|
+
:'order_level_refund_reasons' => :'order_level_refund_reasons',
|
57
|
+
:'order_level_reject_reason_required' => :'order_level_reject_reason_required',
|
58
|
+
:'order_level_reject_reasons' => :'order_level_reject_reasons',
|
59
|
+
:'success' => :'success',
|
60
|
+
:'warning' => :'warning'
|
61
|
+
}
|
62
|
+
end
|
63
|
+
|
64
|
+
# Attribute type mapping.
|
65
|
+
def self.swagger_types
|
66
|
+
{
|
67
|
+
:'error' => :'Error',
|
68
|
+
:'item_level_refund_reason_required' => :'BOOLEAN',
|
69
|
+
:'item_level_refund_reasons' => :'Array<OrderReason>',
|
70
|
+
:'item_level_return_reasons' => :'Array<OrderReason>',
|
71
|
+
:'metadata' => :'ResponseMetadata',
|
72
|
+
:'order_level_refund_reason_required' => :'BOOLEAN',
|
73
|
+
:'order_level_refund_reasons' => :'Array<OrderReason>',
|
74
|
+
:'order_level_reject_reason_required' => :'BOOLEAN',
|
75
|
+
:'order_level_reject_reasons' => :'Array<OrderReason>',
|
76
|
+
:'success' => :'BOOLEAN',
|
77
|
+
:'warning' => :'Warning'
|
78
|
+
}
|
79
|
+
end
|
80
|
+
|
81
|
+
# Initializes the object
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
83
|
+
def initialize(attributes = {})
|
84
|
+
return unless attributes.is_a?(Hash)
|
85
|
+
|
86
|
+
# convert string to symbol for hash key
|
87
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
88
|
+
|
89
|
+
if attributes.has_key?(:'error')
|
90
|
+
self.error = attributes[:'error']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes.has_key?(:'item_level_refund_reason_required')
|
94
|
+
self.item_level_refund_reason_required = attributes[:'item_level_refund_reason_required']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes.has_key?(:'item_level_refund_reasons')
|
98
|
+
if (value = attributes[:'item_level_refund_reasons']).is_a?(Array)
|
99
|
+
self.item_level_refund_reasons = value
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes.has_key?(:'item_level_return_reasons')
|
104
|
+
if (value = attributes[:'item_level_return_reasons']).is_a?(Array)
|
105
|
+
self.item_level_return_reasons = value
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.has_key?(:'metadata')
|
110
|
+
self.metadata = attributes[:'metadata']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.has_key?(:'order_level_refund_reason_required')
|
114
|
+
self.order_level_refund_reason_required = attributes[:'order_level_refund_reason_required']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.has_key?(:'order_level_refund_reasons')
|
118
|
+
if (value = attributes[:'order_level_refund_reasons']).is_a?(Array)
|
119
|
+
self.order_level_refund_reasons = value
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
123
|
+
if attributes.has_key?(:'order_level_reject_reason_required')
|
124
|
+
self.order_level_reject_reason_required = attributes[:'order_level_reject_reason_required']
|
125
|
+
end
|
126
|
+
|
127
|
+
if attributes.has_key?(:'order_level_reject_reasons')
|
128
|
+
if (value = attributes[:'order_level_reject_reasons']).is_a?(Array)
|
129
|
+
self.order_level_reject_reasons = value
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes.has_key?(:'success')
|
134
|
+
self.success = attributes[:'success']
|
135
|
+
end
|
136
|
+
|
137
|
+
if attributes.has_key?(:'warning')
|
138
|
+
self.warning = attributes[:'warning']
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
143
|
+
# @return Array for valid properties with the reasons
|
144
|
+
def list_invalid_properties
|
145
|
+
invalid_properties = Array.new
|
146
|
+
invalid_properties
|
147
|
+
end
|
148
|
+
|
149
|
+
# Check to see if the all the properties in the model are valid
|
150
|
+
# @return true if the model is valid
|
151
|
+
def valid?
|
152
|
+
true
|
153
|
+
end
|
154
|
+
|
155
|
+
# Checks equality by comparing each attribute.
|
156
|
+
# @param [Object] Object to be compared
|
157
|
+
def ==(o)
|
158
|
+
return true if self.equal?(o)
|
159
|
+
self.class == o.class &&
|
160
|
+
error == o.error &&
|
161
|
+
item_level_refund_reason_required == o.item_level_refund_reason_required &&
|
162
|
+
item_level_refund_reasons == o.item_level_refund_reasons &&
|
163
|
+
item_level_return_reasons == o.item_level_return_reasons &&
|
164
|
+
metadata == o.metadata &&
|
165
|
+
order_level_refund_reason_required == o.order_level_refund_reason_required &&
|
166
|
+
order_level_refund_reasons == o.order_level_refund_reasons &&
|
167
|
+
order_level_reject_reason_required == o.order_level_reject_reason_required &&
|
168
|
+
order_level_reject_reasons == o.order_level_reject_reasons &&
|
169
|
+
success == o.success &&
|
170
|
+
warning == o.warning
|
171
|
+
end
|
172
|
+
|
173
|
+
# @see the `==` method
|
174
|
+
# @param [Object] Object to be compared
|
175
|
+
def eql?(o)
|
176
|
+
self == o
|
177
|
+
end
|
178
|
+
|
179
|
+
# Calculates hash code according to all attributes.
|
180
|
+
# @return [Fixnum] Hash code
|
181
|
+
def hash
|
182
|
+
[error, item_level_refund_reason_required, item_level_refund_reasons, item_level_return_reasons, metadata, order_level_refund_reason_required, order_level_refund_reasons, order_level_reject_reason_required, order_level_reject_reasons, success, warning].hash
|
183
|
+
end
|
184
|
+
|
185
|
+
# Builds the object from hash
|
186
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
187
|
+
# @return [Object] Returns the model itself
|
188
|
+
def build_from_hash(attributes)
|
189
|
+
return nil unless attributes.is_a?(Hash)
|
190
|
+
self.class.swagger_types.each_pair do |key, type|
|
191
|
+
if type =~ /\AArray<(.*)>/i
|
192
|
+
# check to ensure the input is an array given that the attribute
|
193
|
+
# is documented as an array but the input is not
|
194
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
195
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
196
|
+
end
|
197
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
198
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
199
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
200
|
+
end
|
201
|
+
|
202
|
+
self
|
203
|
+
end
|
204
|
+
|
205
|
+
# Deserializes the data based on type
|
206
|
+
# @param string type Data type
|
207
|
+
# @param string value Value to be deserialized
|
208
|
+
# @return [Object] Deserialized data
|
209
|
+
def _deserialize(type, value)
|
210
|
+
case type.to_sym
|
211
|
+
when :DateTime
|
212
|
+
DateTime.parse(value)
|
213
|
+
when :Date
|
214
|
+
Date.parse(value)
|
215
|
+
when :String
|
216
|
+
value.to_s
|
217
|
+
when :Integer
|
218
|
+
value.to_i
|
219
|
+
when :Float
|
220
|
+
value.to_f
|
221
|
+
when :BOOLEAN
|
222
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
223
|
+
true
|
224
|
+
else
|
225
|
+
false
|
226
|
+
end
|
227
|
+
when :Object
|
228
|
+
# generic object (usually a Hash), return directly
|
229
|
+
value
|
230
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
231
|
+
inner_type = Regexp.last_match[:inner_type]
|
232
|
+
value.map { |v| _deserialize(inner_type, v) }
|
233
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
234
|
+
k_type = Regexp.last_match[:k_type]
|
235
|
+
v_type = Regexp.last_match[:v_type]
|
236
|
+
{}.tap do |hash|
|
237
|
+
value.each do |k, v|
|
238
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
239
|
+
end
|
240
|
+
end
|
241
|
+
else # model
|
242
|
+
temp_model = UltracartClient.const_get(type).new
|
243
|
+
temp_model.build_from_hash(value)
|
244
|
+
end
|
245
|
+
end
|
246
|
+
|
247
|
+
# Returns the string representation of the object
|
248
|
+
# @return [String] String presentation of the object
|
249
|
+
def to_s
|
250
|
+
to_hash.to_s
|
251
|
+
end
|
252
|
+
|
253
|
+
# to_body is an alias to to_hash (backward compatibility)
|
254
|
+
# @return [Hash] Returns the object in the form of hash
|
255
|
+
def to_body
|
256
|
+
to_hash
|
257
|
+
end
|
258
|
+
|
259
|
+
# Returns the object in the form of hash
|
260
|
+
# @return [Hash] Returns the object in the form of hash
|
261
|
+
def to_hash
|
262
|
+
hash = {}
|
263
|
+
self.class.attribute_map.each_pair do |attr, param|
|
264
|
+
value = self.send(attr)
|
265
|
+
next if value.nil?
|
266
|
+
hash[param] = _to_hash(value)
|
267
|
+
end
|
268
|
+
hash
|
269
|
+
end
|
270
|
+
|
271
|
+
# Outputs non-array value in the form of hash
|
272
|
+
# For object, use to_hash. Otherwise, just return the value
|
273
|
+
# @param [Object] value Any valid value
|
274
|
+
# @return [Hash] Returns the value in the form of hash
|
275
|
+
def _to_hash(value)
|
276
|
+
if value.is_a?(Array)
|
277
|
+
value.compact.map { |v| _to_hash(v) }
|
278
|
+
elsif value.is_a?(Hash)
|
279
|
+
{}.tap do |hash|
|
280
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
281
|
+
end
|
282
|
+
elsif value.respond_to? :to_hash
|
283
|
+
value.to_hash
|
284
|
+
else
|
285
|
+
value
|
286
|
+
end
|
287
|
+
end
|
288
|
+
|
289
|
+
end
|
290
|
+
end
|
@@ -14,6 +14,12 @@ require 'date'
|
|
14
14
|
|
15
15
|
module UltracartClient
|
16
16
|
class OrderProperty
|
17
|
+
# Created by user
|
18
|
+
attr_accessor :created_by
|
19
|
+
|
20
|
+
# The date/time that the property was created by the user
|
21
|
+
attr_accessor :created_dts
|
22
|
+
|
17
23
|
# True if this property is displayed to the customer
|
18
24
|
attr_accessor :display
|
19
25
|
|
@@ -29,6 +35,8 @@ module UltracartClient
|
|
29
35
|
# Attribute mapping from ruby-style variable name to JSON key.
|
30
36
|
def self.attribute_map
|
31
37
|
{
|
38
|
+
:'created_by' => :'created_by',
|
39
|
+
:'created_dts' => :'created_dts',
|
32
40
|
:'display' => :'display',
|
33
41
|
:'expiration_dts' => :'expiration_dts',
|
34
42
|
:'name' => :'name',
|
@@ -39,6 +47,8 @@ module UltracartClient
|
|
39
47
|
# Attribute type mapping.
|
40
48
|
def self.swagger_types
|
41
49
|
{
|
50
|
+
:'created_by' => :'String',
|
51
|
+
:'created_dts' => :'String',
|
42
52
|
:'display' => :'BOOLEAN',
|
43
53
|
:'expiration_dts' => :'String',
|
44
54
|
:'name' => :'String',
|
@@ -54,6 +64,14 @@ module UltracartClient
|
|
54
64
|
# convert string to symbol for hash key
|
55
65
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
56
66
|
|
67
|
+
if attributes.has_key?(:'created_by')
|
68
|
+
self.created_by = attributes[:'created_by']
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.has_key?(:'created_dts')
|
72
|
+
self.created_dts = attributes[:'created_dts']
|
73
|
+
end
|
74
|
+
|
57
75
|
if attributes.has_key?(:'display')
|
58
76
|
self.display = attributes[:'display']
|
59
77
|
end
|
@@ -75,6 +93,10 @@ module UltracartClient
|
|
75
93
|
# @return Array for valid properties with the reasons
|
76
94
|
def list_invalid_properties
|
77
95
|
invalid_properties = Array.new
|
96
|
+
if !@created_by.nil? && @created_by.to_s.length > 20
|
97
|
+
invalid_properties.push('invalid value for "created_by", the character length must be smaller than or equal to 20.')
|
98
|
+
end
|
99
|
+
|
78
100
|
if !@name.nil? && @name.to_s.length > 100
|
79
101
|
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 100.')
|
80
102
|
end
|
@@ -89,11 +111,22 @@ module UltracartClient
|
|
89
111
|
# Check to see if the all the properties in the model are valid
|
90
112
|
# @return true if the model is valid
|
91
113
|
def valid?
|
114
|
+
return false if !@created_by.nil? && @created_by.to_s.length > 20
|
92
115
|
return false if !@name.nil? && @name.to_s.length > 100
|
93
116
|
return false if !@value.nil? && @value.to_s.length > 1500
|
94
117
|
true
|
95
118
|
end
|
96
119
|
|
120
|
+
# Custom attribute writer method with validation
|
121
|
+
# @param [Object] created_by Value to be assigned
|
122
|
+
def created_by=(created_by)
|
123
|
+
if !created_by.nil? && created_by.to_s.length > 20
|
124
|
+
fail ArgumentError, 'invalid value for "created_by", the character length must be smaller than or equal to 20.'
|
125
|
+
end
|
126
|
+
|
127
|
+
@created_by = created_by
|
128
|
+
end
|
129
|
+
|
97
130
|
# Custom attribute writer method with validation
|
98
131
|
# @param [Object] name Value to be assigned
|
99
132
|
def name=(name)
|
@@ -119,6 +152,8 @@ module UltracartClient
|
|
119
152
|
def ==(o)
|
120
153
|
return true if self.equal?(o)
|
121
154
|
self.class == o.class &&
|
155
|
+
created_by == o.created_by &&
|
156
|
+
created_dts == o.created_dts &&
|
122
157
|
display == o.display &&
|
123
158
|
expiration_dts == o.expiration_dts &&
|
124
159
|
name == o.name &&
|
@@ -134,7 +169,7 @@ module UltracartClient
|
|
134
169
|
# Calculates hash code according to all attributes.
|
135
170
|
# @return [Fixnum] Hash code
|
136
171
|
def hash
|
137
|
-
[display, expiration_dts, name, value].hash
|
172
|
+
[created_by, created_dts, display, expiration_dts, name, value].hash
|
138
173
|
end
|
139
174
|
|
140
175
|
# Builds the object from hash
|
data/lib/ultracart_api.rb
CHANGED
@@ -120,6 +120,7 @@ require 'ultracart_api/models/cart_taxes'
|
|
120
120
|
require 'ultracart_api/models/cart_upsell_after'
|
121
121
|
require 'ultracart_api/models/cart_validation_request'
|
122
122
|
require 'ultracart_api/models/cart_validation_response'
|
123
|
+
require 'ultracart_api/models/chanel_partner_reason_codes_response'
|
123
124
|
require 'ultracart_api/models/channel_partner'
|
124
125
|
require 'ultracart_api/models/channel_partner_cancel_response'
|
125
126
|
require 'ultracart_api/models/channel_partner_estimate_shipping_response'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ultracart_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.11.
|
4
|
+
version: 3.11.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-04-
|
11
|
+
date: 2025-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -326,6 +326,7 @@ files:
|
|
326
326
|
- docs/CartUpsellAfter.md
|
327
327
|
- docs/CartValidationRequest.md
|
328
328
|
- docs/CartValidationResponse.md
|
329
|
+
- docs/ChanelPartnerReasonCodesResponse.md
|
329
330
|
- docs/ChannelPartner.md
|
330
331
|
- docs/ChannelPartnerApi.md
|
331
332
|
- docs/ChannelPartnerCancelResponse.md
|
@@ -1229,6 +1230,7 @@ files:
|
|
1229
1230
|
- lib/ultracart_api/models/cart_upsell_after.rb
|
1230
1231
|
- lib/ultracart_api/models/cart_validation_request.rb
|
1231
1232
|
- lib/ultracart_api/models/cart_validation_response.rb
|
1233
|
+
- lib/ultracart_api/models/chanel_partner_reason_codes_response.rb
|
1232
1234
|
- lib/ultracart_api/models/channel_partner.rb
|
1233
1235
|
- lib/ultracart_api/models/channel_partner_cancel_response.rb
|
1234
1236
|
- lib/ultracart_api/models/channel_partner_estimate_shipping_response.rb
|