ultracart_api 4.0.98.rc → 4.0.100.rc

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,221 @@
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 ConversationEngagementEquationGroup
18
+ attr_accessor :functions
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'functions' => :'functions'
24
+ }
25
+ end
26
+
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'functions' => :'Array<ConversationEngagementEquationFunction>'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ConversationEngagementEquationGroup` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ConversationEngagementEquationGroup`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'functions')
61
+ if (value = attributes[:'functions']).is_a?(Array)
62
+ self.functions = value
63
+ end
64
+ end
65
+ end
66
+
67
+ # Show invalid properties with the reasons. Usually used together with valid?
68
+ # @return Array for valid properties with the reasons
69
+ def list_invalid_properties
70
+ invalid_properties = Array.new
71
+ invalid_properties
72
+ end
73
+
74
+ # Check to see if the all the properties in the model are valid
75
+ # @return true if the model is valid
76
+ def valid?
77
+ true
78
+ end
79
+
80
+ # Checks equality by comparing each attribute.
81
+ # @param [Object] Object to be compared
82
+ def ==(o)
83
+ return true if self.equal?(o)
84
+ self.class == o.class &&
85
+ functions == o.functions
86
+ end
87
+
88
+ # @see the `==` method
89
+ # @param [Object] Object to be compared
90
+ def eql?(o)
91
+ self == o
92
+ end
93
+
94
+ # Calculates hash code according to all attributes.
95
+ # @return [Integer] Hash code
96
+ def hash
97
+ [functions].hash
98
+ end
99
+
100
+ # Builds the object from hash
101
+ # @param [Hash] attributes Model attributes in the form of hash
102
+ # @return [Object] Returns the model itself
103
+ def self.build_from_hash(attributes)
104
+ new.build_from_hash(attributes)
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def build_from_hash(attributes)
111
+ return nil unless attributes.is_a?(Hash)
112
+ attributes = attributes.transform_keys(&:to_sym)
113
+ self.class.openapi_types.each_pair do |key, type|
114
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
115
+ self.send("#{key}=", nil)
116
+ elsif type =~ /\AArray<(.*)>/i
117
+ # check to ensure the input is an array given that the attribute
118
+ # is documented as an array but the input is not
119
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
120
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
121
+ end
122
+ elsif !attributes[self.class.attribute_map[key]].nil?
123
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
124
+ end
125
+ end
126
+
127
+ self
128
+ end
129
+
130
+ # Deserializes the data based on type
131
+ # @param string type Data type
132
+ # @param string value Value to be deserialized
133
+ # @return [Object] Deserialized data
134
+ def _deserialize(type, value)
135
+ case type.to_sym
136
+ when :Time
137
+ Time.parse(value)
138
+ when :Date
139
+ Date.parse(value)
140
+ when :String
141
+ value.to_s
142
+ when :Integer
143
+ value.to_i
144
+ when :Float
145
+ value.to_f
146
+ when :Boolean
147
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
148
+ true
149
+ else
150
+ false
151
+ end
152
+ when :Object
153
+ # generic object (usually a Hash), return directly
154
+ value
155
+ when /\AArray<(?<inner_type>.+)>\z/
156
+ inner_type = Regexp.last_match[:inner_type]
157
+ value.map { |v| _deserialize(inner_type, v) }
158
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
159
+ k_type = Regexp.last_match[:k_type]
160
+ v_type = Regexp.last_match[:v_type]
161
+ {}.tap do |hash|
162
+ value.each do |k, v|
163
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
164
+ end
165
+ end
166
+ else # model
167
+ # models (e.g. Pet) or oneOf
168
+ klass = UltracartClient.const_get(type)
169
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
170
+ end
171
+ end
172
+
173
+ # Returns the string representation of the object
174
+ # @return [String] String presentation of the object
175
+ def to_s
176
+ to_hash.to_s
177
+ end
178
+
179
+ # to_body is an alias to to_hash (backward compatibility)
180
+ # @return [Hash] Returns the object in the form of hash
181
+ def to_body
182
+ to_hash
183
+ end
184
+
185
+ # Returns the object in the form of hash
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_hash
188
+ hash = {}
189
+ self.class.attribute_map.each_pair do |attr, param|
190
+ value = self.send(attr)
191
+ if value.nil?
192
+ is_nullable = self.class.openapi_nullable.include?(attr)
193
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
194
+ end
195
+
196
+ hash[param] = _to_hash(value)
197
+ end
198
+ hash
199
+ end
200
+
201
+ # Outputs non-array value in the form of hash
202
+ # For object, use to_hash. Otherwise, just return the value
203
+ # @param [Object] value Any valid value
204
+ # @return [Hash] Returns the value in the form of hash
205
+ def _to_hash(value)
206
+ if value.is_a?(Array)
207
+ value.compact.map { |v| _to_hash(v) }
208
+ elsif value.is_a?(Hash)
209
+ {}.tap do |hash|
210
+ value.each { |k, v| hash[k] = _to_hash(v) }
211
+ end
212
+ elsif value.respond_to? :to_hash
213
+ value.to_hash
214
+ else
215
+ value
216
+ end
217
+ end
218
+
219
+ end
220
+
221
+ end
@@ -15,6 +15,12 @@ require 'time'
15
15
 
16
16
  module UltracartClient
17
17
  class ConversationSearchRequest
18
+ # End of the range
19
+ attr_accessor :date_end
20
+
21
+ # Start of the range
22
+ attr_accessor :date_start
23
+
18
24
  attr_accessor :email_filter
