ultracart_api 4.0.33.rc → 4.0.34.rc
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/docs/CustomerActivity.md +9 -1
- data/docs/CustomerApi.md +77 -0
- data/docs/CustomerMergeRequest.md +20 -0
- data/lib/ultracart_api/api/customer_api.rb +78 -0
- data/lib/ultracart_api/models/customer_activity.rb +40 -4
- data/lib/ultracart_api/models/customer_merge_request.rb +230 -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: bbe44d03ad11dc64657aa8f18822639cebf0c01d6db7f964a139878a58ebf2cf
|
4
|
+
data.tar.gz: c905a454f5b9e395920e921c9c2bcc5b268609e0201dad657d8ca583bc64e42f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f0087f2ec57a2c12e808c923dde41d84f8573fb27a538aa6f458ccc68d1dac3eda48b330cd1c5dfe84f9dc02f71f612d724b52ec93e92d2db5d1871fd1f9284
|
7
|
+
data.tar.gz: 0c81fd7bea7afcbaf3fa4a1de2b811cc127f59064bc5115bd984d183506cf1582ddbb26465cb2ff6f8c4786b183e560aa5b5c656e513c0a31948daa4732ad3fc
|
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.34.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.34.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.34.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.34.rc'
|
37
37
|
|
38
38
|
### Install from Git
|
39
39
|
|
@@ -163,6 +163,7 @@ Class | Method | HTTP request | Description
|
|
163
163
|
*UltracartClient::CustomerApi* | [**get_customers_for_data_tables**](docs/CustomerApi.md#get_customers_for_data_tables) | **POST** /customer/customers/dataTables | Retrieve customers for DataTables plugin
|
164
164
|
*UltracartClient::CustomerApi* | [**get_email_verification_token**](docs/CustomerApi.md#get_email_verification_token) | **POST** /customer/customers/email_verify/get_token | Create a token that can be used to verify a customer email address
|
165
165
|
*UltracartClient::CustomerApi* | [**insert_customer**](docs/CustomerApi.md#insert_customer) | **POST** /customer/customers | Insert a customer
|
166
|
+
*UltracartClient::CustomerApi* | [**merge_customer**](docs/CustomerApi.md#merge_customer) | **PUT** /customer/customers/{customer_profile_oid}/merge | Merge customer into this customer
|
166
167
|
*UltracartClient::CustomerApi* | [**search_customer_profile_values**](docs/CustomerApi.md#search_customer_profile_values) | **POST** /customer/search | Searches for all matching values (using POST)
|
167
168
|
*UltracartClient::CustomerApi* | [**update_customer**](docs/CustomerApi.md#update_customer) | **PUT** /customer/customers/{customer_profile_oid} | Update a customer
|
168
169
|
*UltracartClient::CustomerApi* | [**update_customer_email_lists**](docs/CustomerApi.md#update_customer_email_lists) | **POST** /customer/customers/{customer_profile_oid}/email_lists | Update email list subscriptions for a customer
|
@@ -630,6 +631,7 @@ Class | Method | HTTP request | Description
|
|
630
631
|
- [UltracartClient::CustomerLoyalty](docs/CustomerLoyalty.md)
|
631
632
|
- [UltracartClient::CustomerLoyaltyLedger](docs/CustomerLoyaltyLedger.md)
|
632
633
|
- [UltracartClient::CustomerLoyaltyRedemption](docs/CustomerLoyaltyRedemption.md)
|
634
|
+
- [UltracartClient::CustomerMergeRequest](docs/CustomerMergeRequest.md)
|
633
635
|
- [UltracartClient::CustomerOrdersSummary](docs/CustomerOrdersSummary.md)
|
634
636
|
- [UltracartClient::CustomerPricingTier](docs/CustomerPricingTier.md)
|
635
637
|
- [UltracartClient::CustomerPrivacy](docs/CustomerPrivacy.md)
|
@@ -1140,6 +1142,7 @@ Not every change is committed to every SDK.
|
|
1140
1142
|
|
1141
1143
|
| Version | Date | Comments |
|
1142
1144
|
| --: | :-: | --- |
|
1145
|
+
| 4.0.34-RC | 07/11/2022 | Customer API - mergeCustomer method |
|
1143
1146
|
| 4.0.33-RC | 07/05/2022 | docs update |
|
1144
1147
|
| 4.0.32-RC | 06/24/2022 | removed unneeded consumes declarations on several api calls (yaml fix) |
|
1145
1148
|
| 4.0.31-RC | 06/24/2022 | removed unneeded consumes declarations on several api calls (yaml fix) |
|
data/docs/CustomerActivity.md
CHANGED
@@ -5,9 +5,13 @@
|
|
5
5
|
| Name | Type | Description | Notes |
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
7
7
|
| **activities** | [**Array<Activity>**](Activity.md) | | [optional] |
|
8
|
+
| **global_unsubscribed** | **Boolean** | | [optional] |
|
9
|
+
| **global_unsubscribed_dts** | **String** | | [optional] |
|
8
10
|
| **memberships** | [**Array<ListSegmentMembership>**](ListSegmentMembership.md) | | [optional] |
|
9
11
|
| **metrics** | [**Array<Metric>**](Metric.md) | | [optional] |
|
10
12
|
| **properties_list** | [**Array<Property>**](Property.md) | | [optional] |
|
13
|
+
| **spam_complaint** | **Boolean** | | [optional] |
|
14
|
+
| **spam_complaint_dts** | **String** | | [optional] |
|
11
15
|
|
12
16
|
## Example
|
13
17
|
|
@@ -16,9 +20,13 @@ require 'ultracart_api'
|
|
16
20
|
|
17
21
|
instance = UltracartClient::CustomerActivity.new(
|
18
22
|
activities: null,
|
23
|
+
global_unsubscribed: null,
|
24
|
+
global_unsubscribed_dts: null,
|
19
25
|
memberships: null,
|
20
26
|
metrics: null,
|
21
|
-
properties_list: null
|
27
|
+
properties_list: null,
|
28
|
+
spam_complaint: null,
|
29
|
+
spam_complaint_dts: null
|
22
30
|
)
|
23
31
|
```
|
24
32
|
|
data/docs/CustomerApi.md
CHANGED
@@ -17,6 +17,7 @@ All URIs are relative to *https://secure.ultracart.com/rest/v2*
|
|
17
17
|
| [**get_customers_for_data_tables**](CustomerApi.md#get_customers_for_data_tables) | **POST** /customer/customers/dataTables | Retrieve customers for DataTables plugin |
|
18
18
|
| [**get_email_verification_token**](CustomerApi.md#get_email_verification_token) | **POST** /customer/customers/email_verify/get_token | Create a token that can be used to verify a customer email address |
|
19
19
|
| [**insert_customer**](CustomerApi.md#insert_customer) | **POST** /customer/customers | Insert a customer |
|
20
|
+
| [**merge_customer**](CustomerApi.md#merge_customer) | **PUT** /customer/customers/{customer_profile_oid}/merge | Merge customer into this customer |
|
20
21
|
| [**search_customer_profile_values**](CustomerApi.md#search_customer_profile_values) | **POST** /customer/search | Searches for all matching values (using POST) |
|
21
22
|
| [**update_customer**](CustomerApi.md#update_customer) | **PUT** /customer/customers/{customer_profile_oid} | Update a customer |
|
22
23
|
| [**update_customer_email_lists**](CustomerApi.md#update_customer_email_lists) | **POST** /customer/customers/{customer_profile_oid}/email_lists | Update email list subscriptions for a customer |
|
@@ -1033,6 +1034,82 @@ end
|
|
1033
1034
|
- **Accept**: application/json
|
1034
1035
|
|
1035
1036
|
|
1037
|
+
## merge_customer
|
1038
|
+
|
1039
|
+
> merge_customer(customer_profile_oid, customer, opts)
|
1040
|
+
|
1041
|
+
Merge customer into this customer
|
1042
|
+
|
1043
|
+
Merge customer into this customer.
|
1044
|
+
|
1045
|
+
### Examples
|
1046
|
+
|
1047
|
+
```ruby
|
1048
|
+
require 'time'
|
1049
|
+
require 'ultracart_api'
|
1050
|
+
require 'json'
|
1051
|
+
require 'yaml'
|
1052
|
+
require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
|
1053
|
+
|
1054
|
+
# This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
|
1055
|
+
# As such, this might not be the best way to use this object.
|
1056
|
+
# Please see https://github.com/UltraCart/sdk_samples for working examples.
|
1057
|
+
|
1058
|
+
api = UltracartClient::CustomerApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
|
1059
|
+
customer_profile_oid = 56 # Integer | The customer_profile_oid to update.
|
1060
|
+
customer = UltracartClient::CustomerMergeRequest.new # CustomerMergeRequest | Customer to merge into this profile.
|
1061
|
+
opts = {
|
1062
|
+
_expand: '_expand_example' # String | The object expansion to perform on the result. See documentation for examples
|
1063
|
+
}
|
1064
|
+
|
1065
|
+
begin
|
1066
|
+
# Merge customer into this customer
|
1067
|
+
api_instance.merge_customer(customer_profile_oid, customer, opts)
|
1068
|
+
rescue UltracartClient::ApiError => e
|
1069
|
+
puts "Error when calling CustomerApi->merge_customer: #{e}"
|
1070
|
+
end
|
1071
|
+
```
|
1072
|
+
|
1073
|
+
#### Using the merge_customer_with_http_info variant
|
1074
|
+
|
1075
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
1076
|
+
|
1077
|
+
> <Array(nil, Integer, Hash)> merge_customer_with_http_info(customer_profile_oid, customer, opts)
|
1078
|
+
|
1079
|
+
```ruby
|
1080
|
+
begin
|
1081
|
+
# Merge customer into this customer
|
1082
|
+
data, status_code, headers = api_instance.merge_customer_with_http_info(customer_profile_oid, customer, opts)
|
1083
|
+
p status_code # => 2xx
|
1084
|
+
p headers # => { ... }
|
1085
|
+
p data # => nil
|
1086
|
+
rescue UltracartClient::ApiError => e
|
1087
|
+
puts "Error when calling CustomerApi->merge_customer_with_http_info: #{e}"
|
1088
|
+
end
|
1089
|
+
```
|
1090
|
+
|
1091
|
+
### Parameters
|
1092
|
+
|
1093
|
+
| Name | Type | Description | Notes |
|
1094
|
+
| ---- | ---- | ----------- | ----- |
|
1095
|
+
| **customer_profile_oid** | **Integer** | The customer_profile_oid to update. | |
|
1096
|
+
| **customer** | [**CustomerMergeRequest**](CustomerMergeRequest.md) | Customer to merge into this profile. | |
|
1097
|
+
| **_expand** | **String** | The object expansion to perform on the result. See documentation for examples | [optional] |
|
1098
|
+
|
1099
|
+
### Return type
|
1100
|
+
|
1101
|
+
nil (empty response body)
|
1102
|
+
|
1103
|
+
### Authorization
|
1104
|
+
|
1105
|
+
[ultraCartOauth](../README.md#ultraCartOauth), [ultraCartSimpleApiKey](../README.md#ultraCartSimpleApiKey)
|
1106
|
+
|
1107
|
+
### HTTP request headers
|
1108
|
+
|
1109
|
+
- **Content-Type**: application/json; charset=UTF-8
|
1110
|
+
- **Accept**: application/json
|
1111
|
+
|
1112
|
+
|
1036
1113
|
## search_customer_profile_values
|
1037
1114
|
|
1038
1115
|
> <LookupResponse> search_customer_profile_values(lookup_request)
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# UltracartClient::CustomerMergeRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **customer_profile_oid** | **Integer** | Customer profile oid to merge | [optional] |
|
8
|
+
| **email** | **String** | Email of the customer profile to merge | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'ultracart_api'
|
14
|
+
|
15
|
+
instance = UltracartClient::CustomerMergeRequest.new(
|
16
|
+
customer_profile_oid: null,
|
17
|
+
email: null
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
@@ -1000,6 +1000,84 @@ module UltracartClient
|
|
1000
1000
|
return data, status_code, headers
|
1001
1001
|
end
|
1002
1002
|
|
1003
|
+
# Merge customer into this customer
|
1004
|
+
# Merge customer into this customer.
|
1005
|
+
# @param customer_profile_oid [Integer] The customer_profile_oid to update.
|
1006
|
+
# @param customer [CustomerMergeRequest] Customer to merge into this profile.
|
1007
|
+
# @param [Hash] opts the optional parameters
|
1008
|
+
# @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
|
1009
|
+
# @return [nil]
|
1010
|
+
def merge_customer(customer_profile_oid, customer, opts = {})
|
1011
|
+
merge_customer_with_http_info(customer_profile_oid, customer, opts)
|
1012
|
+
nil
|
1013
|
+
end
|
1014
|
+
|
1015
|
+
# Merge customer into this customer
|
1016
|
+
# Merge customer into this customer.
|
1017
|
+
# @param customer_profile_oid [Integer] The customer_profile_oid to update.
|
1018
|
+
# @param customer [CustomerMergeRequest] Customer to merge into this profile.
|
1019
|
+
# @param [Hash] opts the optional parameters
|
1020
|
+
# @option opts [String] :_expand The object expansion to perform on the result. See documentation for examples
|
1021
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
1022
|
+
def merge_customer_with_http_info(customer_profile_oid, customer, opts = {})
|
1023
|
+
if @api_client.config.debugging
|
1024
|
+
@api_client.config.logger.debug 'Calling API: CustomerApi.merge_customer ...'
|
1025
|
+
end
|
1026
|
+
# verify the required parameter 'customer_profile_oid' is set
|
1027
|
+
if @api_client.config.client_side_validation && customer_profile_oid.nil?
|
1028
|
+
fail ArgumentError, "Missing the required parameter 'customer_profile_oid' when calling CustomerApi.merge_customer"
|
1029
|
+
end
|
1030
|
+
# verify the required parameter 'customer' is set
|
1031
|
+
if @api_client.config.client_side_validation && customer.nil?
|
1032
|
+
fail ArgumentError, "Missing the required parameter 'customer' when calling CustomerApi.merge_customer"
|
1033
|
+
end
|
1034
|
+
# resource path
|
1035
|
+
local_var_path = '/customer/customers/{customer_profile_oid}/merge'.sub('{' + 'customer_profile_oid' + '}', CGI.escape(customer_profile_oid.to_s))
|
1036
|
+
|
1037
|
+
# query parameters
|
1038
|
+
query_params = opts[:query_params] || {}
|
1039
|
+
query_params[:'_expand'] = opts[:'_expand'] if !opts[:'_expand'].nil?
|
1040
|
+
|
1041
|
+
# header parameters
|
1042
|
+
header_params = opts[:header_params] || {}
|
1043
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
1044
|
+
# HTTP header 'Accept' (if needed)
|
1045
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1046
|
+
# HTTP header 'Content-Type'
|
1047
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
1048
|
+
if !content_type.nil?
|
1049
|
+
header_params['Content-Type'] = content_type
|
1050
|
+
end
|
1051
|
+
|
1052
|
+
# form parameters
|
1053
|
+
form_params = opts[:form_params] || {}
|
1054
|
+
|
1055
|
+
# http body (model)
|
1056
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(customer)
|
1057
|
+
|
1058
|
+
# return_type
|
1059
|
+
return_type = opts[:debug_return_type]
|
1060
|
+
|
1061
|
+
# auth_names
|
1062
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
1063
|
+
|
1064
|
+
new_options = opts.merge(
|
1065
|
+
:operation => :"CustomerApi.merge_customer",
|
1066
|
+
:header_params => header_params,
|
1067
|
+
:query_params => query_params,
|
1068
|
+
:form_params => form_params,
|
1069
|
+
:body => post_body,
|
1070
|
+
:auth_names => auth_names,
|
1071
|
+
:return_type => return_type
|
1072
|
+
)
|
1073
|
+
|
1074
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1075
|
+
if @api_client.config.debugging
|
1076
|
+
@api_client.config.logger.debug "API called: CustomerApi#merge_customer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1077
|
+
end
|
1078
|
+
return data, status_code, headers
|
1079
|
+
end
|
1080
|
+
|
1003
1081
|
# Searches for all matching values (using POST)
|
1004
1082
|
# @param lookup_request [LookupRequest] LookupRequest
|
1005
1083
|
# @param [Hash] opts the optional parameters
|
@@ -17,19 +17,31 @@ module UltracartClient
|
|
17
17
|
class CustomerActivity
|
18
18
|
attr_accessor :activities
|
19
19
|
|
20
|
+
attr_accessor :global_unsubscribed
|
21
|
+
|
22
|
+
attr_accessor :global_unsubscribed_dts
|
23
|
+
|
20
24
|
attr_accessor :memberships
|
21
25
|
|
22
26
|
attr_accessor :metrics
|
23
27
|
|
24
28
|
attr_accessor :properties_list
|
25
29
|
|
30
|
+
attr_accessor :spam_complaint
|
31
|
+
|
32
|
+
attr_accessor :spam_complaint_dts
|
33
|
+
|
26
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
27
35
|
def self.attribute_map
|
28
36
|
{
|
29
37
|
:'activities' => :'activities',
|
38
|
+
:'global_unsubscribed' => :'global_unsubscribed',
|
39
|
+
:'global_unsubscribed_dts' => :'global_unsubscribed_dts',
|
30
40
|
:'memberships' => :'memberships',
|
31
41
|
:'metrics' => :'metrics',
|
32
|
-
:'properties_list' => :'properties_list'
|
42
|
+
:'properties_list' => :'properties_list',
|
43
|
+
:'spam_complaint' => :'spam_complaint',
|
44
|
+
:'spam_complaint_dts' => :'spam_complaint_dts'
|
33
45
|
}
|
34
46
|
end
|
35
47
|
|
@@ -42,9 +54,13 @@ module UltracartClient
|
|
42
54
|
def self.openapi_types
|
43
55
|
{
|
44
56
|
:'activities' => :'Array<Activity>',
|
57
|
+
:'global_unsubscribed' => :'Boolean',
|
58
|
+
:'global_unsubscribed_dts' => :'String',
|
45
59
|
:'memberships' => :'Array<ListSegmentMembership>',
|
46
60
|
:'metrics' => :'Array<Metric>',
|
47
|
-
:'properties_list' => :'Array<Property>'
|
61
|
+
:'properties_list' => :'Array<Property>',
|
62
|
+
:'spam_complaint' => :'Boolean',
|
63
|
+
:'spam_complaint_dts' => :'String'
|
48
64
|
}
|
49
65
|
end
|
50
66
|
|
@@ -75,6 +91,14 @@ module UltracartClient
|
|
75
91
|
end
|
76
92
|
end
|
77
93
|
|
94
|
+
if attributes.key?(:'global_unsubscribed')
|
95
|
+
self.global_unsubscribed = attributes[:'global_unsubscribed']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.key?(:'global_unsubscribed_dts')
|
99
|
+
self.global_unsubscribed_dts = attributes[:'global_unsubscribed_dts']
|
100
|
+
end
|
101
|
+
|
78
102
|
if attributes.key?(:'memberships')
|
79
103
|
if (value = attributes[:'memberships']).is_a?(Array)
|
80
104
|
self.memberships = value
|
@@ -92,6 +116,14 @@ module UltracartClient
|
|
92
116
|
self.properties_list = value
|
93
117
|
end
|
94
118
|
end
|
119
|
+
|
120
|
+
if attributes.key?(:'spam_complaint')
|
121
|
+
self.spam_complaint = attributes[:'spam_complaint']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.key?(:'spam_complaint_dts')
|
125
|
+
self.spam_complaint_dts = attributes[:'spam_complaint_dts']
|
126
|
+
end
|
95
127
|
end
|
96
128
|
|
97
129
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -113,9 +145,13 @@ module UltracartClient
|
|
113
145
|
return true if self.equal?(o)
|
114
146
|
self.class == o.class &&
|
115
147
|
activities == o.activities &&
|
148
|
+
global_unsubscribed == o.global_unsubscribed &&
|
149
|
+
global_unsubscribed_dts == o.global_unsubscribed_dts &&
|
116
150
|
memberships == o.memberships &&
|
117
151
|
metrics == o.metrics &&
|
118
|
-
properties_list == o.properties_list
|
152
|
+
properties_list == o.properties_list &&
|
153
|
+
spam_complaint == o.spam_complaint &&
|
154
|
+
spam_complaint_dts == o.spam_complaint_dts
|
119
155
|
end
|
120
156
|
|
121
157
|
# @see the `==` method
|
@@ -127,7 +163,7 @@ module UltracartClient
|
|
127
163
|
# Calculates hash code according to all attributes.
|
128
164
|
# @return [Integer] Hash code
|
129
165
|
def hash
|
130
|
-
[activities, memberships, metrics, properties_list].hash
|
166
|
+
[activities, global_unsubscribed, global_unsubscribed_dts, memberships, metrics, properties_list, spam_complaint, spam_complaint_dts].hash
|
131
167
|
end
|
132
168
|
|
133
169
|
# Builds the object from hash
|
@@ -0,0 +1,230 @@
|
|
1
|
+
=begin
|
2
|
+
#UltraCart Rest API V2
|
3
|
+
|
4
|
+
#UltraCart REST API Version 2
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
|
+
Contact: support@ultracart.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.0.1-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module UltracartClient
|
17
|
+
class CustomerMergeRequest
|
18
|
+
# Customer profile oid to merge
|
19
|
+
attr_accessor :customer_profile_oid
|
20
|
+
|
21
|
+
# Email of the customer profile to merge
|
22
|
+
attr_accessor :email
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'customer_profile_oid' => :'customer_profile_oid',
|
28
|
+
:'email' => :'email'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Returns all the JSON keys this model knows about
|
33
|
+
def self.acceptable_attributes
|
34
|
+
attribute_map.values
|
35
|
+
end
|
36
|
+
|
37
|
+
# Attribute type mapping.
|
38
|
+
def self.openapi_types
|
39
|
+
{
|
40
|
+
:'customer_profile_oid' => :'Integer',
|
41
|
+
:'email' => :'String'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# List of attributes with nullable: true
|
46
|
+
def self.openapi_nullable
|
47
|
+
Set.new([
|
48
|
+
])
|
49
|
+
end
|
50
|
+
|
51
|
+
# Initializes the object
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
+
def initialize(attributes = {})
|
54
|
+
if (!attributes.is_a?(Hash))
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::CustomerMergeRequest` initialize method"
|
56
|
+
end
|
57
|
+
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
60
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::CustomerMergeRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
62
|
+
end
|
63
|
+
h[k.to_sym] = v
|
64
|
+
}
|
65
|
+
|
66
|
+
if attributes.key?(:'customer_profile_oid')
|
67
|
+
self.customer_profile_oid = attributes[:'customer_profile_oid']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.key?(:'email')
|
71
|
+
self.email = attributes[:'email']
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
76
|
+
# @return Array for valid properties with the reasons
|
77
|
+
def list_invalid_properties
|
78
|
+
invalid_properties = Array.new
|
79
|
+
invalid_properties
|
80
|
+
end
|
81
|
+
|
82
|
+
# Check to see if the all the properties in the model are valid
|
83
|
+
# @return true if the model is valid
|
84
|
+
def valid?
|
85
|
+
true
|
86
|
+
end
|
87
|
+
|
88
|
+
# Checks equality by comparing each attribute.
|
89
|
+
# @param [Object] Object to be compared
|
90
|
+
def ==(o)
|
91
|
+
return true if self.equal?(o)
|
92
|
+
self.class == o.class &&
|
93
|
+
customer_profile_oid == o.customer_profile_oid &&
|
94
|
+
email == o.email
|
95
|
+
end
|
96
|
+
|
97
|
+
# @see the `==` method
|
98
|
+
# @param [Object] Object to be compared
|
99
|
+
def eql?(o)
|
100
|
+
self == o
|
101
|
+
end
|
102
|
+
|
103
|
+
# Calculates hash code according to all attributes.
|
104
|
+
# @return [Integer] Hash code
|
105
|
+
def hash
|
106
|
+
[customer_profile_oid, email].hash
|
107
|
+
end
|
108
|
+
|
109
|
+
# Builds the object from hash
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
111
|
+
# @return [Object] Returns the model itself
|
112
|
+
def self.build_from_hash(attributes)
|
113
|
+
new.build_from_hash(attributes)
|
114
|
+
end
|
115
|
+
|
116
|
+
# Builds the object from hash
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
118
|
+
# @return [Object] Returns the model itself
|
119
|
+
def build_from_hash(attributes)
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
121
|
+
attributes = attributes.transform_keys(&:to_sym)
|
122
|
+
self.class.openapi_types.each_pair do |key, type|
|
123
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
124
|
+
self.send("#{key}=", nil)
|
125
|
+
elsif type =~ /\AArray<(.*)>/i
|
126
|
+
# check to ensure the input is an array given that the attribute
|
127
|
+
# is documented as an array but the input is not
|
128
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
129
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
130
|
+
end
|
131
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
132
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
133
|
+
end
|
134
|
+
end
|
135
|
+
|
136
|
+
self
|
137
|
+
end
|
138
|
+
|
139
|
+
# Deserializes the data based on type
|
140
|
+
# @param string type Data type
|
141
|
+
# @param string value Value to be deserialized
|
142
|
+
# @return [Object] Deserialized data
|
143
|
+
def _deserialize(type, value)
|
144
|
+
case type.to_sym
|
145
|
+
when :Time
|
146
|
+
Time.parse(value)
|
147
|
+
when :Date
|
148
|
+
Date.parse(value)
|
149
|
+
when :String
|
150
|
+
value.to_s
|
151
|
+
when :Integer
|
152
|
+
value.to_i
|
153
|
+
when :Float
|
154
|
+
value.to_f
|
155
|
+
when :Boolean
|
156
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
157
|
+
true
|
158
|
+
else
|
159
|
+
false
|
160
|
+
end
|
161
|
+
when :Object
|
162
|
+
# generic object (usually a Hash), return directly
|
163
|
+
value
|
164
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
165
|
+
inner_type = Regexp.last_match[:inner_type]
|
166
|
+
value.map { |v| _deserialize(inner_type, v) }
|
167
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
168
|
+
k_type = Regexp.last_match[:k_type]
|
169
|
+
v_type = Regexp.last_match[:v_type]
|
170
|
+
{}.tap do |hash|
|
171
|
+
value.each do |k, v|
|
172
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
173
|
+
end
|
174
|
+
end
|
175
|
+
else # model
|
176
|
+
# models (e.g. Pet) or oneOf
|
177
|
+
klass = UltracartClient.const_get(type)
|
178
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
# Returns the string representation of the object
|
183
|
+
# @return [String] String presentation of the object
|
184
|
+
def to_s
|
185
|
+
to_hash.to_s
|
186
|
+
end
|
187
|
+
|
188
|
+
# to_body is an alias to to_hash (backward compatibility)
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
190
|
+
def to_body
|
191
|
+
to_hash
|
192
|
+
end
|
193
|
+
|
194
|
+
# Returns the object in the form of hash
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
196
|
+
def to_hash
|
197
|
+
hash = {}
|
198
|
+
self.class.attribute_map.each_pair do |attr, param|
|
199
|
+
value = self.send(attr)
|
200
|
+
if value.nil?
|
201
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
202
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
203
|
+
end
|
204
|
+
|
205
|
+
hash[param] = _to_hash(value)
|
206
|
+
end
|
207
|
+
hash
|
208
|
+
end
|
209
|
+
|
210
|
+
# Outputs non-array value in the form of hash
|
211
|
+
# For object, use to_hash. Otherwise, just return the value
|
212
|
+
# @param [Object] value Any valid value
|
213
|
+
# @return [Hash] Returns the value in the form of hash
|
214
|
+
def _to_hash(value)
|
215
|
+
if value.is_a?(Array)
|
216
|
+
value.compact.map { |v| _to_hash(v) }
|
217
|
+
elsif value.is_a?(Hash)
|
218
|
+
{}.tap do |hash|
|
219
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
220
|
+
end
|
221
|
+
elsif value.respond_to? :to_hash
|
222
|
+
value.to_hash
|
223
|
+
else
|
224
|
+
value
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
end
|
229
|
+
|
230
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
@@ -210,6 +210,7 @@ require 'ultracart_api/models/customer_email_list_changes'
|
|
210
210
|
require 'ultracart_api/models/customer_loyalty'
|
211
211
|
require 'ultracart_api/models/customer_loyalty_ledger'
|
212
212
|
require 'ultracart_api/models/customer_loyalty_redemption'
|
213
|
+
require 'ultracart_api/models/customer_merge_request'
|
213
214
|
require 'ultracart_api/models/customer_orders_summary'
|
214
215
|
require 'ultracart_api/models/customer_pricing_tier'
|
215
216
|
require 'ultracart_api/models/customer_privacy'
|
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.34.rc
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -261,6 +261,7 @@ files:
|
|
261
261
|
- docs/CustomerLoyalty.md
|
262
262
|
- docs/CustomerLoyaltyLedger.md
|
263
263
|
- docs/CustomerLoyaltyRedemption.md
|
264
|
+
- docs/CustomerMergeRequest.md
|
264
265
|
- docs/CustomerOrdersSummary.md
|
265
266
|
- docs/CustomerPricingTier.md
|
266
267
|
- docs/CustomerPrivacy.md
|
@@ -927,6 +928,7 @@ files:
|
|
927
928
|
- lib/ultracart_api/models/customer_loyalty.rb
|
928
929
|
- lib/ultracart_api/models/customer_loyalty_ledger.rb
|
929
930
|
- lib/ultracart_api/models/customer_loyalty_redemption.rb
|
931
|
+
- lib/ultracart_api/models/customer_merge_request.rb
|
930
932
|
- lib/ultracart_api/models/customer_orders_summary.rb
|
931
933
|
- lib/ultracart_api/models/customer_pricing_tier.rb
|
932
934
|
- lib/ultracart_api/models/customer_privacy.rb
|