ultracart_api 4.0.119.rc → 4.0.121.rc
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 +8 -4
- data/docs/ConversationApi.md +72 -0
- data/docs/Coupon.md +2 -0
- data/docs/OrderInternal.md +4 -2
- data/docs/OrderTransactionalMerchantNote.md +24 -0
- data/lib/ultracart_api/api/conversation_api.rb +64 -0
- data/lib/ultracart_api/models/coupon.rb +11 -1
- data/lib/ultracart_api/models/order_internal.rb +17 -5
- data/lib/ultracart_api/models/order_transactional_merchant_note.rb +250 -0
- 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: d97518154070fdcaf12658dd006a0ddc20c6d061cdfbcdf9a4b14af579592ad5
|
4
|
+
data.tar.gz: 84e727efae5af8c6a56b2de3b043c2b7de3045febb64111e258583f682345e5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cc4d3c7e82b5229abe2e691054bc9300baf3f1d939cee613a9b3355c8a80bdff33f9fdc7bb7f5de17fdfc5a944cc94bfddd057a9a8713d9b49226b93593a5fcd
|
7
|
+
data.tar.gz: de9d4dbb699e813a94760d19416e3aaf108561d80644d882e53e51d2305e905a6ad3a19f172d881d4addcbf218142da273c69dc2dd55e7166839c16111417ec2
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
9
|
- API version: 2.0.0
|
10
|
-
- Package version: 4.0.
|
10
|
+
- Package version: 4.0.121.rc
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
|
13
13
|
|
@@ -24,16 +24,16 @@ gem build ultracart_api.gemspec
|
|
24
24
|
Then either install the gem locally:
|
25
25
|
|
26
26
|
```shell
|
27
|
-
gem install ./ultracart_api-4.0.
|
27
|
+
gem install ./ultracart_api-4.0.121.rc.gem
|
28
28
|
```
|
29
29
|
|
30
|
-
(for development, run `gem install --dev ./ultracart_api-4.0.
|
30
|
+
(for development, run `gem install --dev ./ultracart_api-4.0.121.rc.gem` to install the development dependencies)
|
31
31
|
|
32
32
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
33
33
|
|
34
34
|
Finally add this to the Gemfile:
|
35
35
|
|
36
|
-
gem 'ultracart_api', '~> 4.0.
|
36
|
+
gem 'ultracart_api', '~> 4.0.121.rc'
|
37
37
|
|
38
38
|
### Install from Git
|
39
39
|
|
@@ -147,6 +147,7 @@ Class | Method | HTTP request | Description
|
|
147
147
|
*UltracartClient::ConversationApi* | [**get_conversation_context**](docs/ConversationApi.md#get_conversation_context) | **PUT** /conversation/conversations/{conversation_uuid}/context | Get a webchat conversation context
|
148
148
|
*UltracartClient::ConversationApi* | [**get_conversation_department_member_list**](docs/ConversationApi.md#get_conversation_department_member_list) | **GET** /conversation/department_members | Retrieve a list of possible department members
|
149
149
|
*UltracartClient::ConversationApi* | [**get_conversation_departments**](docs/ConversationApi.md#get_conversation_departments) | **GET** /conversation/departments | Retrieve a list of departments ordered by name
|
150
|
+
*UltracartClient::ConversationApi* | [**get_conversation_engagement**](docs/ConversationApi.md#get_conversation_engagement) | **GET** /conversation/engagements/{conversation_engagement_oid} | Retrieve an engagement
|
150
151
|
*UltracartClient::ConversationApi* | [**get_conversation_engagements**](docs/ConversationApi.md#get_conversation_engagements) | **GET** /conversation/engagements | Retrieve a list of engagements ordered by name
|
151
152
|
*UltracartClient::ConversationApi* | [**get_conversation_messages**](docs/ConversationApi.md#get_conversation_messages) | **GET** /conversation/conversations/{conversation_uuid}/messages/{since} | Retrieve conversation messages
|
152
153
|
*UltracartClient::ConversationApi* | [**get_conversation_multimedia_upload_url**](docs/ConversationApi.md#get_conversation_multimedia_upload_url) | **GET** /conversation/upload_url/{extension} | Get a presigned conersation multimedia upload URL
|
@@ -1092,6 +1093,7 @@ Class | Method | HTTP request | Description
|
|
1092
1093
|
- [UltracartClient::OrderTokenResponse](docs/OrderTokenResponse.md)
|
1093
1094
|
- [UltracartClient::OrderTrackingNumberDetail](docs/OrderTrackingNumberDetail.md)
|
1094
1095
|
- [UltracartClient::OrderTrackingNumberDetails](docs/OrderTrackingNumberDetails.md)
|
1096
|
+
- [UltracartClient::OrderTransactionalMerchantNote](docs/OrderTransactionalMerchantNote.md)
|
1095
1097
|
- [UltracartClient::OrdersResponse](docs/OrdersResponse.md)
|
1096
1098
|
- [UltracartClient::Permission](docs/Permission.md)
|
1097
1099
|
- [UltracartClient::PointOfSaleLocation](docs/PointOfSaleLocation.md)
|
@@ -1296,6 +1298,8 @@ Not every change is committed to every SDK.
|
|
1296
1298
|
|
1297
1299
|
| Version | Date | Comments |
|
1298
1300
|
| --: | :-: | --- |
|
1301
|
+
| 4.0.121-RC | 01/23/2023 | conversation - method to fetch single engagement record |
|
1302
|
+
| 4.0.120-RC | 01/19/2023 | added skip_on_rebill field to coupon object |
|
1299
1303
|
| 4.0.119-RC | 01/19/2023 | convo - getConversationPermissions added |
|
1300
1304
|
| 4.0.118-RC | 01/18/2023 | conversation get dept member list method added |
|
1301
1305
|
| 4.0.117-RC | 01/18/2023 | conversation dept members |
|
data/docs/ConversationApi.md
CHANGED
@@ -14,6 +14,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
14
14
|
| [**get_conversation_context**](ConversationApi.md#get_conversation_context) | **PUT** /conversation/conversations/{conversation_uuid}/context | Get a webchat conversation context |
|
15
15
|
| [**get_conversation_department_member_list**](ConversationApi.md#get_conversation_department_member_list) | **GET** /conversation/department_members | Retrieve a list of possible department members |
|
16
16
|
| [**get_conversation_departments**](ConversationApi.md#get_conversation_departments) | **GET** /conversation/departments | Retrieve a list of departments ordered by name |
|
17
|
+
| [**get_conversation_engagement**](ConversationApi.md#get_conversation_engagement) | **GET** /conversation/engagements/{conversation_engagement_oid} | Retrieve an engagement |
|
17
18
|
| [**get_conversation_engagements**](ConversationApi.md#get_conversation_engagements) | **GET** /conversation/engagements | Retrieve a list of engagements ordered by name |
|
18
19
|
| [**get_conversation_messages**](ConversationApi.md#get_conversation_messages) | **GET** /conversation/conversations/{conversation_uuid}/messages/{since} | Retrieve conversation messages |
|
19
20
|
| [**get_conversation_multimedia_upload_url**](ConversationApi.md#get_conversation_multimedia_upload_url) | **GET** /conversation/upload_url/{extension} | Get a presigned conersation multimedia upload URL |
|
@@ -731,6 +732,77 @@ This endpoint does not need any parameter.
|
|
731
732
|
- **Accept**: application/json
|
732
733
|
|
733
734
|
|
735
|
+
## get_conversation_engagement
|
736
|
+
|
737
|
+
> <ConversationEngagementResponse> get_conversation_engagement(conversation_engagement_oid)
|
738
|
+
|
739
|
+
Retrieve an engagement
|
740
|
+
|
741
|
+
Retrieve an engagement
|
742
|
+
|
743
|
+
### Examples
|
744
|
+
|
745
|
+
```ruby
|
746
|
+
require 'time'
|
747
|
+
require 'ultracart_api'
|
748
|
+
require 'json'
|
749
|
+
require 'yaml'
|
750
|
+
require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
|
751
|
+
|
752
|
+
# This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
|
753
|
+
# As such, this might not be the best way to use this object.
|
754
|
+
# Please see https://github.com/UltraCart/sdk_samples for working examples.
|
755
|
+
|
756
|
+
api = UltracartClient::ConversationApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
|
757
|
+
conversation_engagement_oid = 56 # Integer |
|
758
|
+
|
759
|
+
begin
|
760
|
+
# Retrieve an engagement
|
761
|
+
result = api_instance.get_conversation_engagement(conversation_engagement_oid)
|
762
|
+
p result
|
763
|
+
rescue UltracartClient::ApiError => e
|
764
|
+
puts "Error when calling ConversationApi->get_conversation_engagement: #{e}"
|
765
|
+
end
|
766
|
+
```
|
767
|
+
|
768
|
+
#### Using the get_conversation_engagement_with_http_info variant
|
769
|
+
|
770
|
+
This returns an Array which contains the response data, status code and headers.
|
771
|
+
|
772
|
+
> <Array(<ConversationEngagementResponse>, Integer, Hash)> get_conversation_engagement_with_http_info(conversation_engagement_oid)
|
773
|
+
|
774
|
+
```ruby
|
775
|
+
begin
|
776
|
+
# Retrieve an engagement
|
777
|
+
data, status_code, headers = api_instance.get_conversation_engagement_with_http_info(conversation_engagement_oid)
|
778
|
+
p status_code # => 2xx
|
779
|
+
p headers # => { ... }
|
780
|
+
p data # => <ConversationEngagementResponse>
|
781
|
+
rescue UltracartClient::ApiError => e
|
782
|
+
puts "Error when calling ConversationApi->get_conversation_engagement_with_http_info: #{e}"
|
783
|
+
end
|
784
|
+
```
|
785
|
+
|
786
|
+
### Parameters
|
787
|
+
|
788
|
+
| Name | Type | Description | Notes |
|
789
|
+
| ---- | ---- | ----------- | ----- |
|
790
|
+
| **conversation_engagement_oid** | **Integer** | | |
|
791
|
+
|
792
|
+
### Return type
|
793
|
+
|
794
|
+
[**ConversationEngagementResponse**](ConversationEngagementResponse.md)
|
795
|
+
|
796
|
+
### Authorization
|
797
|
+
|
798
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
799
|
+
|
800
|
+
### HTTP request headers
|
801
|
+
|
802
|
+
- **Content-Type**: Not defined
|
803
|
+
- **Accept**: application/json
|
804
|
+
|
805
|
+
|
734
806
|
## get_conversation_engagements
|
735
807
|
|
736
808
|
> <ConversationEngagementsResponse> get_conversation_engagements
|
data/docs/Coupon.md
CHANGED
@@ -60,6 +60,7 @@
|
|
60
60
|
| **restrict_by_postal_codes** | **Array<String>** | Optional list of postal codes which restrict a coupon to within these postal codes. | [optional] |
|
61
61
|
| **restrict_by_screen_branding_theme_codes** | [**Array<CouponRestriction>**](CouponRestriction.md) | Optional list of legacy screen branding theme codes to limit coupon use to only those themes. | [optional] |
|
62
62
|
| **restrict_by_storefronts** | [**Array<CouponRestriction>**](CouponRestriction.md) | Optional list of storefronts to limit coupon use to only those storefronts. | [optional] |
|
63
|
+
| **skip_on_rebill** | **Boolean** | Skip this coupon when it is on a rebill of an auto order. | [optional] |
|
63
64
|
| **start_dts** | **String** | Date/time when coupon is valid | [optional] |
|
64
65
|
| **super_coupon** | **Boolean** | If true, this coupon can be used with ANY other coupon regardless of the other coupons configuration | [optional] |
|
65
66
|
| **tiered_amount_off_items** | [**CouponTieredAmountOffItems**](CouponTieredAmountOffItems.md) | | [optional] |
|
@@ -132,6 +133,7 @@ instance = UltracartClient::Coupon.new(
|
|
132
133
|
restrict_by_postal_codes: null,
|
133
134
|
restrict_by_screen_branding_theme_codes: null,
|
134
135
|
restrict_by_storefronts: null,
|
136
|
+
skip_on_rebill: null,
|
135
137
|
start_dts: null,
|
136
138
|
super_coupon: null,
|
137
139
|
tiered_amount_off_items: null,
|
data/docs/OrderInternal.md
CHANGED
@@ -5,10 +5,11 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **exported_to_accounting** | **Boolean** | True if the order has been exported to QuickBooks. If QuickBooks is not configured, then this will already be true | [optional] |
|
8
|
-
| **merchant_notes** | **String** | Merchant notes | [optional] |
|
8
|
+
| **merchant_notes** | **String** | Merchant notes. Full notes in non-transactional mode. Just used to write a new merchant note when transaction merchant notes enabled. | [optional] |
|
9
9
|
| **placed_by_user** | **String** | If placed via the BEOE, this is the user that placed the order | [optional] |
|
10
10
|
| **refund_by_user** | **String** | User that issued the refund | [optional] |
|
11
11
|
| **sales_rep_code** | **String** | Sales rep code associated with the order | [optional] |
|
12
|
+
| **transactional_merchant_notes** | [**Array<OrderTransactionalMerchantNote>**](OrderTransactionalMerchantNote.md) | Transactional merchant notes | [optional] |
|
12
13
|
|
13
14
|
## Example
|
14
15
|
|
@@ -20,7 +21,8 @@ instance = UltracartClient::OrderInternal.new(
|
|
20
21
|
merchant_notes: null,
|
21
22
|
placed_by_user: null,
|
22
23
|
refund_by_user: null,
|
23
|
-
sales_rep_code: null
|
24
|
+
sales_rep_code: null,
|
25
|
+
transactional_merchant_notes: null
|
24
26
|
)
|
25
27
|
```
|
26
28
|
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# UltracartClient::OrderTransactionalMerchantNote
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **ip_address** | **String** | IP Address | [optional] |
|
8
|
+
| **note** | **String** | note | [optional] |
|
9
|
+
| **note_dts** | **String** | Timestamp when the note was added | [optional] |
|
10
|
+
| **user** | **String** | User that wrote the merchant note | [optional] |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'ultracart_api'
|
16
|
+
|
17
|
+
instance = UltracartClient::OrderTransactionalMerchantNote.new(
|
18
|
+
ip_address: null,
|
19
|
+
note: null,
|
20
|
+
note_dts: null,
|
21
|
+
user: null
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|
@@ -645,6 +645,70 @@ module UltracartClient
|
|
645
645
|
return data, status_code, headers
|
646
646
|
end
|
647
647
|
|
648
|
+
# Retrieve an engagement
|
649
|
+
# Retrieve an engagement
|
650
|
+
# @param conversation_engagement_oid [Integer]
|
651
|
+
# @param [Hash] opts the optional parameters
|
652
|
+
# @return [ConversationEngagementResponse]
|
653
|
+
def get_conversation_engagement(conversation_engagement_oid, opts = {})
|
654
|
+
data, _status_code, _headers = get_conversation_engagement_with_http_info(conversation_engagement_oid, opts)
|
655
|
+
data
|
656
|
+
end
|
657
|
+
|
658
|
+
# Retrieve an engagement
|
659
|
+
# Retrieve an engagement
|
660
|
+
# @param conversation_engagement_oid [Integer]
|
661
|
+
# @param [Hash] opts the optional parameters
|
662
|
+
# @return [Array<(ConversationEngagementResponse, Integer, Hash)>] ConversationEngagementResponse data, response status code and response headers
|
663
|
+
def get_conversation_engagement_with_http_info(conversation_engagement_oid, opts = {})
|
664
|
+
if @api_client.config.debugging
|
665
|
+
@api_client.config.logger.debug 'Calling API: ConversationApi.get_conversation_engagement ...'
|
666
|
+
end
|
667
|
+
# verify the required parameter 'conversation_engagement_oid' is set
|
668
|
+
if @api_client.config.client_side_validation && conversation_engagement_oid.nil?
|
669
|
+
fail ArgumentError, "Missing the required parameter 'conversation_engagement_oid' when calling ConversationApi.get_conversation_engagement"
|
670
|
+
end
|
671
|
+
# resource path
|
672
|
+
local_var_path = '/conversation/engagements/{conversation_engagement_oid}'.sub('{' + 'conversation_engagement_oid' + '}', CGI.escape(conversation_engagement_oid.to_s))
|
673
|
+
|
674
|
+
# query parameters
|
675
|
+
query_params = opts[:query_params] || {}
|
676
|
+
|
677
|
+
# header parameters
|
678
|
+
header_params = opts[:header_params] || {}
|
679
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
680
|
+
# HTTP header 'Accept' (if needed)
|
681
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
682
|
+
|
683
|
+
# form parameters
|
684
|
+
form_params = opts[:form_params] || {}
|
685
|
+
|
686
|
+
# http body (model)
|
687
|
+
post_body = opts[:debug_body]
|
688
|
+
|
689
|
+
# return_type
|
690
|
+
return_type = opts[:debug_return_type] || 'ConversationEngagementResponse'
|
691
|
+
|
692
|
+
# auth_names
|
693
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
694
|
+
|
695
|
+
new_options = opts.merge(
|
696
|
+
:operation => :"ConversationApi.get_conversation_engagement",
|
697
|
+
:header_params => header_params,
|
698
|
+
:query_params => query_params,
|
699
|
+
:form_params => form_params,
|
700
|
+
:body => post_body,
|
701
|
+
:auth_names => auth_names,
|
702
|
+
:return_type => return_type
|
703
|
+
)
|
704
|
+
|
705
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
706
|
+
if @api_client.config.debugging
|
707
|
+
@api_client.config.logger.debug "API called: ConversationApi#get_conversation_engagement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
708
|
+
end
|
709
|
+
return data, status_code, headers
|
710
|
+
end
|
711
|
+
|
648
712
|
# Retrieve a list of engagements ordered by name
|
649
713
|
# Retrieve a list of engagements ordered by name
|
650
714
|
# @param [Hash] opts the optional parameters
|
@@ -142,6 +142,9 @@ module UltracartClient
|
|
142
142
|
# Optional list of storefronts to limit coupon use to only those storefronts.
|
143
143
|
attr_accessor :restrict_by_storefronts
|
144
144
|
|
145
|
+
# Skip this coupon when it is on a rebill of an auto order.
|
146
|
+
attr_accessor :skip_on_rebill
|
147
|
+
|
145
148
|
# Date/time when coupon is valid
|
146
149
|
attr_accessor :start_dts
|
147
150
|
|
@@ -222,6 +225,7 @@ module UltracartClient
|
|
222
225
|
:'restrict_by_postal_codes' => :'restrict_by_postal_codes',
|
223
226
|
:'restrict_by_screen_branding_theme_codes' => :'restrict_by_screen_branding_theme_codes',
|
224
227
|
:'restrict_by_storefronts' => :'restrict_by_storefronts',
|
228
|
+
:'skip_on_rebill' => :'skip_on_rebill',
|
225
229
|
:'start_dts' => :'start_dts',
|
226
230
|
:'super_coupon' => :'super_coupon',
|
227
231
|
:'tiered_amount_off_items' => :'tiered_amount_off_items',
|
@@ -298,6 +302,7 @@ module UltracartClient
|
|
298
302
|
:'restrict_by_postal_codes' => :'Array<String>',
|
299
303
|
:'restrict_by_screen_branding_theme_codes' => :'Array<CouponRestriction>',
|
300
304
|
:'restrict_by_storefronts' => :'Array<CouponRestriction>',
|
305
|
+
:'skip_on_rebill' => :'Boolean',
|
301
306
|
:'start_dts' => :'String',
|
302
307
|
:'super_coupon' => :'Boolean',
|
303
308
|
:'tiered_amount_off_items' => :'CouponTieredAmountOffItems',
|
@@ -561,6 +566,10 @@ module UltracartClient
|
|
561
566
|
end
|
562
567
|
end
|
563
568
|
|
569
|
+
if attributes.key?(:'skip_on_rebill')
|
570
|
+
self.skip_on_rebill = attributes[:'skip_on_rebill']
|
571
|
+
end
|
572
|
+
|
564
573
|
if attributes.key?(:'start_dts')
|
565
574
|
self.start_dts = attributes[:'start_dts']
|
566
575
|
end
|
@@ -762,6 +771,7 @@ module UltracartClient
|
|
762
771
|
restrict_by_postal_codes == o.restrict_by_postal_codes &&
|
763
772
|
restrict_by_screen_branding_theme_codes == o.restrict_by_screen_branding_theme_codes &&
|
764
773
|
restrict_by_storefronts == o.restrict_by_storefronts &&
|
774
|
+
skip_on_rebill == o.skip_on_rebill &&
|
765
775
|
start_dts == o.start_dts &&
|
766
776
|
super_coupon == o.super_coupon &&
|
767
777
|
tiered_amount_off_items == o.tiered_amount_off_items &&
|
@@ -782,7 +792,7 @@ module UltracartClient
|
|
782
792
|
# Calculates hash code according to all attributes.
|
783
793
|
# @return [Integer] Hash code
|
784
794
|
def hash
|
785
|
-
[affiliate_oid, allow_multiple_one_time_codes, amount_off_items, amount_off_shipping, amount_off_shipping_with_items_purchase, amount_off_subtotal, amount_off_subtotal_and_free_shipping, amount_off_subtotal_and_shipping, amount_off_subtotal_with_block_purchase, amount_off_subtotal_with_items_purchase, amount_off_subtotal_with_purchase, amount_shipping_with_subtotal, automatically_apply_coupon_codes, buy_one_get_one, calculated_description, can_be_used_with_other_coupons, coupon_oid, coupon_type, description, discount_item_with_item_purchase, discount_items, expiration_dts, free_item_and_shipping_with_subtotal, free_item_with_item_purchase, free_item_with_subtotal, free_items_with_item_purchase, free_items_with_mixmatch_purchase, free_shipping, free_shipping_specific_items, free_shipping_with_items_purchase, free_shipping_with_subtotal, hide_from_customer, merchant_code, merchant_notes, more_loyalty_cashback, more_loyalty_points, multiple_amounts_off_items, no_discount, percent_more_loyalty_cashback, percent_more_loyalty_points, percent_off_item_with_items_quantity_purchase, percent_off_items, percent_off_items_and_free_shipping, percent_off_items_with_items_purchase, percent_off_msrp_items, percent_off_retail_price_items, percent_off_shipping, percent_off_subtotal, percent_off_subtotal_and_free_shipping, percent_off_subtotal_limit, percent_off_subtotal_with_items_purchase, percent_off_subtotal_with_subtotal, quickbooks_code, restrict_by_postal_codes, restrict_by_screen_branding_theme_codes, restrict_by_storefronts, start_dts, super_coupon, tiered_amount_off_items, tiered_amount_off_subtotal, tiered_percent_off_items, tiered_percent_off_shipping, tiered_percent_off_subtotal, tiered_percent_off_subtotal_based_on_msrp, usable_by].hash
|
795
|
+
[affiliate_oid, allow_multiple_one_time_codes, amount_off_items, amount_off_shipping, amount_off_shipping_with_items_purchase, amount_off_subtotal, amount_off_subtotal_and_free_shipping, amount_off_subtotal_and_shipping, amount_off_subtotal_with_block_purchase, amount_off_subtotal_with_items_purchase, amount_off_subtotal_with_purchase, amount_shipping_with_subtotal, automatically_apply_coupon_codes, buy_one_get_one, calculated_description, can_be_used_with_other_coupons, coupon_oid, coupon_type, description, discount_item_with_item_purchase, discount_items, expiration_dts, free_item_and_shipping_with_subtotal, free_item_with_item_purchase, free_item_with_subtotal, free_items_with_item_purchase, free_items_with_mixmatch_purchase, free_shipping, free_shipping_specific_items, free_shipping_with_items_purchase, free_shipping_with_subtotal, hide_from_customer, merchant_code, merchant_notes, more_loyalty_cashback, more_loyalty_points, multiple_amounts_off_items, no_discount, percent_more_loyalty_cashback, percent_more_loyalty_points, percent_off_item_with_items_quantity_purchase, percent_off_items, percent_off_items_and_free_shipping, percent_off_items_with_items_purchase, percent_off_msrp_items, percent_off_retail_price_items, percent_off_shipping, percent_off_subtotal, percent_off_subtotal_and_free_shipping, percent_off_subtotal_limit, percent_off_subtotal_with_items_purchase, percent_off_subtotal_with_subtotal, quickbooks_code, restrict_by_postal_codes, restrict_by_screen_branding_theme_codes, restrict_by_storefronts, skip_on_rebill, start_dts, super_coupon, tiered_amount_off_items, tiered_amount_off_subtotal, tiered_percent_off_items, tiered_percent_off_shipping, tiered_percent_off_subtotal, tiered_percent_off_subtotal_based_on_msrp, usable_by].hash
|
786
796
|
end
|
787
797
|
|
788
798
|
# Builds the object from hash
|
@@ -18,7 +18,7 @@ module UltracartClient
|
|
18
18
|
# True if the order has been exported to QuickBooks. If QuickBooks is not configured, then this will already be true
|
19
19
|
attr_accessor :exported_to_accounting
|
20
20
|
|
21
|
-
# Merchant notes
|
21
|
+
# Merchant notes. Full notes in non-transactional mode. Just used to write a new merchant note when transaction merchant notes enabled.
|
22
22
|
attr_accessor :merchant_notes
|
23
23
|
|
24
24
|
# If placed via the BEOE, this is the user that placed the order
|
@@ -30,6 +30,9 @@ module UltracartClient
|
|
30
30
|
# Sales rep code associated with the order
|
31
31
|
attr_accessor :sales_rep_code
|
32
32
|
|
33
|
+
# Transactional merchant notes
|
34
|
+
attr_accessor :transactional_merchant_notes
|
35
|
+
|
33
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
34
37
|
def self.attribute_map
|
35
38
|
{
|
@@ -37,7 +40,8 @@ module UltracartClient
|
|
37
40
|
:'merchant_notes' => :'merchant_notes',
|
38
41
|
:'placed_by_user' => :'placed_by_user',
|
39
42
|
:'refund_by_user' => :'refund_by_user',
|
40
|
-
:'sales_rep_code' => :'sales_rep_code'
|
43
|
+
:'sales_rep_code' => :'sales_rep_code',
|
44
|
+
:'transactional_merchant_notes' => :'transactional_merchant_notes'
|
41
45
|
}
|
42
46
|
end
|
43
47
|
|
@@ -53,7 +57,8 @@ module UltracartClient
|
|
53
57
|
:'merchant_notes' => :'String',
|
54
58
|
:'placed_by_user' => :'String',
|
55
59
|
:'refund_by_user' => :'String',
|
56
|
-
:'sales_rep_code' => :'String'
|
60
|
+
:'sales_rep_code' => :'String',
|
61
|
+
:'transactional_merchant_notes' => :'Array<OrderTransactionalMerchantNote>'
|
57
62
|
}
|
58
63
|
end
|
59
64
|
|
@@ -97,6 +102,12 @@ module UltracartClient
|
|
97
102
|
if attributes.key?(:'sales_rep_code')
|
98
103
|
self.sales_rep_code = attributes[:'sales_rep_code']
|
99
104
|
end
|
105
|
+
|
106
|
+
if attributes.key?(:'transactional_merchant_notes')
|
107
|
+
if (value = attributes[:'transactional_merchant_notes']).is_a?(Array)
|
108
|
+
self.transactional_merchant_notes = value
|
109
|
+
end
|
110
|
+
end
|
100
111
|
end
|
101
112
|
|
102
113
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -136,7 +147,8 @@ module UltracartClient
|
|
136
147
|
merchant_notes == o.merchant_notes &&
|
137
148
|
placed_by_user == o.placed_by_user &&
|
138
149
|
refund_by_user == o.refund_by_user &&
|
139
|
-
sales_rep_code == o.sales_rep_code
|
150
|
+
sales_rep_code == o.sales_rep_code &&
|
151
|
+
transactional_merchant_notes == o.transactional_merchant_notes
|
140
152
|
end
|
141
153
|
|
142
154
|
# @see the `==` method
|
@@ -148,7 +160,7 @@ module UltracartClient
|
|
148
160
|
# Calculates hash code according to all attributes.
|
149
161
|
# @return [Integer] Hash code
|
150
162
|
def hash
|
151
|
-
[exported_to_accounting, merchant_notes, placed_by_user, refund_by_user, sales_rep_code].hash
|
163
|
+
[exported_to_accounting, merchant_notes, placed_by_user, refund_by_user, sales_rep_code, transactional_merchant_notes].hash
|
152
164
|
end
|
153
165
|
|
154
166
|
# Builds the object from hash
|
@@ -0,0 +1,250 @@
|
|
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 OrderTransactionalMerchantNote
|
18
|
+
# IP Address
|
19
|
+
attr_accessor :ip_address
|
20
|
+
|
21
|
+
# note
|
22
|
+
attr_accessor :note
|
23
|
+
|
24
|
+
# Timestamp when the note was added
|
25
|
+
attr_accessor :note_dts
|
26
|
+
|
27
|
+
# User that wrote the merchant note
|
28
|
+
attr_accessor :user
|
29
|
+
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
31
|
+
def self.attribute_map
|
32
|
+
{
|
33
|
+
:'ip_address' => :'ip_address',
|
34
|
+
:'note' => :'note',
|
35
|
+
:'note_dts' => :'note_dts',
|
36
|
+
:'user' => :'user'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Returns all the JSON keys this model knows about
|
41
|
+
def self.acceptable_attributes
|
42
|
+
attribute_map.values
|
43
|
+
end
|
44
|
+
|
45
|
+
# Attribute type mapping.
|
46
|
+
def self.openapi_types
|
47
|
+
{
|
48
|
+
:'ip_address' => :'String',
|
49
|
+
:'note' => :'String',
|
50
|
+
:'note_dts' => :'String',
|
51
|
+
:'user' => :'String'
|
52
|
+
}
|
53
|
+
end
|
54
|
+
|
55
|
+
# List of attributes with nullable: true
|
56
|
+
def self.openapi_nullable
|
57
|
+
Set.new([
|
58
|
+
])
|
59
|
+
end
|
60
|
+
|
61
|
+
# Initializes the object
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
63
|
+
def initialize(attributes = {})
|
64
|
+
if (!attributes.is_a?(Hash))
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::OrderTransactionalMerchantNote` initialize method"
|
66
|
+
end
|
67
|
+
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
70
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::OrderTransactionalMerchantNote`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
72
|
+
end
|
73
|
+
h[k.to_sym] = v
|
74
|
+
}
|
75
|
+
|
76
|
+
if attributes.key?(:'ip_address')
|
77
|
+
self.ip_address = attributes[:'ip_address']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.key?(:'note')
|
81
|
+
self.note = attributes[:'note']
|
82
|
+
end
|
83
|
+
|
84
|
+
if attributes.key?(:'note_dts')
|
85
|
+
self.note_dts = attributes[:'note_dts']
|
86
|
+
end
|
87
|
+
|
88
|
+
if attributes.key?(:'user')
|
89
|
+
self.user = attributes[:'user']
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
94
|
+
# @return Array for valid properties with the reasons
|
95
|
+
def list_invalid_properties
|
96
|
+
invalid_properties = Array.new
|
97
|
+
invalid_properties
|
98
|
+
end
|
99
|
+
|
100
|
+
# Check to see if the all the properties in the model are valid
|
101
|
+
# @return true if the model is valid
|
102
|
+
def valid?
|
103
|
+
true
|
104
|
+
end
|
105
|
+
|
106
|
+
# Checks equality by comparing each attribute.
|
107
|
+
# @param [Object] Object to be compared
|
108
|
+
def ==(o)
|
109
|
+
return true if self.equal?(o)
|
110
|
+
self.class == o.class &&
|
111
|
+
ip_address == o.ip_address &&
|
112
|
+
note == o.note &&
|
113
|
+
note_dts == o.note_dts &&
|
114
|
+
user == o.user
|
115
|
+
end
|
116
|
+
|
117
|
+
# @see the `==` method
|
118
|
+
# @param [Object] Object to be compared
|
119
|
+
def eql?(o)
|
120
|
+
self == o
|
121
|
+
end
|
122
|
+
|
123
|
+
# Calculates hash code according to all attributes.
|
124
|
+
# @return [Integer] Hash code
|
125
|
+
def hash
|
126
|
+
[ip_address, note, note_dts, user].hash
|
127
|
+
end
|
128
|
+
|
129
|
+
# Builds the object from hash
|
130
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
131
|
+
# @return [Object] Returns the model itself
|
132
|
+
def self.build_from_hash(attributes)
|
133
|
+
new.build_from_hash(attributes)
|
134
|
+
end
|
135
|
+
|
136
|
+
# Builds the object from hash
|
137
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
138
|
+
# @return [Object] Returns the model itself
|
139
|
+
def build_from_hash(attributes)
|
140
|
+
return nil unless attributes.is_a?(Hash)
|
141
|
+
attributes = attributes.transform_keys(&:to_sym)
|
142
|
+
self.class.openapi_types.each_pair do |key, type|
|
143
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
144
|
+
self.send("#{key}=", nil)
|
145
|
+
elsif type =~ /\AArray<(.*)>/i
|
146
|
+
# check to ensure the input is an array given that the attribute
|
147
|
+
# is documented as an array but the input is not
|
148
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
149
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
150
|
+
end
|
151
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
152
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
156
|
+
self
|
157
|
+
end
|
158
|
+
|
159
|
+
# Deserializes the data based on type
|
160
|
+
# @param string type Data type
|
161
|
+
# @param string value Value to be deserialized
|
162
|
+
# @return [Object] Deserialized data
|
163
|
+
def _deserialize(type, value)
|
164
|
+
case type.to_sym
|
165
|
+
when :Time
|
166
|
+
Time.parse(value)
|
167
|
+
when :Date
|
168
|
+
Date.parse(value)
|
169
|
+
when :String
|
170
|
+
value.to_s
|
171
|
+
when :Integer
|
172
|
+
value.to_i
|
173
|
+
when :Float
|
174
|
+
value.to_f
|
175
|
+
when :Boolean
|
176
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
177
|
+
true
|
178
|
+
else
|
179
|
+
false
|
180
|
+
end
|
181
|
+
when :Object
|
182
|
+
# generic object (usually a Hash), return directly
|
183
|
+
value
|
184
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
185
|
+
inner_type = Regexp.last_match[:inner_type]
|
186
|
+
value.map { |v| _deserialize(inner_type, v) }
|
187
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
188
|
+
k_type = Regexp.last_match[:k_type]
|
189
|
+
v_type = Regexp.last_match[:v_type]
|
190
|
+
{}.tap do |hash|
|
191
|
+
value.each do |k, v|
|
192
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
else # model
|
196
|
+
# models (e.g. Pet) or oneOf
|
197
|
+
klass = UltracartClient.const_get(type)
|
198
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
202
|
+
# Returns the string representation of the object
|
203
|
+
# @return [String] String presentation of the object
|
204
|
+
def to_s
|
205
|
+
to_hash.to_s
|
206
|
+
end
|
207
|
+
|
208
|
+
# to_body is an alias to to_hash (backward compatibility)
|
209
|
+
# @return [Hash] Returns the object in the form of hash
|
210
|
+
def to_body
|
211
|
+
to_hash
|
212
|
+
end
|
213
|
+
|
214
|
+
# Returns the object in the form of hash
|
215
|
+
# @return [Hash] Returns the object in the form of hash
|
216
|
+
def to_hash
|
217
|
+
hash = {}
|
218
|
+
self.class.attribute_map.each_pair do |attr, param|
|
219
|
+
value = self.send(attr)
|
220
|
+
if value.nil?
|
221
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
222
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
223
|
+
end
|
224
|
+
|
225
|
+
hash[param] = _to_hash(value)
|
226
|
+
end
|
227
|
+
hash
|
228
|
+
end
|
229
|
+
|
230
|
+
# Outputs non-array value in the form of hash
|
231
|
+
# For object, use to_hash. Otherwise, just return the value
|
232
|
+
# @param [Object] value Any valid value
|
233
|
+
# @return [Hash] Returns the value in the form of hash
|
234
|
+
def _to_hash(value)
|
235
|
+
if value.is_a?(Array)
|
236
|
+
value.compact.map { |v| _to_hash(v) }
|
237
|
+
elsif value.is_a?(Hash)
|
238
|
+
{}.tap do |hash|
|
239
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
240
|
+
end
|
241
|
+
elsif value.respond_to? :to_hash
|
242
|
+
value.to_hash
|
243
|
+
else
|
244
|
+
value
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
248
|
+
end
|
249
|
+
|
250
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
@@ -616,6 +616,7 @@ require 'ultracart_api/models/order_taxes'
|
|
616
616
|
require 'ultracart_api/models/order_token_response'
|
617
617
|
require 'ultracart_api/models/order_tracking_number_detail'
|
618
618
|
require 'ultracart_api/models/order_tracking_number_details'
|
619
|
+
require 'ultracart_api/models/order_transactional_merchant_note'
|
619
620
|
require 'ultracart_api/models/orders_response'
|
620
621
|
require 'ultracart_api/models/permission'
|
621
622
|
require 'ultracart_api/models/point_of_sale_location'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ultracart_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.121.rc
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -674,6 +674,7 @@ files:
|
|
674
674
|
- docs/OrderTokenResponse.md
|
675
675
|
- docs/OrderTrackingNumberDetail.md
|
676
676
|
- docs/OrderTrackingNumberDetails.md
|
677
|
+
- docs/OrderTransactionalMerchantNote.md
|
677
678
|
- docs/OrdersResponse.md
|
678
679
|
- docs/Permission.md
|
679
680
|
- docs/PointOfSaleLocation.md
|
@@ -1433,6 +1434,7 @@ files:
|
|
1433
1434
|
- lib/ultracart_api/models/order_token_response.rb
|
1434
1435
|
- lib/ultracart_api/models/order_tracking_number_detail.rb
|
1435
1436
|
- lib/ultracart_api/models/order_tracking_number_details.rb
|
1437
|
+
- lib/ultracart_api/models/order_transactional_merchant_note.rb
|
1436
1438
|
- lib/ultracart_api/models/orders_response.rb
|
1437
1439
|
- lib/ultracart_api/models/permission.rb
|
1438
1440
|
- lib/ultracart_api/models/point_of_sale_location.rb
|