19
25
 
20
26
  attr_accessor :language_filter
@@ -38,6 +44,8 @@ module UltracartClient
38
44
  # Attribute mapping from ruby-style variable name to JSON key.
39
45
  def self.attribute_map
40
46
  {
47
+ :'date_end' => :'date_end',
48
+ :'date_start' => :'date_start',
41
49
  :'email_filter' => :'email_filter',
42
50
  :'language_filter' => :'language_filter',
43
51
  :'medium_filter' => :'medium_filter',
@@ -59,6 +67,8 @@ module UltracartClient
59
67
  # Attribute type mapping.
60
68
  def self.openapi_types
61
69
  {
70
+ :'date_end' => :'String',
71
+ :'date_start' => :'String',
62
72
  :'email_filter' => :'String',
63
73
  :'language_filter' => :'String',
64
74
  :'medium_filter' => :'String',
@@ -93,6 +103,14 @@ module UltracartClient
93
103
  h[k.to_sym] = v
94
104
  }
95
105
 
106
+ if attributes.key?(:'date_end')
107
+ self.date_end = attributes[:'date_end']
108
+ end
109
+
110
+ if attributes.key?(:'date_start')
111
+ self.date_start = attributes[:'date_start']
112
+ end
113
+
96
114
  if attributes.key?(:'email_filter')
97
115
  self.email_filter = attributes[:'email_filter']
98
116
  end
@@ -152,6 +170,8 @@ module UltracartClient
152
170
  def ==(o)
153
171
  return true if self.equal?(o)
154
172
  self.class == o.class &&
173
+ date_end == o.date_end &&
174
+ date_start == o.date_start &&
155
175
  email_filter == o.email_filter &&
156
176
  language_filter == o.language_filter &&
157
177
  medium_filter == o.medium_filter &&
@@ -173,7 +193,7 @@ module UltracartClient
173
193
  # Calculates hash code according to all attributes.
174
194
  # @return [Integer] Hash code
175
195
  def hash
176
- [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
196
+ [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
177
197
  end
178
198
 
179
199
  # Builds the object from hash
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.0.98.rc'
14
+ VERSION = '4.0.100.rc'
15
15
  end
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'
@@ -148,6 +149,9 @@ require 'ultracart_api/models/conversation_department'
148
149
  require 'ultracart_api/models/conversation_department_response'
149
150
  require 'ultracart_api/models/conversation_departments_response'
150
151
  require 'ultracart_api/models/conversation_engagement'
152
+ require 'ultracart_api/models/conversation_engagement_equation'
153
+ require 'ultracart_api/models/conversation_engagement_equation_function'
154
+ require 'ultracart_api/models/conversation_engagement_equation_group'
151
155
  require 'ultracart_api/models/conversation_engagement_response'
152
156
  require 'ultracart_api/models/conversation_engagements_response'
153
157
  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: 4.0.98.rc
4
+ version: 4.0.100.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-12-15 00:00:00.000000000 Z
11
+ date: 2022-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -190,6 +190,7 @@ files:
190
190
  - docs/ConversationApi.md
191
191
  - docs/ConversationAutocompleteRequest.md
192
192
  - docs/ConversationAutocompleteResponse.md
193
+ - docs/ConversationAutocompleteValue.md
193
194
  - docs/ConversationCannedMessage.md
194
195
  - docs/ConversationCannedMessageResponse.md
195
196
  - docs/ConversationCannedMessagesResponse.md
@@ -198,6 +199,9 @@ files:
198
199
  - docs/ConversationDepartmentResponse.md
199
200
  - docs/ConversationDepartmentsResponse.md
200
201
  - docs/ConversationEngagement.md
202
+ - docs/ConversationEngagementEquation.md
203
+ - docs/ConversationEngagementEquationFunction.md
204
+ - docs/ConversationEngagementEquationGroup.md
201
205
  - docs/ConversationEngagementResponse.md
202
206
  - docs/ConversationEngagementsResponse.md
203
207
  - docs/ConversationEventAddCoupon.md
@@ -936,6 +940,7 @@ files:
936
940
  - lib/ultracart_api/models/conversation_agent_auth_response.rb
937
941
  - lib/ultracart_api/models/conversation_autocomplete_request.rb
938
942
  - lib/ultracart_api/models/conversation_autocomplete_response.rb
943
+ - lib/ultracart_api/models/conversation_autocomplete_value.rb
939
944
  - lib/ultracart_api/models/conversation_canned_message.rb
940
945
  - lib/ultracart_api/models/conversation_canned_message_response.rb
941
946
  - lib/ultracart_api/models/conversation_canned_messages_response.rb
@@ -944,6 +949,9 @@ files:
944
949
  - lib/ultracart_api/models/conversation_department_response.rb
945
950
  - lib/ultracart_api/models/conversation_departments_response.rb
946
951
  - lib/ultracart_api/models/conversation_engagement.rb
952
+ - lib/ultracart_api/models/conversation_engagement_equation.rb
953
+ - lib/ultracart_api/models/conversation_engagement_equation_function.rb
954
+ - lib/ultracart_api/models/conversation_engagement_equation_group.rb
947
955
  - lib/ultracart_api/models/conversation_engagement_response.rb
948
956
  - lib/ultracart_api/models/conversation_engagements_response.rb
949
957
  - lib/ultracart_api/models/conversation_event_add_coupon.rb