ultracart_api 3.10.81 → 3.10.83
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +9 -4
- data/docs/ConversationAutocompleteResponse.md +1 -1
- data/docs/ConversationAutocompleteValue.md +9 -0
- data/docs/ConversationEngagement.md +1 -1
- data/docs/ConversationEngagementEquation.md +1 -0
- data/docs/ConversationEngagementEquationFunction.md +21 -0
- data/docs/ConversationEngagementEquationGroup.md +8 -0
- data/docs/ConversationSearchRequest.md +2 -0
- data/lib/ultracart_api/models/conversation_autocomplete_response.rb +1 -1
- data/lib/ultracart_api/models/conversation_autocomplete_value.rb +193 -0
- data/lib/ultracart_api/models/conversation_engagement.rb +35 -0
- data/lib/ultracart_api/models/conversation_engagement_equation.rb +13 -2
- data/lib/ultracart_api/models/conversation_engagement_equation_function.rb +414 -0
- data/lib/ultracart_api/models/conversation_engagement_equation_group.rb +186 -0
- data/lib/ultracart_api/models/conversation_search_request.rb +21 -1
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +3 -0
- metadata +8 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3f9861b7b08df849bc2db24b1a7b4810fd9ddad3b674f5b0b7eb4c39c26c4b05
|
|
4
|
+
data.tar.gz: d52f5231010245d2d78d84fa72460ced53f05834bd89d97088d754b21165a192
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f3c835a52ff5e056143d6e756e60d059672135e0085df3c73210601bb9439449ef7a6d5ab3955f515d2591801af5398cb4ba4db4be43205f704dd0ab1a567632
|
|
7
|
+
data.tar.gz: 0263f337c65ce160ae4a29aafaa7505c3c486f3a50cf509aeb9d1dcb5f91a0d1ff5f407f518ec32f2421c9d922ad51d8260067cfc84fd4318db61e2a8fd08351
|
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.10.
|
|
10
|
+
- Package version: 3.10.83
|
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
|
12
12
|
For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
|
|
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.10.
|
|
27
|
+
gem install ./ultracart_api-3.10.83.gem
|
|
28
28
|
```
|
|
29
|
-
(for development, run `gem install --dev ./ultracart_api-3.10.
|
|
29
|
+
(for development, run `gem install --dev ./ultracart_api-3.10.83.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.10.
|
|
35
|
+
gem 'ultracart_api', '~> 3.10.83'
|
|
36
36
|
|
|
37
37
|
### Install from Git
|
|
38
38
|
|
|
@@ -599,6 +599,7 @@ Class | Method | HTTP request | Description
|
|
|
599
599
|
- [UltracartClient::ConversationAgentAuthResponse](docs/ConversationAgentAuthResponse.md)
|
|
600
600
|
- [UltracartClient::ConversationAutocompleteRequest](docs/ConversationAutocompleteRequest.md)
|
|
601
601
|
- [UltracartClient::ConversationAutocompleteResponse](docs/ConversationAutocompleteResponse.md)
|
|
602
|
+
- [UltracartClient::ConversationAutocompleteValue](docs/ConversationAutocompleteValue.md)
|
|
602
603
|
- [UltracartClient::ConversationCannedMessage](docs/ConversationCannedMessage.md)
|
|
603
604
|
- [UltracartClient::ConversationCannedMessageResponse](docs/ConversationCannedMessageResponse.md)
|
|
604
605
|
- [UltracartClient::ConversationCannedMessagesResponse](docs/ConversationCannedMessagesResponse.md)
|
|
@@ -609,6 +610,8 @@ Class | Method | HTTP request | Description
|
|
|
609
610
|
- [UltracartClient::ConversationDepartmentsResponse](docs/ConversationDepartmentsResponse.md)
|
|
610
611
|
- [UltracartClient::ConversationEngagement](docs/ConversationEngagement.md)
|
|
611
612
|
- [UltracartClient::ConversationEngagementEquation](docs/ConversationEngagementEquation.md)
|
|
613
|
+
- [UltracartClient::ConversationEngagementEquationFunction](docs/ConversationEngagementEquationFunction.md)
|
|
614
|
+
- [UltracartClient::ConversationEngagementEquationGroup](docs/ConversationEngagementEquationGroup.md)
|
|
612
615
|
- [UltracartClient::ConversationEngagementResponse](docs/ConversationEngagementResponse.md)
|
|
613
616
|
- [UltracartClient::ConversationEngagementsResponse](docs/ConversationEngagementsResponse.md)
|
|
614
617
|
- [UltracartClient::ConversationEventAddCoupon](docs/ConversationEventAddCoupon.md)
|
|
@@ -1257,6 +1260,8 @@ Not every change is committed to every SDK.
|
|
|
1257
1260
|
|
|
1258
1261
|
| Version | Date | Comments |
|
|
1259
1262
|
| --: | :-: | --- |
|
|
1263
|
+
| 3.10.83 | 12/20/2022 | conversation engagement update |
|
|
1264
|
+
| 3.10.82 | 12/15/2022 | conversation search - added start date filtering |
|
|
1260
1265
|
| 3.10.81 | 12/15/2022 | conversation searching |
|
|
1261
1266
|
| 3.10.80 | 12/13/2022 | conversations - add email and sms_phone to participant object |
|
|
1262
1267
|
| 3.10.79 | 12/09/2022 | conversations - message translation |
|
|
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
|
|
|
6
6
|
**error** | [**Error**](Error.md) | | [optional]
|
|
7
7
|
**field** | **String** | | [optional]
|
|
8
8
|
**metadata** | [**ResponseMetadata**](ResponseMetadata.md) | | [optional]
|
|
9
|
-
**results** | **Array<
|
|
9
|
+
**results** | [**Array<ConversationAutocompleteValue>**](ConversationAutocompleteValue.md) | | [optional]
|
|
10
10
|
**success** | **BOOLEAN** | Indicates if API call was successful | [optional]
|
|
11
11
|
**term** | **String** | | [optional]
|
|
12
12
|
**warning** | [**Warning**](Warning.md) | | [optional]
|
|
@@ -9,6 +9,6 @@ Name | Type | Description | Notes
|
|
|
9
9
|
**engagement_name** | **String** | | [optional]
|
|
10
10
|
**equation** | [**ConversationEngagementEquation**](ConversationEngagementEquation.md) | | [optional]
|
|
11
11
|
**time_on_page** | **Integer** | | [optional]
|
|
12
|
-
**visitor_type** | **String** |
|
|
12
|
+
**visitor_type** | **String** | The type of visitor | [optional]
|
|
13
13
|
|
|
14
14
|
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# UltracartClient::ConversationEngagementEquationFunction
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**any_page_url_logic** | **String** | Logic operation to perform on an any page url function type | [optional]
|
|
7
|
+
**any_page_url_value** | **String** | | [optional]
|
|
8
|
+
**current_page_url_logic** | **String** | Logic operation to perform on a current page url function type | [optional]
|
|
9
|
+
**current_page_url_value** | **String** | | [optional]
|
|
10
|
+
**customers_browsing_time_logic** | **String** | Logic operation to perform on a customer's browsing time function type | [optional]
|
|
11
|
+
**customers_browsing_time_seconds** | **Integer** | | [optional]
|
|
12
|
+
**customers_location_country** | **String** | | [optional]
|
|
13
|
+
**customers_location_logic** | **String** | Logic operation to perform on a customer's location function type | [optional]
|
|
14
|
+
**customers_location_state** | **String** | | [optional]
|
|
15
|
+
**number_of_viewed_pages_logic** | **String** | Logic operation to perform on a customer's browsing time function type | [optional]
|
|
16
|
+
**number_of_viewed_pages_value** | **Integer** | | [optional]
|
|
17
|
+
**referring_website_logic** | **String** | Logic operation to perform on a referring website function type | [optional]
|
|
18
|
+
**referring_website_value** | **String** | | [optional]
|
|
19
|
+
**type** | **String** | Type of function | [optional]
|
|
20
|
+
|
|
21
|
+
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# UltracartClient::ConversationEngagementEquationGroup
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**functions** | [**Array<ConversationEngagementEquationFunction>**](ConversationEngagementEquationFunction.md) | | [optional]
|
|
7
|
+
|
|
8
|
+
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
## Properties
|
|
4
4
|
Name | Type | Description | Notes
|
|
5
5
|
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**date_end** | **String** | End of the range | [optional]
|
|
7
|
+
**date_start** | **String** | Start of the range | [optional]
|
|
6
8
|
**email_filter** | **String** | | [optional]
|
|
7
9
|
**language_filter** | **String** | | [optional]
|
|
8
10
|
**medium_filter** | **String** | | [optional]
|
|
@@ -48,7 +48,7 @@ module UltracartClient
|
|
|
48
48
|
:'error' => :'Error',
|
|
49
49
|
:'field' => :'String',
|
|
50
50
|
:'metadata' => :'ResponseMetadata',
|
|
51
|
-
:'results' => :'Array<
|
|
51
|
+
:'results' => :'Array<ConversationAutocompleteValue>',
|
|
52
52
|
:'success' => :'BOOLEAN',
|
|
53
53
|
:'term' => :'String',
|
|
54
54
|
:'warning' => :'Warning'
|
|
@@ -0,0 +1,193 @@
|
|
|
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 ConversationAutocompleteValue
|
|
17
|
+
attr_accessor :description
|
|
18
|
+
|
|
19
|
+
attr_accessor :value
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'description' => :'description',
|
|
25
|
+
:'value' => :'value'
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Attribute type mapping.
|
|
30
|
+
def self.swagger_types
|
|
31
|
+
{
|
|
32
|
+
:'description' => :'String',
|
|
33
|
+
:'value' => :'String'
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Initializes the object
|
|
38
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
39
|
+
def initialize(attributes = {})
|
|
40
|
+
return unless attributes.is_a?(Hash)
|
|
41
|
+
|
|
42
|
+
# convert string to symbol for hash key
|
|
43
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
44
|
+
|
|
45
|
+
if attributes.has_key?(:'description')
|
|
46
|
+
self.description = attributes[:'description']
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
if attributes.has_key?(:'value')
|
|
50
|
+
self.value = attributes[:'value']
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
55
|
+
# @return Array for valid properties with the reasons
|
|
56
|
+
def list_invalid_properties
|
|
57
|
+
invalid_properties = Array.new
|
|
58
|
+
invalid_properties
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Check to see if the all the properties in the model are valid
|
|
62
|
+
# @return true if the model is valid
|
|
63
|
+
def valid?
|
|
64
|
+
true
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Checks equality by comparing each attribute.
|
|
68
|
+
# @param [Object] Object to be compared
|
|
69
|
+
def ==(o)
|
|
70
|
+
return true if self.equal?(o)
|
|
71
|
+
self.class == o.class &&
|
|
72
|
+
description == o.description &&
|
|
73
|
+
value == o.value
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# @see the `==` method
|
|
77
|
+
# @param [Object] Object to be compared
|
|
78
|
+
def eql?(o)
|
|
79
|
+
self == o
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Calculates hash code according to all attributes.
|
|
83
|
+
# @return [Fixnum] Hash code
|
|
84
|
+
def hash
|
|
85
|
+
[description, value].hash
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Builds the object from hash
|
|
89
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
90
|
+
# @return [Object] Returns the model itself
|
|
91
|
+
def build_from_hash(attributes)
|
|
92
|
+
return nil unless attributes.is_a?(Hash)
|
|
93
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
94
|
+
if type =~ /\AArray<(.*)>/i
|
|
95
|
+
# check to ensure the input is an array given that the attribute
|
|
96
|
+
# is documented as an array but the input is not
|
|
97
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
98
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
99
|
+
end
|
|
100
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
101
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
102
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
self
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Deserializes the data based on type
|
|
109
|
+
# @param string type Data type
|
|
110
|
+
# @param string value Value to be deserialized
|
|
111
|
+
# @return [Object] Deserialized data
|
|
112
|
+
def _deserialize(type, value)
|
|
113
|
+
case type.to_sym
|
|
114
|
+
when :DateTime
|
|
115
|
+
DateTime.parse(value)
|
|
116
|
+
when :Date
|
|
117
|
+
Date.parse(value)
|
|
118
|
+
when :String
|
|
119
|
+
value.to_s
|
|
120
|
+
when :Integer
|
|
121
|
+
value.to_i
|
|
122
|
+
when :Float
|
|
123
|
+
value.to_f
|
|
124
|
+
when :BOOLEAN
|
|
125
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
126
|
+
true
|
|
127
|
+
else
|
|
128
|
+
false
|
|
129
|
+
end
|
|
130
|
+
when :Object
|
|
131
|
+
# generic object (usually a Hash), return directly
|
|
132
|
+
value
|
|
133
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
134
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
135
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
136
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
137
|
+
k_type = Regexp.last_match[:k_type]
|
|
138
|
+
v_type = Regexp.last_match[:v_type]
|
|
139
|
+
{}.tap do |hash|
|
|
140
|
+
value.each do |k, v|
|
|
141
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
142
|
+
end
|
|
143
|
+
end
|
|
144
|
+
else # model
|
|
145
|
+
temp_model = UltracartClient.const_get(type).new
|
|
146
|
+
temp_model.build_from_hash(value)
|
|
147
|
+
end
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
# Returns the string representation of the object
|
|
151
|
+
# @return [String] String presentation of the object
|
|
152
|
+
def to_s
|
|
153
|
+
to_hash.to_s
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
157
|
+
# @return [Hash] Returns the object in the form of hash
|
|
158
|
+
def to_body
|
|
159
|
+
to_hash
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Returns the object in the form of hash
|
|
163
|
+
# @return [Hash] Returns the object in the form of hash
|
|
164
|
+
def to_hash
|
|
165
|
+
hash = {}
|
|
166
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
167
|
+
value = self.send(attr)
|
|
168
|
+
next if value.nil?
|
|
169
|
+
hash[param] = _to_hash(value)
|
|
170
|
+
end
|
|
171
|
+
hash
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Outputs non-array value in the form of hash
|
|
175
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
176
|
+
# @param [Object] value Any valid value
|
|
177
|
+
# @return [Hash] Returns the value in the form of hash
|
|
178
|
+
def _to_hash(value)
|
|
179
|
+
if value.is_a?(Array)
|
|
180
|
+
value.compact.map { |v| _to_hash(v) }
|
|
181
|
+
elsif value.is_a?(Hash)
|
|
182
|
+
{}.tap do |hash|
|
|
183
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
184
|
+
end
|
|
185
|
+
elsif value.respond_to? :to_hash
|
|
186
|
+
value.to_hash
|
|
187
|
+
else
|
|
188
|
+
value
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
end
|
|
193
|
+
end
|
|
@@ -26,8 +26,31 @@ module UltracartClient
|
|
|
26
26
|
|
|
27
27
|
attr_accessor :time_on_page
|
|
28
28
|
|
|
29
|
+
# The type of visitor
|
|
29
30
|
attr_accessor :visitor_type
|
|
30
31
|
|
|
32
|
+
class EnumAttributeValidator
|
|
33
|
+
attr_reader :datatype
|
|
34
|
+
attr_reader :allowable_values
|
|
35
|
+
|
|
36
|
+
def initialize(datatype, allowable_values)
|
|
37
|
+
@allowable_values = allowable_values.map do |value|
|
|
38
|
+
case datatype.to_s
|
|
39
|
+
when /Integer/i
|
|
40
|
+
value.to_i
|
|
41
|
+
when /Float/i
|
|
42
|
+
value.to_f
|
|
43
|
+
else
|
|
44
|
+
value
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def valid?(value)
|
|
50
|
+
!value || allowable_values.include?(value)
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
31
54
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
32
55
|
def self.attribute_map
|
|
33
56
|
{
|
|
@@ -103,9 +126,21 @@ module UltracartClient
|
|
|
103
126
|
# Check to see if the all the properties in the model are valid
|
|
104
127
|
# @return true if the model is valid
|
|
105
128
|
def valid?
|
|
129
|
+
visitor_type_validator = EnumAttributeValidator.new('String', ['all', 'first time', 'returning'])
|
|
130
|
+
return false unless visitor_type_validator.valid?(@visitor_type)
|
|
106
131
|
true
|
|
107
132
|
end
|
|
108
133
|
|
|
134
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
135
|
+
# @param [Object] visitor_type Object to be assigned
|
|
136
|
+
def visitor_type=(visitor_type)
|
|
137
|
+
validator = EnumAttributeValidator.new('String', ['all', 'first time', 'returning'])
|
|
138
|
+
unless validator.valid?(visitor_type)
|
|
139
|
+
fail ArgumentError, 'invalid value for "visitor_type", must be one of #{validator.allowable_values}.'
|
|
140
|
+
end
|
|
141
|
+
@visitor_type = visitor_type
|
|
142
|
+
end
|
|
143
|
+
|
|
109
144
|
# Checks equality by comparing each attribute.
|
|
110
145
|
# @param [Object] Object to be compared
|
|
111
146
|
def ==(o)
|
|
@@ -14,15 +14,19 @@ require 'date'
|
|
|
14
14
|
|
|
15
15
|
module UltracartClient
|
|
16
16
|
class ConversationEngagementEquation
|
|
17
|
+
attr_accessor :groups
|
|
18
|
+
|
|
17
19
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
18
20
|
def self.attribute_map
|
|
19
21
|
{
|
|
22
|
+
:'groups' => :'groups'
|
|
20
23
|
}
|
|
21
24
|
end
|
|
22
25
|
|
|
23
26
|
# Attribute type mapping.
|
|
24
27
|
def self.swagger_types
|
|
25
28
|
{
|
|
29
|
+
:'groups' => :'Array<ConversationEngagementEquationGroup>'
|
|
26
30
|
}
|
|
27
31
|
end
|
|
28
32
|
|
|
@@ -33,6 +37,12 @@ module UltracartClient
|
|
|
33
37
|
|
|
34
38
|
# convert string to symbol for hash key
|
|
35
39
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
40
|
+
|
|
41
|
+
if attributes.has_key?(:'groups')
|
|
42
|
+
if (value = attributes[:'groups']).is_a?(Array)
|
|
43
|
+
self.groups = value
|
|
44
|
+
end
|
|
45
|
+
end
|
|
36
46
|
end
|
|
37
47
|
|
|
38
48
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -52,7 +62,8 @@ module UltracartClient
|
|
|
52
62
|
# @param [Object] Object to be compared
|
|
53
63
|
def ==(o)
|
|
54
64
|
return true if self.equal?(o)
|
|
55
|
-
self.class == o.class
|
|
65
|
+
self.class == o.class &&
|
|
66
|
+
groups == o.groups
|
|
56
67
|
end
|
|
57
68
|
|
|
58
69
|
# @see the `==` method
|
|
@@ -64,7 +75,7 @@ module UltracartClient
|
|
|
64
75
|
# Calculates hash code according to all attributes.
|
|
65
76
|
# @return [Fixnum] Hash code
|
|
66
77
|
def hash
|
|
67
|
-
[].hash
|
|
78
|
+
[groups].hash
|
|
68
79
|
end
|
|
69
80
|
|
|
70
81
|
# Builds the object from hash
|
|
@@ -0,0 +1,414 @@
|
|
|
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 ConversationEngagementEquationFunction
|
|
17
|
+
# Logic operation to perform on an any page url function type
|
|
18
|
+
attr_accessor :any_page_url_logic
|
|
19
|
+
|
|
20
|
+
attr_accessor :any_page_url_value
|
|
21
|
+
|
|
22
|
+
# Logic operation to perform on a current page url function type
|
|
23
|
+
attr_accessor :current_page_url_logic
|
|
24
|
+
|
|
25
|
+
attr_accessor :current_page_url_value
|
|
26
|
+
|
|
27
|
+
# Logic operation to perform on a customer's browsing time function type
|
|
28
|
+
attr_accessor :customers_browsing_time_logic
|
|
29
|
+
|
|
30
|
+
attr_accessor :customers_browsing_time_seconds
|
|
31
|
+
|
|
32
|
+
attr_accessor :customers_location_country
|
|
33
|
+
|
|
34
|
+
# Logic operation to perform on a customer's location function type
|
|
35
|
+
attr_accessor :customers_location_logic
|
|
36
|
+
|
|
37
|
+
attr_accessor :customers_location_state
|
|
38
|
+
|
|
39
|
+
# Logic operation to perform on a customer's browsing time function type
|
|
40
|
+
attr_accessor :number_of_viewed_pages_logic
|
|
41
|
+
|
|
42
|
+
attr_accessor :number_of_viewed_pages_value
|
|
43
|
+
|
|
44
|
+
# Logic operation to perform on a referring website function type
|
|
45
|
+
attr_accessor :referring_website_logic
|
|
46
|
+
|
|
47
|
+
attr_accessor :referring_website_value
|
|
48
|
+
|
|
49
|
+
# Type of function
|
|
50
|
+
attr_accessor :type
|
|
51
|
+
|
|
52
|
+
class EnumAttributeValidator
|
|
53
|
+
attr_reader :datatype
|
|
54
|
+
attr_reader :allowable_values
|
|
55
|
+
|
|
56
|
+
def initialize(datatype, allowable_values)
|
|
57
|
+
@allowable_values = allowable_values.map do |value|
|
|
58
|
+
case datatype.to_s
|
|
59
|
+
when /Integer/i
|
|
60
|
+
value.to_i
|
|
61
|
+
when /Float/i
|
|
62
|
+
value.to_f
|
|
63
|
+
else
|
|
64
|
+
value
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def valid?(value)
|
|
70
|
+
!value || allowable_values.include?(value)
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
75
|
+
def self.attribute_map
|
|
76
|
+
{
|
|
77
|
+
:'any_page_url_logic' => :'any_page_url_logic',
|
|
78
|
+
:'any_page_url_value' => :'any_page_url_value',
|
|
79
|
+
:'current_page_url_logic' => :'current_page_url_logic',
|
|
80
|
+
:'current_page_url_value' => :'current_page_url_value',
|
|
81
|
+
:'customers_browsing_time_logic' => :'customers_browsing_time_logic',
|
|
82
|
+
:'customers_browsing_time_seconds' => :'customers_browsing_time_seconds',
|
|
83
|
+
:'customers_location_country' => :'customers_location_country',
|
|
84
|
+
:'customers_location_logic' => :'customers_location_logic',
|
|
85
|
+
:'customers_location_state' => :'customers_location_state',
|
|
86
|
+
:'number_of_viewed_pages_logic' => :'number_of_viewed_pages_logic',
|
|
87
|
+
:'number_of_viewed_pages_value' => :'number_of_viewed_pages_value',
|
|
88
|
+
:'referring_website_logic' => :'referring_website_logic',
|
|
89
|
+
:'referring_website_value' => :'referring_website_value',
|
|
90
|
+
:'type' => :'type'
|
|
91
|
+
}
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Attribute type mapping.
|
|
95
|
+
def self.swagger_types
|
|
96
|
+
{
|
|
97
|
+
:'any_page_url_logic' => :'String',
|
|
98
|
+
:'any_page_url_value' => :'String',
|
|
99
|
+
:'current_page_url_logic' => :'String',
|
|
100
|
+
:'current_page_url_value' => :'String',
|
|
101
|
+
:'customers_browsing_time_logic' => :'String',
|
|
102
|
+
:'customers_browsing_time_seconds' => :'Integer',
|
|
103
|
+
:'customers_location_country' => :'String',
|
|
104
|
+
:'customers_location_logic' => :'String',
|
|
105
|
+
:'customers_location_state' => :'String',
|
|
106
|
+
:'number_of_viewed_pages_logic' => :'String',
|
|
107
|
+
:'number_of_viewed_pages_value' => :'Integer',
|
|
108
|
+
:'referring_website_logic' => :'String',
|
|
109
|
+
:'referring_website_value' => :'String',
|
|
110
|
+
:'type' => :'String'
|
|
111
|
+
}
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Initializes the object
|
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
116
|
+
def initialize(attributes = {})
|
|
117
|
+
return unless attributes.is_a?(Hash)
|
|
118
|
+
|
|
119
|
+
# convert string to symbol for hash key
|
|
120
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
121
|
+
|
|
122
|
+
if attributes.has_key?(:'any_page_url_logic')
|
|
123
|
+
self.any_page_url_logic = attributes[:'any_page_url_logic']
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if attributes.has_key?(:'any_page_url_value')
|
|
127
|
+
self.any_page_url_value = attributes[:'any_page_url_value']
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if attributes.has_key?(:'current_page_url_logic')
|
|
131
|
+
self.current_page_url_logic = attributes[:'current_page_url_logic']
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if attributes.has_key?(:'current_page_url_value')
|
|
135
|
+
self.current_page_url_value = attributes[:'current_page_url_value']
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if attributes.has_key?(:'customers_browsing_time_logic')
|
|
139
|
+
self.customers_browsing_time_logic = attributes[:'customers_browsing_time_logic']
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
if attributes.has_key?(:'customers_browsing_time_seconds')
|
|
143
|
+
self.customers_browsing_time_seconds = attributes[:'customers_browsing_time_seconds']
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
if attributes.has_key?(:'customers_location_country')
|
|
147
|
+
self.customers_location_country = attributes[:'customers_location_country']
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
if attributes.has_key?(:'customers_location_logic')
|
|
151
|
+
self.customers_location_logic = attributes[:'customers_location_logic']
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
if attributes.has_key?(:'customers_location_state')
|
|
155
|
+
self.customers_location_state = attributes[:'customers_location_state']
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
if attributes.has_key?(:'number_of_viewed_pages_logic')
|
|
159
|
+
self.number_of_viewed_pages_logic = attributes[:'number_of_viewed_pages_logic']
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if attributes.has_key?(:'number_of_viewed_pages_value')
|
|
163
|
+
self.number_of_viewed_pages_value = attributes[:'number_of_viewed_pages_value']
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if attributes.has_key?(:'referring_website_logic')
|
|
167
|
+
self.referring_website_logic = attributes[:'referring_website_logic']
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
if attributes.has_key?(:'referring_website_value')
|
|
171
|
+
self.referring_website_value = attributes[:'referring_website_value']
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
if attributes.has_key?(:'type')
|
|
175
|
+
self.type = attributes[:'type']
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
180
|
+
# @return Array for valid properties with the reasons
|
|
181
|
+
def list_invalid_properties
|
|
182
|
+
invalid_properties = Array.new
|
|
183
|
+
invalid_properties
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# Check to see if the all the properties in the model are valid
|
|
187
|
+
# @return true if the model is valid
|
|
188
|
+
def valid?
|
|
189
|
+
any_page_url_logic_validator = EnumAttributeValidator.new('String', ['contains', 'does not contain', 'is exactly', 'is not'])
|
|
190
|
+
return false unless any_page_url_logic_validator.valid?(@any_page_url_logic)
|
|
191
|
+
current_page_url_logic_validator = EnumAttributeValidator.new('String', ['contains', 'does not contain', 'is exactly', 'is not'])
|
|
192
|
+
return false unless current_page_url_logic_validator.valid?(@current_page_url_logic)
|
|
193
|
+
customers_browsing_time_logic_validator = EnumAttributeValidator.new('String', ['is at least', 'is more than', 'is less than', 'is at most'])
|
|
194
|
+
return false unless customers_browsing_time_logic_validator.valid?(@customers_browsing_time_logic)
|
|
195
|
+
customers_location_logic_validator = EnumAttributeValidator.new('String', ['is', 'is not'])
|
|
196
|
+
return false unless customers_location_logic_validator.valid?(@customers_location_logic)
|
|
197
|
+
number_of_viewed_pages_logic_validator = EnumAttributeValidator.new('String', ['is at least', 'is more than', 'is less than', 'is at most'])
|
|
198
|
+
return false unless number_of_viewed_pages_logic_validator.valid?(@number_of_viewed_pages_logic)
|
|
199
|
+
referring_website_logic_validator = EnumAttributeValidator.new('String', ['contains', 'does not contain', 'is exactly', 'is not'])
|
|
200
|
+
return false unless referring_website_logic_validator.valid?(@referring_website_logic)
|
|
201
|
+
type_validator = EnumAttributeValidator.new('String', ['current page url', 'customer's location', 'customer's browsing time', 'number of viewed pages', 'referring website address', 'any page from session'])
|
|
202
|
+
return false unless type_validator.valid?(@type)
|
|
203
|
+
true
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
207
|
+
# @param [Object] any_page_url_logic Object to be assigned
|
|
208
|
+
def any_page_url_logic=(any_page_url_logic)
|
|
209
|
+
validator = EnumAttributeValidator.new('String', ['contains', 'does not contain', 'is exactly', 'is not'])
|
|
210
|
+
unless validator.valid?(any_page_url_logic)
|
|
211
|
+
fail ArgumentError, 'invalid value for "any_page_url_logic", must be one of #{validator.allowable_values}.'
|
|
212
|
+
end
|
|
213
|
+
@any_page_url_logic = any_page_url_logic
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
217
|
+
# @param [Object] current_page_url_logic Object to be assigned
|
|
218
|
+
def current_page_url_logic=(current_page_url_logic)
|
|
219
|
+
validator = EnumAttributeValidator.new('String', ['contains', 'does not contain', 'is exactly', 'is not'])
|
|
220
|
+
unless validator.valid?(current_page_url_logic)
|
|
221
|
+
fail ArgumentError, 'invalid value for "current_page_url_logic", must be one of #{validator.allowable_values}.'
|
|
222
|
+
end
|
|
223
|
+
@current_page_url_logic = current_page_url_logic
|
|
224
|
+
end
|
|
225
|
+
|
|
226
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
227
|
+
# @param [Object] customers_browsing_time_logic Object to be assigned
|
|
228
|
+
def customers_browsing_time_logic=(customers_browsing_time_logic)
|
|
229
|
+
validator = EnumAttributeValidator.new('String', ['is at least', 'is more than', 'is less than', 'is at most'])
|
|
230
|
+
unless validator.valid?(customers_browsing_time_logic)
|
|
231
|
+
fail ArgumentError, 'invalid value for "customers_browsing_time_logic", must be one of #{validator.allowable_values}.'
|
|
232
|
+
end
|
|
233
|
+
@customers_browsing_time_logic = customers_browsing_time_logic
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
237
|
+
# @param [Object] customers_location_logic Object to be assigned
|
|
238
|
+
def customers_location_logic=(customers_location_logic)
|
|
239
|
+
validator = EnumAttributeValidator.new('String', ['is', 'is not'])
|
|
240
|
+
unless validator.valid?(customers_location_logic)
|
|
241
|
+
fail ArgumentError, 'invalid value for "customers_location_logic", must be one of #{validator.allowable_values}.'
|
|
242
|
+
end
|
|
243
|
+
@customers_location_logic = customers_location_logic
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
247
|
+
# @param [Object] number_of_viewed_pages_logic Object to be assigned
|
|
248
|
+
def number_of_viewed_pages_logic=(number_of_viewed_pages_logic)
|
|
249
|
+
validator = EnumAttributeValidator.new('String', ['is at least', 'is more than', 'is less than', 'is at most'])
|
|
250
|
+
unless validator.valid?(number_of_viewed_pages_logic)
|
|
251
|
+
fail ArgumentError, 'invalid value for "number_of_viewed_pages_logic", must be one of #{validator.allowable_values}.'
|
|
252
|
+
end
|
|
253
|
+
@number_of_viewed_pages_logic = number_of_viewed_pages_logic
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
257
|
+
# @param [Object] referring_website_logic Object to be assigned
|
|
258
|
+
def referring_website_logic=(referring_website_logic)
|
|
259
|
+
validator = EnumAttributeValidator.new('String', ['contains', 'does not contain', 'is exactly', 'is not'])
|
|
260
|
+
unless validator.valid?(referring_website_logic)
|
|
261
|
+
fail ArgumentError, 'invalid value for "referring_website_logic", must be one of #{validator.allowable_values}.'
|
|
262
|
+
end
|
|
263
|
+
@referring_website_logic = referring_website_logic
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
267
|
+
# @param [Object] type Object to be assigned
|
|
268
|
+
def type=(type)
|
|
269
|
+
validator = EnumAttributeValidator.new('String', ['current page url', 'customer's location', 'customer's browsing time', 'number of viewed pages', 'referring website address', 'any page from session'])
|
|
270
|
+
unless validator.valid?(type)
|
|
271
|
+
fail ArgumentError, 'invalid value for "type", must be one of #{validator.allowable_values}.'
|
|
272
|
+
end
|
|
273
|
+
@type = type
|
|
274
|
+
end
|
|
275
|
+
|
|
276
|
+
# Checks equality by comparing each attribute.
|
|
277
|
+
# @param [Object] Object to be compared
|
|
278
|
+
def ==(o)
|
|
279
|
+
return true if self.equal?(o)
|
|
280
|
+
self.class == o.class &&
|
|
281
|
+
any_page_url_logic == o.any_page_url_logic &&
|
|
282
|
+
any_page_url_value == o.any_page_url_value &&
|
|
283
|
+
current_page_url_logic == o.current_page_url_logic &&
|
|
284
|
+
current_page_url_value == o.current_page_url_value &&
|
|
285
|
+
customers_browsing_time_logic == o.customers_browsing_time_logic &&
|
|
286
|
+
customers_browsing_time_seconds == o.customers_browsing_time_seconds &&
|
|
287
|
+
customers_location_country == o.customers_location_country &&
|
|
288
|
+
customers_location_logic == o.customers_location_logic &&
|
|
289
|
+
customers_location_state == o.customers_location_state &&
|
|
290
|
+
number_of_viewed_pages_logic == o.number_of_viewed_pages_logic &&
|
|
291
|
+
number_of_viewed_pages_value == o.number_of_viewed_pages_value &&
|
|
292
|
+
referring_website_logic == o.referring_website_logic &&
|
|
293
|
+
referring_website_value == o.referring_website_value &&
|
|
294
|
+
type == o.type
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
# @see the `==` method
|
|
298
|
+
# @param [Object] Object to be compared
|
|
299
|
+
def eql?(o)
|
|
300
|
+
self == o
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
# Calculates hash code according to all attributes.
|
|
304
|
+
# @return [Fixnum] Hash code
|
|
305
|
+
def hash
|
|
306
|
+
[any_page_url_logic, any_page_url_value, current_page_url_logic, current_page_url_value, customers_browsing_time_logic, customers_browsing_time_seconds, customers_location_country, customers_location_logic, customers_location_state, number_of_viewed_pages_logic, number_of_viewed_pages_value, referring_website_logic, referring_website_value, type].hash
|
|
307
|
+
end
|
|
308
|
+
|
|
309
|
+
# Builds the object from hash
|
|
310
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
311
|
+
# @return [Object] Returns the model itself
|
|
312
|
+
def build_from_hash(attributes)
|
|
313
|
+
return nil unless attributes.is_a?(Hash)
|
|
314
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
315
|
+
if type =~ /\AArray<(.*)>/i
|
|
316
|
+
# check to ensure the input is an array given that the attribute
|
|
317
|
+
# is documented as an array but the input is not
|
|
318
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
319
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
320
|
+
end
|
|
321
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
322
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
323
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
self
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
# Deserializes the data based on type
|
|
330
|
+
# @param string type Data type
|
|
331
|
+
# @param string value Value to be deserialized
|
|
332
|
+
# @return [Object] Deserialized data
|
|
333
|
+
def _deserialize(type, value)
|
|
334
|
+
case type.to_sym
|
|
335
|
+
when :DateTime
|
|
336
|
+
DateTime.parse(value)
|
|
337
|
+
when :Date
|
|
338
|
+
Date.parse(value)
|
|
339
|
+
when :String
|
|
340
|
+
value.to_s
|
|
341
|
+
when :Integer
|
|
342
|
+
value.to_i
|
|
343
|
+
when :Float
|
|
344
|
+
value.to_f
|
|
345
|
+
when :BOOLEAN
|
|
346
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
347
|
+
true
|
|
348
|
+
else
|
|
349
|
+
false
|
|
350
|
+
end
|
|
351
|
+
when :Object
|
|
352
|
+
# generic object (usually a Hash), return directly
|
|
353
|
+
value
|
|
354
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
355
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
356
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
357
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
358
|
+
k_type = Regexp.last_match[:k_type]
|
|
359
|
+
v_type = Regexp.last_match[:v_type]
|
|
360
|
+
{}.tap do |hash|
|
|
361
|
+
value.each do |k, v|
|
|
362
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
363
|
+
end
|
|
364
|
+
end
|
|
365
|
+
else # model
|
|
366
|
+
temp_model = UltracartClient.const_get(type).new
|
|
367
|
+
temp_model.build_from_hash(value)
|
|
368
|
+
end
|
|
369
|
+
end
|
|
370
|
+
|
|
371
|
+
# Returns the string representation of the object
|
|
372
|
+
# @return [String] String presentation of the object
|
|
373
|
+
def to_s
|
|
374
|
+
to_hash.to_s
|
|
375
|
+
end
|
|
376
|
+
|
|
377
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
378
|
+
# @return [Hash] Returns the object in the form of hash
|
|
379
|
+
def to_body
|
|
380
|
+
to_hash
|
|
381
|
+
end
|
|
382
|
+
|
|
383
|
+
# Returns the object in the form of hash
|
|
384
|
+
# @return [Hash] Returns the object in the form of hash
|
|
385
|
+
def to_hash
|
|
386
|
+
hash = {}
|
|
387
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
388
|
+
value = self.send(attr)
|
|
389
|
+
next if value.nil?
|
|
390
|
+
hash[param] = _to_hash(value)
|
|
391
|
+
end
|
|
392
|
+
hash
|
|
393
|
+
end
|
|
394
|
+
|
|
395
|
+
# Outputs non-array value in the form of hash
|
|
396
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
397
|
+
# @param [Object] value Any valid value
|
|
398
|
+
# @return [Hash] Returns the value in the form of hash
|
|
399
|
+
def _to_hash(value)
|
|
400
|
+
if value.is_a?(Array)
|
|
401
|
+
value.compact.map { |v| _to_hash(v) }
|
|
402
|
+
elsif value.is_a?(Hash)
|
|
403
|
+
{}.tap do |hash|
|
|
404
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
405
|
+
end
|
|
406
|
+
elsif value.respond_to? :to_hash
|
|
407
|
+
value.to_hash
|
|
408
|
+
else
|
|
409
|
+
value
|
|
410
|
+
end
|
|
411
|
+
end
|
|
412
|
+
|
|
413
|
+
end
|
|
414
|
+
end
|
|
@@ -0,0 +1,186 @@
|
|
|
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 ConversationEngagementEquationGroup
|
|
17
|
+
attr_accessor :functions
|
|
18
|
+
|
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
20
|
+
def self.attribute_map
|
|
21
|
+
{
|
|
22
|
+
:'functions' => :'functions'
|
|
23
|
+
}
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Attribute type mapping.
|
|
27
|
+
def self.swagger_types
|
|
28
|
+
{
|
|
29
|
+
:'functions' => :'Array<ConversationEngagementEquationFunction>'
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Initializes the object
|
|
34
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
35
|
+
def initialize(attributes = {})
|
|
36
|
+
return unless attributes.is_a?(Hash)
|
|
37
|
+
|
|
38
|
+
# convert string to symbol for hash key
|
|
39
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
40
|
+
|
|
41
|
+
if attributes.has_key?(:'functions')
|
|
42
|
+
if (value = attributes[:'functions']).is_a?(Array)
|
|
43
|
+
self.functions = value
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
49
|
+
# @return Array for valid properties with the reasons
|
|
50
|
+
def list_invalid_properties
|
|
51
|
+
invalid_properties = Array.new
|
|
52
|
+
invalid_properties
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Check to see if the all the properties in the model are valid
|
|
56
|
+
# @return true if the model is valid
|
|
57
|
+
def valid?
|
|
58
|
+
true
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Checks equality by comparing each attribute.
|
|
62
|
+
# @param [Object] Object to be compared
|
|
63
|
+
def ==(o)
|
|
64
|
+
return true if self.equal?(o)
|
|
65
|
+
self.class == o.class &&
|
|
66
|
+
functions == o.functions
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# @see the `==` method
|
|
70
|
+
# @param [Object] Object to be compared
|
|
71
|
+
def eql?(o)
|
|
72
|
+
self == o
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Calculates hash code according to all attributes.
|
|
76
|
+
# @return [Fixnum] Hash code
|
|
77
|
+
def hash
|
|
78
|
+
[functions].hash
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Builds the object from hash
|
|
82
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
83
|
+
# @return [Object] Returns the model itself
|
|
84
|
+
def build_from_hash(attributes)
|
|
85
|
+
return nil unless attributes.is_a?(Hash)
|
|
86
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
87
|
+
if type =~ /\AArray<(.*)>/i
|
|
88
|
+
# check to ensure the input is an array given that the attribute
|
|
89
|
+
# is documented as an array but the input is not
|
|
90
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
91
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
92
|
+
end
|
|
93
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
94
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
95
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
self
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Deserializes the data based on type
|
|
102
|
+
# @param string type Data type
|
|
103
|
+
# @param string value Value to be deserialized
|
|
104
|
+
# @return [Object] Deserialized data
|
|
105
|
+
def _deserialize(type, value)
|
|
106
|
+
case type.to_sym
|
|
107
|
+
when :DateTime
|
|
108
|
+
DateTime.parse(value)
|
|
109
|
+
when :Date
|
|
110
|
+
Date.parse(value)
|
|
111
|
+
when :String
|
|
112
|
+
value.to_s
|
|
113
|
+
when :Integer
|
|
114
|
+
value.to_i
|
|
115
|
+
when :Float
|
|
116
|
+
value.to_f
|
|
117
|
+
when :BOOLEAN
|
|
118
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
119
|
+
true
|
|
120
|
+
else
|
|
121
|
+
false
|
|
122
|
+
end
|
|
123
|
+
when :Object
|
|
124
|
+
# generic object (usually a Hash), return directly
|
|
125
|
+
value
|
|
126
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
127
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
128
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
129
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
130
|
+
k_type = Regexp.last_match[:k_type]
|
|
131
|
+
v_type = Regexp.last_match[:v_type]
|
|
132
|
+
{}.tap do |hash|
|
|
133
|
+
value.each do |k, v|
|
|
134
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
else # model
|
|
138
|
+
temp_model = UltracartClient.const_get(type).new
|
|
139
|
+
temp_model.build_from_hash(value)
|
|
140
|
+
end
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Returns the string representation of the object
|
|
144
|
+
# @return [String] String presentation of the object
|
|
145
|
+
def to_s
|
|
146
|
+
to_hash.to_s
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
150
|
+
# @return [Hash] Returns the object in the form of hash
|
|
151
|
+
def to_body
|
|
152
|
+
to_hash
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Returns the object in the form of hash
|
|
156
|
+
# @return [Hash] Returns the object in the form of hash
|
|
157
|
+
def to_hash
|
|
158
|
+
hash = {}
|
|
159
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
160
|
+
value = self.send(attr)
|
|
161
|
+
next if value.nil?
|
|
162
|
+
hash[param] = _to_hash(value)
|
|
163
|
+
end
|
|
164
|
+
hash
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Outputs non-array value in the form of hash
|
|
168
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
169
|
+
# @param [Object] value Any valid value
|
|
170
|
+
# @return [Hash] Returns the value in the form of hash
|
|
171
|
+
def _to_hash(value)
|
|
172
|
+
if value.is_a?(Array)
|
|
173
|
+
value.compact.map { |v| _to_hash(v) }
|
|
174
|
+
elsif value.is_a?(Hash)
|
|
175
|
+
{}.tap do |hash|
|
|
176
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
177
|
+
end
|
|
178
|
+
elsif value.respond_to? :to_hash
|
|
179
|
+
value.to_hash
|
|
180
|
+
else
|
|
181
|
+
value
|
|
182
|
+
end
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
end
|
|
186
|
+
end
|
|
@@ -14,6 +14,12 @@ require 'date'
|
|
|
14
14
|
|
|
15
15
|
module UltracartClient
|
|
16
16
|
class ConversationSearchRequest
|
|
17
|
+
# End of the range
|
|
18
|
+
attr_accessor :date_end
|
|
19
|
+
|
|
20
|
+
# Start of the range
|
|
21
|
+
attr_accessor :date_start
|
|
22
|
+
|
|
17
23
|
attr_accessor :email_filter
|
|
18
24
|
|
|
19
25
|
attr_accessor :language_filter
|
|
@@ -37,6 +43,8 @@ module UltracartClient
|
|
|
37
43
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
38
44
|
def self.attribute_map
|
|
39
45
|
{
|
|
46
|
+
:'date_end' => :'date_end',
|
|
47
|
+
:'date_start' => :'date_start',
|
|
40
48
|
:'email_filter' => :'email_filter',
|
|
41
49
|
:'language_filter' => :'language_filter',
|
|
42
50
|
:'medium_filter' => :'medium_filter',
|
|
@@ -53,6 +61,8 @@ module UltracartClient
|
|
|
53
61
|
# Attribute type mapping.
|
|
54
62
|
def self.swagger_types
|
|
55
63
|
{
|
|
64
|
+
:'date_end' => :'String',
|
|
65
|
+
:'date_start' => :'String',
|
|
56
66
|
:'email_filter' => :'String',
|
|
57
67
|
:'language_filter' => :'String',
|
|
58
68
|
:'medium_filter' => :'String',
|
|
@@ -74,6 +84,14 @@ module UltracartClient
|
|
|
74
84
|
# convert string to symbol for hash key
|
|
75
85
|
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
76
86
|
|
|
87
|
+
if attributes.has_key?(:'date_end')
|
|
88
|
+
self.date_end = attributes[:'date_end']
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
if attributes.has_key?(:'date_start')
|
|
92
|
+
self.date_start = attributes[:'date_start']
|
|
93
|
+
end
|
|
94
|
+
|
|
77
95
|
if attributes.has_key?(:'email_filter')
|
|
78
96
|
self.email_filter = attributes[:'email_filter']
|
|
79
97
|
end
|
|
@@ -133,6 +151,8 @@ module UltracartClient
|
|
|
133
151
|
def ==(o)
|
|
134
152
|
return true if self.equal?(o)
|
|
135
153
|
self.class == o.class &&
|
|
154
|
+
date_end == o.date_end &&
|
|
155
|
+
date_start == o.date_start &&
|
|
136
156
|
email_filter == o.email_filter &&
|
|
137
157
|
language_filter == o.language_filter &&
|
|
138
158
|
medium_filter == o.medium_filter &&
|
|
@@ -154,7 +174,7 @@ module UltracartClient
|
|
|
154
174
|
# Calculates hash code according to all attributes.
|
|
155
175
|
# @return [Fixnum] Hash code
|
|
156
176
|
def hash
|
|
157
|
-
[email_filter, language_filter, medium_filter, order_by_newest, order_by_oldest, range_begin, range_end, sms_phone_number_filter, text_search, visible_filter].hash
|
|
177
|
+
[date_end, date_start, email_filter, language_filter, medium_filter, order_by_newest, order_by_oldest, range_begin, range_end, sms_phone_number_filter, text_search, visible_filter].hash
|
|
158
178
|
end
|
|
159
179
|
|
|
160
180
|
# Builds the object from hash
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -140,6 +140,7 @@ require 'ultracart_api/models/conversation_agent_auth'
|
|
|
140
140
|
require 'ultracart_api/models/conversation_agent_auth_response'
|
|
141
141
|
require 'ultracart_api/models/conversation_autocomplete_request'
|
|
142
142
|
require 'ultracart_api/models/conversation_autocomplete_response'
|
|
143
|
+
require 'ultracart_api/models/conversation_autocomplete_value'
|
|
143
144
|
require 'ultracart_api/models/conversation_canned_message'
|
|
144
145
|
require 'ultracart_api/models/conversation_canned_message_response'
|
|
145
146
|
require 'ultracart_api/models/conversation_canned_messages_response'
|
|
@@ -150,6 +151,8 @@ require 'ultracart_api/models/conversation_department_settings'
|
|
|
150
151
|
require 'ultracart_api/models/conversation_departments_response'
|
|
151
152
|
require 'ultracart_api/models/conversation_engagement'
|
|
152
153
|
require 'ultracart_api/models/conversation_engagement_equation'
|
|
154
|
+
require 'ultracart_api/models/conversation_engagement_equation_function'
|
|
155
|
+
require 'ultracart_api/models/conversation_engagement_equation_group'
|
|
153
156
|
require 'ultracart_api/models/conversation_engagement_response'
|
|
154
157
|
require 'ultracart_api/models/conversation_engagements_response'
|
|
155
158
|
require 'ultracart_api/models/conversation_event_add_coupon'
|
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.10.
|
|
4
|
+
version: 3.10.83
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- UltraCart
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-12-
|
|
11
|
+
date: 2022-12-20 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -350,6 +350,7 @@ files:
|
|
|
350
350
|
- docs/ConversationApi.md
|
|
351
351
|
- docs/ConversationAutocompleteRequest.md
|
|
352
352
|
- docs/ConversationAutocompleteResponse.md
|
|
353
|
+
- docs/ConversationAutocompleteValue.md
|
|
353
354
|
- docs/ConversationCannedMessage.md
|
|
354
355
|
- docs/ConversationCannedMessageResponse.md
|
|
355
356
|
- docs/ConversationCannedMessagesResponse.md
|
|
@@ -360,6 +361,8 @@ files:
|
|
|
360
361
|
- docs/ConversationDepartmentsResponse.md
|
|
361
362
|
- docs/ConversationEngagement.md
|
|
362
363
|
- docs/ConversationEngagementEquation.md
|
|
364
|
+
- docs/ConversationEngagementEquationFunction.md
|
|
365
|
+
- docs/ConversationEngagementEquationGroup.md
|
|
363
366
|
- docs/ConversationEngagementResponse.md
|
|
364
367
|
- docs/ConversationEngagementsResponse.md
|
|
365
368
|
- docs/ConversationEventAddCoupon.md
|
|
@@ -1098,6 +1101,7 @@ files:
|
|
|
1098
1101
|
- lib/ultracart_api/models/conversation_agent_auth_response.rb
|
|
1099
1102
|
- lib/ultracart_api/models/conversation_autocomplete_request.rb
|
|
1100
1103
|
- lib/ultracart_api/models/conversation_autocomplete_response.rb
|
|
1104
|
+
- lib/ultracart_api/models/conversation_autocomplete_value.rb
|
|
1101
1105
|
- lib/ultracart_api/models/conversation_canned_message.rb
|
|
1102
1106
|
- lib/ultracart_api/models/conversation_canned_message_response.rb
|
|
1103
1107
|
- lib/ultracart_api/models/conversation_canned_messages_response.rb
|
|
@@ -1108,6 +1112,8 @@ files:
|
|
|
1108
1112
|
- lib/ultracart_api/models/conversation_departments_response.rb
|
|
1109
1113
|
- lib/ultracart_api/models/conversation_engagement.rb
|
|
1110
1114
|
- lib/ultracart_api/models/conversation_engagement_equation.rb
|
|
1115
|
+
- lib/ultracart_api/models/conversation_engagement_equation_function.rb
|
|
1116
|
+
- lib/ultracart_api/models/conversation_engagement_equation_group.rb
|
|
1111
1117
|
- lib/ultracart_api/models/conversation_engagement_response.rb
|
|
1112
1118
|
- lib/ultracart_api/models/conversation_engagements_response.rb
|
|
1113
1119
|
- lib/ultracart_api/models/conversation_event_add_coupon.rb
|