talon_one 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/docs/AddLoyaltyPoints.md +2 -2
- data/docs/CustomEffect.md +1 -1
- data/docs/InlineResponse2001.md +1 -1
- data/docs/InlineResponse20010.md +3 -3
- data/docs/InlineResponse20011.md +3 -3
- data/docs/InlineResponse20012.md +1 -1
- data/docs/InlineResponse20013.md +2 -2
- data/docs/InlineResponse20014.md +3 -5
- data/docs/InlineResponse20015.md +4 -2
- data/docs/InlineResponse20016.md +2 -4
- data/docs/InlineResponse20017.md +4 -2
- data/docs/InlineResponse20018.md +2 -2
- data/docs/InlineResponse20019.md +1 -1
- data/docs/InlineResponse2002.md +3 -3
- data/docs/InlineResponse20020.md +2 -4
- data/docs/InlineResponse20021.md +3 -3
- data/docs/InlineResponse20022.md +1 -1
- data/docs/InlineResponse20023.md +3 -1
- data/docs/InlineResponse20024.md +1 -1
- data/docs/InlineResponse20025.md +2 -2
- data/docs/InlineResponse20026.md +2 -2
- data/docs/InlineResponse20027.md +3 -3
- data/docs/InlineResponse20028.md +3 -5
- data/docs/InlineResponse20029.md +1 -1
- data/docs/InlineResponse2003.md +1 -1
- data/docs/InlineResponse20030.md +5 -3
- data/docs/InlineResponse20031.md +1 -1
- data/docs/InlineResponse20032.md +1 -1
- data/docs/InlineResponse20033.md +1 -1
- data/docs/InlineResponse20034.md +1 -1
- data/docs/InlineResponse20035.md +1 -1
- data/docs/InlineResponse20036.md +1 -1
- data/docs/InlineResponse20037.md +2 -4
- data/docs/InlineResponse20038.md +4 -2
- data/docs/InlineResponse20039.md +1 -1
- data/docs/InlineResponse2004.md +1 -1
- data/docs/InlineResponse20040.md +19 -0
- data/docs/InlineResponse2005.md +1 -1
- data/docs/InlineResponse2006.md +1 -1
- data/docs/InlineResponse2007.md +2 -2
- data/docs/InlineResponse2008.md +1 -1
- data/docs/InlineResponse2009.md +1 -1
- data/docs/IntegrationApi.md +26 -26
- data/docs/ManagementApi.md +141 -141
- data/docs/MultiApplicationEntity.md +1 -1
- data/docs/NewCustomEffect.md +1 -1
- data/docs/NewOutgoingIntegrationWebhook.md +19 -0
- data/docs/NewWebhook.md +3 -3
- data/docs/OutgoingIntegrationConfiguration.md +3 -1
- data/docs/OutgoingIntegrationWebhookTemplate.md +3 -1
- data/docs/ReopenSessionResponse.md +17 -0
- data/docs/StrikethroughCustomEffectPerItemProps.md +21 -0
- data/docs/UpdateCustomEffect.md +1 -1
- data/docs/Webhook.md +3 -3
- data/lib/talon_one/api/integration_api.rb +48 -48
- data/lib/talon_one/api/management_api.rb +234 -234
- data/lib/talon_one/models/add_loyalty_points.rb +2 -2
- data/lib/talon_one/models/custom_effect.rb +1 -1
- data/lib/talon_one/models/inline_response2001.rb +1 -1
- data/lib/talon_one/models/inline_response20010.rb +11 -11
- data/lib/talon_one/models/inline_response20011.rb +11 -11
- data/lib/talon_one/models/inline_response20012.rb +1 -1
- data/lib/talon_one/models/inline_response20013.rb +1 -3
- data/lib/talon_one/models/inline_response20014.rb +9 -11
- data/lib/talon_one/models/inline_response20015.rb +11 -7
- data/lib/talon_one/models/inline_response20016.rb +7 -11
- data/lib/talon_one/models/inline_response20017.rb +11 -7
- data/lib/talon_one/models/inline_response20018.rb +10 -10
- data/lib/talon_one/models/inline_response20019.rb +1 -1
- data/lib/talon_one/models/inline_response2002.rb +11 -11
- data/lib/talon_one/models/inline_response20020.rb +7 -11
- data/lib/talon_one/models/inline_response20021.rb +10 -10
- data/lib/talon_one/models/inline_response20022.rb +1 -1
- data/lib/talon_one/models/inline_response20023.rb +10 -6
- data/lib/talon_one/models/inline_response20024.rb +1 -1
- data/lib/talon_one/models/inline_response20025.rb +6 -1
- data/lib/talon_one/models/inline_response20026.rb +1 -6
- data/lib/talon_one/models/inline_response20027.rb +11 -11
- data/lib/talon_one/models/inline_response20028.rb +7 -11
- data/lib/talon_one/models/inline_response20029.rb +1 -1
- data/lib/talon_one/models/inline_response2003.rb +1 -1
- data/lib/talon_one/models/inline_response20030.rb +11 -7
- data/lib/talon_one/models/inline_response20031.rb +1 -1
- data/lib/talon_one/models/inline_response20032.rb +1 -1
- data/lib/talon_one/models/inline_response20033.rb +1 -1
- data/lib/talon_one/models/inline_response20034.rb +1 -1
- data/lib/talon_one/models/inline_response20035.rb +1 -1
- data/lib/talon_one/models/inline_response20036.rb +1 -1
- data/lib/talon_one/models/inline_response20037.rb +7 -11
- data/lib/talon_one/models/inline_response20038.rb +11 -7
- data/lib/talon_one/models/inline_response20039.rb +1 -1
- data/lib/talon_one/models/inline_response2004.rb +1 -1
- data/lib/talon_one/models/inline_response20040.rb +227 -0
- data/lib/talon_one/models/inline_response2005.rb +1 -1
- data/lib/talon_one/models/inline_response2006.rb +1 -1
- data/lib/talon_one/models/inline_response2007.rb +10 -10
- data/lib/talon_one/models/inline_response2008.rb +1 -1
- data/lib/talon_one/models/inline_response2009.rb +1 -1
- data/lib/talon_one/models/multi_application_entity.rb +1 -1
- data/lib/talon_one/models/new_custom_effect.rb +1 -1
- data/lib/talon_one/models/new_outgoing_integration_webhook.rb +229 -0
- data/lib/talon_one/models/new_webhook.rb +3 -3
- data/lib/talon_one/models/outgoing_integration_configuration.rb +16 -1
- data/lib/talon_one/models/outgoing_integration_webhook_template.rb +53 -4
- data/lib/talon_one/models/reopen_session_response.rb +215 -0
- data/lib/talon_one/models/strikethrough_custom_effect_per_item_props.rb +243 -0
- data/lib/talon_one/models/update_custom_effect.rb +1 -1
- data/lib/talon_one/models/webhook.rb +3 -3
- data/lib/talon_one/version.rb +1 -1
- data/lib/talon_one.rb +4 -0
- data/spec/api/integration_api_spec.rb +9 -9
- data/spec/api/management_api_spec.rb +59 -59
- data/spec/models/inline_response20010_spec.rb +1 -1
- data/spec/models/inline_response20011_spec.rb +1 -1
- data/spec/models/inline_response20014_spec.rb +0 -6
- data/spec/models/inline_response20015_spec.rb +6 -0
- data/spec/models/inline_response20016_spec.rb +0 -6
- data/spec/models/inline_response20017_spec.rb +6 -0
- data/spec/models/inline_response20018_spec.rb +1 -1
- data/spec/models/inline_response20020_spec.rb +0 -6
- data/spec/models/inline_response20021_spec.rb +2 -2
- data/spec/models/inline_response20023_spec.rb +6 -0
- data/spec/models/inline_response20027_spec.rb +1 -1
- data/spec/models/inline_response20028_spec.rb +0 -6
- data/spec/models/inline_response2002_spec.rb +1 -1
- data/spec/models/inline_response20030_spec.rb +6 -0
- data/spec/models/inline_response20037_spec.rb +0 -6
- data/spec/models/inline_response20038_spec.rb +6 -0
- data/spec/models/inline_response20040_spec.rb +47 -0
- data/spec/models/inline_response2007_spec.rb +1 -1
- data/spec/models/new_outgoing_integration_webhook_spec.rb +47 -0
- data/spec/models/outgoing_integration_configuration_spec.rb +6 -0
- data/spec/models/outgoing_integration_webhook_template_spec.rb +10 -0
- data/spec/models/reopen_session_response_spec.rb +41 -0
- data/spec/models/strikethrough_custom_effect_per_item_props_spec.rb +53 -0
- metadata +18 -2
@@ -16,12 +16,15 @@ module TalonOne
|
|
16
16
|
class InlineResponse20038
|
17
17
|
attr_accessor :total_result_size
|
18
18
|
|
19
|
+
attr_accessor :has_more
|
20
|
+
|
19
21
|
attr_accessor :data
|
20
22
|
|
21
23
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
24
|
def self.attribute_map
|
23
25
|
{
|
24
26
|
:'total_result_size' => :'totalResultSize',
|
27
|
+
:'has_more' => :'hasMore',
|
25
28
|
:'data' => :'data'
|
26
29
|
}
|
27
30
|
end
|
@@ -30,7 +33,8 @@ module TalonOne
|
|
30
33
|
def self.openapi_types
|
31
34
|
{
|
32
35
|
:'total_result_size' => :'Integer',
|
33
|
-
:'
|
36
|
+
:'has_more' => :'Boolean',
|
37
|
+
:'data' => :'Array<Change>'
|
34
38
|
}
|
35
39
|
end
|
36
40
|
|
@@ -59,6 +63,10 @@ module TalonOne
|
|
59
63
|
self.total_result_size = attributes[:'total_result_size']
|
60
64
|
end
|
61
65
|
|
66
|
+
if attributes.key?(:'has_more')
|
67
|
+
self.has_more = attributes[:'has_more']
|
68
|
+
end
|
69
|
+
|
62
70
|
if attributes.key?(:'data')
|
63
71
|
if (value = attributes[:'data']).is_a?(Array)
|
64
72
|
self.data = value
|
@@ -70,10 +78,6 @@ module TalonOne
|
|
70
78
|
# @return Array for valid properties with the reasons
|
71
79
|
def list_invalid_properties
|
72
80
|
invalid_properties = Array.new
|
73
|
-
if @total_result_size.nil?
|
74
|
-
invalid_properties.push('invalid value for "total_result_size", total_result_size cannot be nil.')
|
75
|
-
end
|
76
|
-
|
77
81
|
if @data.nil?
|
78
82
|
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
79
83
|
end
|
@@ -84,7 +88,6 @@ module TalonOne
|
|
84
88
|
# Check to see if the all the properties in the model are valid
|
85
89
|
# @return true if the model is valid
|
86
90
|
def valid?
|
87
|
-
return false if @total_result_size.nil?
|
88
91
|
return false if @data.nil?
|
89
92
|
true
|
90
93
|
end
|
@@ -95,6 +98,7 @@ module TalonOne
|
|
95
98
|
return true if self.equal?(o)
|
96
99
|
self.class == o.class &&
|
97
100
|
total_result_size == o.total_result_size &&
|
101
|
+
has_more == o.has_more &&
|
98
102
|
data == o.data
|
99
103
|
end
|
100
104
|
|
@@ -107,7 +111,7 @@ module TalonOne
|
|
107
111
|
# Calculates hash code according to all attributes.
|
108
112
|
# @return [Integer] Hash code
|
109
113
|
def hash
|
110
|
-
[total_result_size, data].hash
|
114
|
+
[total_result_size, has_more, data].hash
|
111
115
|
end
|
112
116
|
|
113
117
|
# Builds the object from hash
|
@@ -0,0 +1,227 @@
|
|
1
|
+
=begin
|
2
|
+
#Talon.One API
|
3
|
+
|
4
|
+
#Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`
|
5
|
+
|
6
|
+
The version of the OpenAPI document:
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module TalonOne
|
16
|
+
class InlineResponse20040
|
17
|
+
attr_accessor :total_result_size
|
18
|
+
|
19
|
+
attr_accessor :data
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'total_result_size' => :'totalResultSize',
|
25
|
+
:'data' => :'data'
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
29
|
+
# Attribute type mapping.
|
30
|
+
def self.openapi_types
|
31
|
+
{
|
32
|
+
:'total_result_size' => :'Integer',
|
33
|
+
:'data' => :'Array<Role>'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# List of attributes with nullable: true
|
38
|
+
def self.openapi_nullable
|
39
|
+
Set.new([
|
40
|
+
])
|
41
|
+
end
|
42
|
+
|
43
|
+
# Initializes the object
|
44
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
45
|
+
def initialize(attributes = {})
|
46
|
+
if (!attributes.is_a?(Hash))
|
47
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `TalonOne::InlineResponse20040` initialize method"
|
48
|
+
end
|
49
|
+
|
50
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
51
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
52
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
53
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `TalonOne::InlineResponse20040`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
54
|
+
end
|
55
|
+
h[k.to_sym] = v
|
56
|
+
}
|
57
|
+
|
58
|
+
if attributes.key?(:'total_result_size')
|
59
|
+
self.total_result_size = attributes[:'total_result_size']
|
60
|
+
end
|
61
|
+
|
62
|
+
if attributes.key?(:'data')
|
63
|
+
if (value = attributes[:'data']).is_a?(Array)
|
64
|
+
self.data = value
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
70
|
+
# @return Array for valid properties with the reasons
|
71
|
+
def list_invalid_properties
|
72
|
+
invalid_properties = Array.new
|
73
|
+
if @total_result_size.nil?
|
74
|
+
invalid_properties.push('invalid value for "total_result_size", total_result_size cannot be nil.')
|
75
|
+
end
|
76
|
+
|
77
|
+
if @data.nil?
|
78
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
79
|
+
end
|
80
|
+
|
81
|
+
invalid_properties
|
82
|
+
end
|
83
|
+
|
84
|
+
# Check to see if the all the properties in the model are valid
|
85
|
+
# @return true if the model is valid
|
86
|
+
def valid?
|
87
|
+
return false if @total_result_size.nil?
|
88
|
+
return false if @data.nil?
|
89
|
+
true
|
90
|
+
end
|
91
|
+
|
92
|
+
# Checks equality by comparing each attribute.
|
93
|
+
# @param [Object] Object to be compared
|
94
|
+
def ==(o)
|
95
|
+
return true if self.equal?(o)
|
96
|
+
self.class == o.class &&
|
97
|
+
total_result_size == o.total_result_size &&
|
98
|
+
data == o.data
|
99
|
+
end
|
100
|
+
|
101
|
+
# @see the `==` method
|
102
|
+
# @param [Object] Object to be compared
|
103
|
+
def eql?(o)
|
104
|
+
self == o
|
105
|
+
end
|
106
|
+
|
107
|
+
# Calculates hash code according to all attributes.
|
108
|
+
# @return [Integer] Hash code
|
109
|
+
def hash
|
110
|
+
[total_result_size, data].hash
|
111
|
+
end
|
112
|
+
|
113
|
+
# Builds the object from hash
|
114
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
115
|
+
# @return [Object] Returns the model itself
|
116
|
+
def self.build_from_hash(attributes)
|
117
|
+
new.build_from_hash(attributes)
|
118
|
+
end
|
119
|
+
|
120
|
+
# Builds the object from hash
|
121
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
122
|
+
# @return [Object] Returns the model itself
|
123
|
+
def build_from_hash(attributes)
|
124
|
+
return nil unless attributes.is_a?(Hash)
|
125
|
+
self.class.openapi_types.each_pair do |key, type|
|
126
|
+
if type =~ /\AArray<(.*)>/i
|
127
|
+
# check to ensure the input is an array given that the attribute
|
128
|
+
# is documented as an array but the input is not
|
129
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
130
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
131
|
+
end
|
132
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
133
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
134
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
135
|
+
end
|
136
|
+
|
137
|
+
self
|
138
|
+
end
|
139
|
+
|
140
|
+
# Deserializes the data based on type
|
141
|
+
# @param string type Data type
|
142
|
+
# @param string value Value to be deserialized
|
143
|
+
# @return [Object] Deserialized data
|
144
|
+
def _deserialize(type, value)
|
145
|
+
case type.to_sym
|
146
|
+
when :DateTime
|
147
|
+
DateTime.parse(value)
|
148
|
+
when :Date
|
149
|
+
Date.parse(value)
|
150
|
+
when :String
|
151
|
+
value.to_s
|
152
|
+
when :Integer
|
153
|
+
value.to_i
|
154
|
+
when :Float
|
155
|
+
value.to_f
|
156
|
+
when :Boolean
|
157
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
158
|
+
true
|
159
|
+
else
|
160
|
+
false
|
161
|
+
end
|
162
|
+
when :Object
|
163
|
+
# generic object (usually a Hash), return directly
|
164
|
+
value
|
165
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
166
|
+
inner_type = Regexp.last_match[:inner_type]
|
167
|
+
value.map { |v| _deserialize(inner_type, v) }
|
168
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
169
|
+
k_type = Regexp.last_match[:k_type]
|
170
|
+
v_type = Regexp.last_match[:v_type]
|
171
|
+
{}.tap do |hash|
|
172
|
+
value.each do |k, v|
|
173
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
else # model
|
177
|
+
TalonOne.const_get(type).build_from_hash(value)
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
# Returns the string representation of the object
|
182
|
+
# @return [String] String presentation of the object
|
183
|
+
def to_s
|
184
|
+
to_hash.to_s
|
185
|
+
end
|
186
|
+
|
187
|
+
# to_body is an alias to to_hash (backward compatibility)
|
188
|
+
# @return [Hash] Returns the object in the form of hash
|
189
|
+
def to_body
|
190
|
+
to_hash
|
191
|
+
end
|
192
|
+
|
193
|
+
# Returns the object in the form of hash
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
195
|
+
def to_hash
|
196
|
+
hash = {}
|
197
|
+
self.class.attribute_map.each_pair do |attr, param|
|
198
|
+
value = self.send(attr)
|
199
|
+
if value.nil?
|
200
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
201
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
202
|
+
end
|
203
|
+
|
204
|
+
hash[param] = _to_hash(value)
|
205
|
+
end
|
206
|
+
hash
|
207
|
+
end
|
208
|
+
|
209
|
+
# Outputs non-array value in the form of hash
|
210
|
+
# For object, use to_hash. Otherwise, just return the value
|
211
|
+
# @param [Object] value Any valid value
|
212
|
+
# @return [Hash] Returns the value in the form of hash
|
213
|
+
def _to_hash(value)
|
214
|
+
if value.is_a?(Array)
|
215
|
+
value.compact.map { |v| _to_hash(v) }
|
216
|
+
elsif value.is_a?(Hash)
|
217
|
+
{}.tap do |hash|
|
218
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
219
|
+
end
|
220
|
+
elsif value.respond_to? :to_hash
|
221
|
+
value.to_hash
|
222
|
+
else
|
223
|
+
value
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
227
|
+
end
|
@@ -14,14 +14,14 @@ require 'date'
|
|
14
14
|
|
15
15
|
module TalonOne
|
16
16
|
class InlineResponse2007
|
17
|
-
attr_accessor :
|
17
|
+
attr_accessor :total_result_size
|
18
18
|
|
19
19
|
attr_accessor :data
|
20
20
|
|
21
21
|
# Attribute mapping from ruby-style variable name to JSON key.
|
22
22
|
def self.attribute_map
|
23
23
|
{
|
24
|
-
:'
|
24
|
+
:'total_result_size' => :'totalResultSize',
|
25
25
|
:'data' => :'data'
|
26
26
|
}
|
27
27
|
end
|
@@ -29,7 +29,7 @@ module TalonOne
|
|
29
29
|
# Attribute type mapping.
|
30
30
|
def self.openapi_types
|
31
31
|
{
|
32
|
-
:'
|
32
|
+
:'total_result_size' => :'Integer',
|
33
33
|
:'data' => :'Array<Coupon>'
|
34
34
|
}
|
35
35
|
end
|
@@ -55,8 +55,8 @@ module TalonOne
|
|
55
55
|
h[k.to_sym] = v
|
56
56
|
}
|
57
57
|
|
58
|
-
if attributes.key?(:'
|
59
|
-
self.
|
58
|
+
if attributes.key?(:'total_result_size')
|
59
|
+
self.total_result_size = attributes[:'total_result_size']
|
60
60
|
end
|
61
61
|
|
62
62
|
if attributes.key?(:'data')
|
@@ -70,8 +70,8 @@ module TalonOne
|
|
70
70
|
# @return Array for valid properties with the reasons
|
71
71
|
def list_invalid_properties
|
72
72
|
invalid_properties = Array.new
|
73
|
-
if @
|
74
|
-
invalid_properties.push('invalid value for "
|
73
|
+
if @total_result_size.nil?
|
74
|
+
invalid_properties.push('invalid value for "total_result_size", total_result_size cannot be nil.')
|
75
75
|
end
|
76
76
|
|
77
77
|
if @data.nil?
|
@@ -84,7 +84,7 @@ module TalonOne
|
|
84
84
|
# Check to see if the all the properties in the model are valid
|
85
85
|
# @return true if the model is valid
|
86
86
|
def valid?
|
87
|
-
return false if @
|
87
|
+
return false if @total_result_size.nil?
|
88
88
|
return false if @data.nil?
|
89
89
|
true
|
90
90
|
end
|
@@ -94,7 +94,7 @@ module TalonOne
|
|
94
94
|
def ==(o)
|
95
95
|
return true if self.equal?(o)
|
96
96
|
self.class == o.class &&
|
97
|
-
|
97
|
+
total_result_size == o.total_result_size &&
|
98
98
|
data == o.data
|
99
99
|
end
|
100
100
|
|
@@ -107,7 +107,7 @@ module TalonOne
|
|
107
107
|
# Calculates hash code according to all attributes.
|
108
108
|
# @return [Integer] Hash code
|
109
109
|
def hash
|
110
|
-
[
|
110
|
+
[total_result_size, data].hash
|
111
111
|
end
|
112
112
|
|
113
113
|
# Builds the object from hash
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
|
15
15
|
module TalonOne
|
16
16
|
class MultiApplicationEntity
|
17
|
-
# The IDs of the
|
17
|
+
# The IDs of the Applications that are related to this entity.
|
18
18
|
attr_accessor :application_ids
|
19
19
|
|
20
20
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -15,7 +15,7 @@ require 'date'
|
|
15
15
|
module TalonOne
|
16
16
|
#
|
17
17
|
class NewCustomEffect
|
18
|
-
# The IDs of the
|
18
|
+
# The IDs of the Applications that are related to this entity.
|
19
19
|
attr_accessor :application_ids
|
20
20
|
|
21
21
|
# Indicates if this effect is per item or not.
|
@@ -0,0 +1,229 @@
|
|
1
|
+
=begin
|
2
|
+
#Talon.One API
|
3
|
+
|
4
|
+
#Use the Talon.One API to integrate with your application and to manage applications and campaigns: - Use the operations in the [Integration API section](#integration-api) are used to integrate with our platform - Use the operation in the [Management API section](#management-api) to manage applications and campaigns. ## Determining the base URL of the endpoints The API is available at the same hostname as your Campaign Manager deployment. For example, if you access the Campaign Manager at `https://yourbaseurl.talon.one/`, the URL for the [updateCustomerSessionV2](https://docs.talon.one/integration-api#operation/updateCustomerSessionV2) endpoint is `https://yourbaseurl.talon.one/v2/customer_sessions/{Id}`
|
5
|
+
|
6
|
+
The version of the OpenAPI document:
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module TalonOne
|
16
|
+
class NewOutgoingIntegrationWebhook
|
17
|
+
# Webhook title.
|
18
|
+
attr_accessor :title
|
19
|
+
|
20
|
+
# IDs of the Applications to which a webhook must be linked.
|
21
|
+
attr_accessor :application_ids
|
22
|
+
|
23
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
24
|
+
def self.attribute_map
|
25
|
+
{
|
26
|
+
:'title' => :'title',
|
27
|
+
:'application_ids' => :'applicationIds'
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.openapi_types
|
33
|
+
{
|
34
|
+
:'title' => :'String',
|
35
|
+
:'application_ids' => :'Array<Integer>'
|
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 `TalonOne::NewOutgoingIntegrationWebhook` 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 `TalonOne::NewOutgoingIntegrationWebhook`. 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?(:'title')
|
61
|
+
self.title = attributes[:'title']
|
62
|
+
end
|
63
|
+
|
64
|
+
if attributes.key?(:'application_ids')
|
65
|
+
if (value = attributes[:'application_ids']).is_a?(Array)
|
66
|
+
self.application_ids = value
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
72
|
+
# @return Array for valid properties with the reasons
|
73
|
+
def list_invalid_properties
|
74
|
+
invalid_properties = Array.new
|
75
|
+
if @title.nil?
|
76
|
+
invalid_properties.push('invalid value for "title", title cannot be nil.')
|
77
|
+
end
|
78
|
+
|
79
|
+
if @application_ids.nil?
|
80
|
+
invalid_properties.push('invalid value for "application_ids", application_ids cannot be nil.')
|
81
|
+
end
|
82
|
+
|
83
|
+
invalid_properties
|
84
|
+
end
|
85
|
+
|
86
|
+
# Check to see if the all the properties in the model are valid
|
87
|
+
# @return true if the model is valid
|
88
|
+
def valid?
|
89
|
+
return false if @title.nil?
|
90
|
+
return false if @application_ids.nil?
|
91
|
+
true
|
92
|
+
end
|
93
|
+
|
94
|
+
# Checks equality by comparing each attribute.
|
95
|
+
# @param [Object] Object to be compared
|
96
|
+
def ==(o)
|
97
|
+
return true if self.equal?(o)
|
98
|
+
self.class == o.class &&
|
99
|
+
title == o.title &&
|
100
|
+
application_ids == o.application_ids
|
101
|
+
end
|
102
|
+
|
103
|
+
# @see the `==` method
|
104
|
+
# @param [Object] Object to be compared
|
105
|
+
def eql?(o)
|
106
|
+
self == o
|
107
|
+
end
|
108
|
+
|
109
|
+
# Calculates hash code according to all attributes.
|
110
|
+
# @return [Integer] Hash code
|
111
|
+
def hash
|
112
|
+
[title, application_ids].hash
|
113
|
+
end
|
114
|
+
|
115
|
+
# Builds the object from hash
|
116
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
117
|
+
# @return [Object] Returns the model itself
|
118
|
+
def self.build_from_hash(attributes)
|
119
|
+
new.build_from_hash(attributes)
|
120
|
+
end
|
121
|
+
|
122
|
+
# Builds the object from hash
|
123
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
124
|
+
# @return [Object] Returns the model itself
|
125
|
+
def build_from_hash(attributes)
|
126
|
+
return nil unless attributes.is_a?(Hash)
|
127
|
+
self.class.openapi_types.each_pair do |key, type|
|
128
|
+
if type =~ /\AArray<(.*)>/i
|
129
|
+
# check to ensure the input is an array given that the attribute
|
130
|
+
# is documented as an array but the input is not
|
131
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
132
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
133
|
+
end
|
134
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
135
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
136
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
137
|
+
end
|
138
|
+
|
139
|
+
self
|
140
|
+
end
|
141
|
+
|
142
|
+
# Deserializes the data based on type
|
143
|
+
# @param string type Data type
|
144
|
+
# @param string value Value to be deserialized
|
145
|
+
# @return [Object] Deserialized data
|
146
|
+
def _deserialize(type, value)
|
147
|
+
case type.to_sym
|
148
|
+
when :DateTime
|
149
|
+
DateTime.parse(value)
|
150
|
+
when :Date
|
151
|
+
Date.parse(value)
|
152
|
+
when :String
|
153
|
+
value.to_s
|
154
|
+
when :Integer
|
155
|
+
value.to_i
|
156
|
+
when :Float
|
157
|
+
value.to_f
|
158
|
+
when :Boolean
|
159
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
160
|
+
true
|
161
|
+
else
|
162
|
+
false
|
163
|
+
end
|
164
|
+
when :Object
|
165
|
+
# generic object (usually a Hash), return directly
|
166
|
+
value
|
167
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
168
|
+
inner_type = Regexp.last_match[:inner_type]
|
169
|
+
value.map { |v| _deserialize(inner_type, v) }
|
170
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
171
|
+
k_type = Regexp.last_match[:k_type]
|
172
|
+
v_type = Regexp.last_match[:v_type]
|
173
|
+
{}.tap do |hash|
|
174
|
+
value.each do |k, v|
|
175
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
176
|
+
end
|
177
|
+
end
|
178
|
+
else # model
|
179
|
+
TalonOne.const_get(type).build_from_hash(value)
|
180
|
+
end
|
181
|
+
end
|
182
|
+
|
183
|
+
# Returns the string representation of the object
|
184
|
+
# @return [String] String presentation of the object
|
185
|
+
def to_s
|
186
|
+
to_hash.to_s
|
187
|
+
end
|
188
|
+
|
189
|
+
# to_body is an alias to to_hash (backward compatibility)
|
190
|
+
# @return [Hash] Returns the object in the form of hash
|
191
|
+
def to_body
|
192
|
+
to_hash
|
193
|
+
end
|
194
|
+
|
195
|
+
# Returns the object in the form of hash
|
196
|
+
# @return [Hash] Returns the object in the form of hash
|
197
|
+
def to_hash
|
198
|
+
hash = {}
|
199
|
+
self.class.attribute_map.each_pair do |attr, param|
|
200
|
+
value = self.send(attr)
|
201
|
+
if value.nil?
|
202
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
203
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
204
|
+
end
|
205
|
+
|
206
|
+
hash[param] = _to_hash(value)
|
207
|
+
end
|
208
|
+
hash
|
209
|
+
end
|
210
|
+
|
211
|
+
# Outputs non-array value in the form of hash
|
212
|
+
# For object, use to_hash. Otherwise, just return the value
|
213
|
+
# @param [Object] value Any valid value
|
214
|
+
# @return [Hash] Returns the value in the form of hash
|
215
|
+
def _to_hash(value)
|
216
|
+
if value.is_a?(Array)
|
217
|
+
value.compact.map { |v| _to_hash(v) }
|
218
|
+
elsif value.is_a?(Hash)
|
219
|
+
{}.tap do |hash|
|
220
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
221
|
+
end
|
222
|
+
elsif value.respond_to? :to_hash
|
223
|
+
value.to_hash
|
224
|
+
else
|
225
|
+
value
|
226
|
+
end
|
227
|
+
end
|
228
|
+
end
|
229
|
+
end
|