ultracart_api 4.1.96 → 4.1.98
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 +11 -3
- data/docs/Coupon.md +2 -0
- data/docs/CouponAmountOffItemsAndFreeShipping.md +28 -0
- data/docs/FraudApi.md +58 -4
- data/docs/FraudLookupAffiliate.md +20 -0
- data/docs/FraudLookupGateway.md +22 -0
- data/docs/FraudLookupTheme.md +22 -0
- data/docs/FraudLookupValues.md +16 -6
- data/docs/FraudRuleFromOrderRequest.md +30 -0
- data/docs/FraudRuleInsertRequest.md +13 -13
- data/docs/FraudRulePublic.md +25 -25
- data/docs/FraudRuleSearchRequest.md +16 -16
- data/lib/ultracart_api/api/fraud_api.rb +73 -4
- data/lib/ultracart_api/models/coupon.rb +10 -1
- data/lib/ultracart_api/models/coupon_amount_off_items_and_free_shipping.rb +291 -0
- data/lib/ultracart_api/models/fraud_lookup_affiliate.rb +230 -0
- data/lib/ultracart_api/models/fraud_lookup_gateway.rb +240 -0
- data/lib/ultracart_api/models/fraud_lookup_theme.rb +240 -0
- data/lib/ultracart_api/models/fraud_lookup_values.rb +83 -13
- data/lib/ultracart_api/models/fraud_rule_from_order_request.rb +314 -0
- data/lib/ultracart_api/models/fraud_rule_insert_request.rb +25 -8
- data/lib/ultracart_api/models/fraud_rule_public.rb +28 -2
- data/lib/ultracart_api/models/fraud_rule_search_request.rb +16 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +5 -0
- metadata +12 -2
|
@@ -0,0 +1,240 @@
|
|
|
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 FraudLookupGateway
|
|
18
|
+
# Code of the rotating transaction gateway.
|
|
19
|
+
attr_accessor :code
|
|
20
|
+
|
|
21
|
+
# Display name of the rotating transaction gateway.
|
|
22
|
+
attr_accessor :name
|
|
23
|
+
|
|
24
|
+
# Oid of the rotating transaction gateway. Use this value in rotating_transaction_gateway_filters on insert.
|
|
25
|
+
attr_accessor :rotating_transaction_gateway_oid
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'code' => :'code',
|
|
31
|
+
:'name' => :'name',
|
|
32
|
+
:'rotating_transaction_gateway_oid' => :'rotating_transaction_gateway_oid'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'code' => :'String',
|
|
45
|
+
:'name' => :'String',
|
|
46
|
+
:'rotating_transaction_gateway_oid' => :'Integer'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::FraudLookupGateway` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
65
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::FraudLookupGateway`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
67
|
+
end
|
|
68
|
+
h[k.to_sym] = v
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if attributes.key?(:'code')
|
|
72
|
+
self.code = attributes[:'code']
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'name')
|
|
76
|
+
self.name = attributes[:'name']
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'rotating_transaction_gateway_oid')
|
|
80
|
+
self.rotating_transaction_gateway_oid = attributes[:'rotating_transaction_gateway_oid']
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
85
|
+
# @return Array for valid properties with the reasons
|
|
86
|
+
def list_invalid_properties
|
|
87
|
+
invalid_properties = Array.new
|
|
88
|
+
invalid_properties
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Check to see if the all the properties in the model are valid
|
|
92
|
+
# @return true if the model is valid
|
|
93
|
+
def valid?
|
|
94
|
+
true
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Checks equality by comparing each attribute.
|
|
98
|
+
# @param [Object] Object to be compared
|
|
99
|
+
def ==(o)
|
|
100
|
+
return true if self.equal?(o)
|
|
101
|
+
self.class == o.class &&
|
|
102
|
+
code == o.code &&
|
|
103
|
+
name == o.name &&
|
|
104
|
+
rotating_transaction_gateway_oid == o.rotating_transaction_gateway_oid
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# @see the `==` method
|
|
108
|
+
# @param [Object] Object to be compared
|
|
109
|
+
def eql?(o)
|
|
110
|
+
self == o
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Calculates hash code according to all attributes.
|
|
114
|
+
# @return [Integer] Hash code
|
|
115
|
+
def hash
|
|
116
|
+
[code, name, rotating_transaction_gateway_oid].hash
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Builds the object from hash
|
|
120
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
121
|
+
# @return [Object] Returns the model itself
|
|
122
|
+
def self.build_from_hash(attributes)
|
|
123
|
+
new.build_from_hash(attributes)
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Builds the object from hash
|
|
127
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
128
|
+
# @return [Object] Returns the model itself
|
|
129
|
+
def build_from_hash(attributes)
|
|
130
|
+
return nil unless attributes.is_a?(Hash)
|
|
131
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
132
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
133
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
134
|
+
self.send("#{key}=", nil)
|
|
135
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
136
|
+
# check to ensure the input is an array given that the attribute
|
|
137
|
+
# is documented as an array but the input is not
|
|
138
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
139
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
140
|
+
end
|
|
141
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
142
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
self
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Deserializes the data based on type
|
|
150
|
+
# @param string type Data type
|
|
151
|
+
# @param string value Value to be deserialized
|
|
152
|
+
# @return [Object] Deserialized data
|
|
153
|
+
def _deserialize(type, value)
|
|
154
|
+
case type.to_sym
|
|
155
|
+
when :Time
|
|
156
|
+
Time.parse(value)
|
|
157
|
+
when :Date
|
|
158
|
+
Date.parse(value)
|
|
159
|
+
when :String
|
|
160
|
+
value.to_s
|
|
161
|
+
when :Integer
|
|
162
|
+
value.to_i
|
|
163
|
+
when :Float
|
|
164
|
+
value.to_f
|
|
165
|
+
when :Boolean
|
|
166
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
167
|
+
true
|
|
168
|
+
else
|
|
169
|
+
false
|
|
170
|
+
end
|
|
171
|
+
when :Object
|
|
172
|
+
# generic object (usually a Hash), return directly
|
|
173
|
+
value
|
|
174
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
175
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
176
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
177
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
178
|
+
k_type = Regexp.last_match[:k_type]
|
|
179
|
+
v_type = Regexp.last_match[:v_type]
|
|
180
|
+
{}.tap do |hash|
|
|
181
|
+
value.each do |k, v|
|
|
182
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
else # model
|
|
186
|
+
# models (e.g. Pet) or oneOf
|
|
187
|
+
klass = UltracartClient.const_get(type)
|
|
188
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Returns the string representation of the object
|
|
193
|
+
# @return [String] String presentation of the object
|
|
194
|
+
def to_s
|
|
195
|
+
to_hash.to_s
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
|
200
|
+
def to_body
|
|
201
|
+
to_hash
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Returns the object in the form of hash
|
|
205
|
+
# @return [Hash] Returns the object in the form of hash
|
|
206
|
+
def to_hash
|
|
207
|
+
hash = {}
|
|
208
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
209
|
+
value = self.send(attr)
|
|
210
|
+
if value.nil?
|
|
211
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
212
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
hash[param] = _to_hash(value)
|
|
216
|
+
end
|
|
217
|
+
hash
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Outputs non-array value in the form of hash
|
|
221
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
222
|
+
# @param [Object] value Any valid value
|
|
223
|
+
# @return [Hash] Returns the value in the form of hash
|
|
224
|
+
def _to_hash(value)
|
|
225
|
+
if value.is_a?(Array)
|
|
226
|
+
value.compact.map { |v| _to_hash(v) }
|
|
227
|
+
elsif value.is_a?(Hash)
|
|
228
|
+
{}.tap do |hash|
|
|
229
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
230
|
+
end
|
|
231
|
+
elsif value.respond_to? :to_hash
|
|
232
|
+
value.to_hash
|
|
233
|
+
else
|
|
234
|
+
value
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
end
|
|
@@ -0,0 +1,240 @@
|
|
|
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 FraudLookupTheme
|
|
18
|
+
# Code of the screen branding theme.
|
|
19
|
+
attr_accessor :code
|
|
20
|
+
|
|
21
|
+
# Oid of the screen branding theme. Use this value in screen_branding_theme_filters on insert.
|
|
22
|
+
attr_accessor :screen_branding_theme_oid
|
|
23
|
+
|
|
24
|
+
# Storefront hostname associated with this theme, when available.
|
|
25
|
+
attr_accessor :storefront_hostname
|
|
26
|
+
|
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
28
|
+
def self.attribute_map
|
|
29
|
+
{
|
|
30
|
+
:'code' => :'code',
|
|
31
|
+
:'screen_branding_theme_oid' => :'screen_branding_theme_oid',
|
|
32
|
+
:'storefront_hostname' => :'storefront_hostname'
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Returns all the JSON keys this model knows about
|
|
37
|
+
def self.acceptable_attributes
|
|
38
|
+
attribute_map.values
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute type mapping.
|
|
42
|
+
def self.openapi_types
|
|
43
|
+
{
|
|
44
|
+
:'code' => :'String',
|
|
45
|
+
:'screen_branding_theme_oid' => :'Integer',
|
|
46
|
+
:'storefront_hostname' => :'String'
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# List of attributes with nullable: true
|
|
51
|
+
def self.openapi_nullable
|
|
52
|
+
Set.new([
|
|
53
|
+
])
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Initializes the object
|
|
57
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
58
|
+
def initialize(attributes = {})
|
|
59
|
+
if (!attributes.is_a?(Hash))
|
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::FraudLookupTheme` initialize method"
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
65
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::FraudLookupTheme`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
67
|
+
end
|
|
68
|
+
h[k.to_sym] = v
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
if attributes.key?(:'code')
|
|
72
|
+
self.code = attributes[:'code']
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
if attributes.key?(:'screen_branding_theme_oid')
|
|
76
|
+
self.screen_branding_theme_oid = attributes[:'screen_branding_theme_oid']
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
if attributes.key?(:'storefront_hostname')
|
|
80
|
+
self.storefront_hostname = attributes[:'storefront_hostname']
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
85
|
+
# @return Array for valid properties with the reasons
|
|
86
|
+
def list_invalid_properties
|
|
87
|
+
invalid_properties = Array.new
|
|
88
|
+
invalid_properties
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
# Check to see if the all the properties in the model are valid
|
|
92
|
+
# @return true if the model is valid
|
|
93
|
+
def valid?
|
|
94
|
+
true
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Checks equality by comparing each attribute.
|
|
98
|
+
# @param [Object] Object to be compared
|
|
99
|
+
def ==(o)
|
|
100
|
+
return true if self.equal?(o)
|
|
101
|
+
self.class == o.class &&
|
|
102
|
+
code == o.code &&
|
|
103
|
+
screen_branding_theme_oid == o.screen_branding_theme_oid &&
|
|
104
|
+
storefront_hostname == o.storefront_hostname
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
# @see the `==` method
|
|
108
|
+
# @param [Object] Object to be compared
|
|
109
|
+
def eql?(o)
|
|
110
|
+
self == o
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Calculates hash code according to all attributes.
|
|
114
|
+
# @return [Integer] Hash code
|
|
115
|
+
def hash
|
|
116
|
+
[code, screen_branding_theme_oid, storefront_hostname].hash
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Builds the object from hash
|
|
120
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
121
|
+
# @return [Object] Returns the model itself
|
|
122
|
+
def self.build_from_hash(attributes)
|
|
123
|
+
new.build_from_hash(attributes)
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Builds the object from hash
|
|
127
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
128
|
+
# @return [Object] Returns the model itself
|
|
129
|
+
def build_from_hash(attributes)
|
|
130
|
+
return nil unless attributes.is_a?(Hash)
|
|
131
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
132
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
133
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
134
|
+
self.send("#{key}=", nil)
|
|
135
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
136
|
+
# check to ensure the input is an array given that the attribute
|
|
137
|
+
# is documented as an array but the input is not
|
|
138
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
139
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
140
|
+
end
|
|
141
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
142
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
143
|
+
end
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
self
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
# Deserializes the data based on type
|
|
150
|
+
# @param string type Data type
|
|
151
|
+
# @param string value Value to be deserialized
|
|
152
|
+
# @return [Object] Deserialized data
|
|
153
|
+
def _deserialize(type, value)
|
|
154
|
+
case type.to_sym
|
|
155
|
+
when :Time
|
|
156
|
+
Time.parse(value)
|
|
157
|
+
when :Date
|
|
158
|
+
Date.parse(value)
|
|
159
|
+
when :String
|
|
160
|
+
value.to_s
|
|
161
|
+
when :Integer
|
|
162
|
+
value.to_i
|
|
163
|
+
when :Float
|
|
164
|
+
value.to_f
|
|
165
|
+
when :Boolean
|
|
166
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
167
|
+
true
|
|
168
|
+
else
|
|
169
|
+
false
|
|
170
|
+
end
|
|
171
|
+
when :Object
|
|
172
|
+
# generic object (usually a Hash), return directly
|
|
173
|
+
value
|
|
174
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
175
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
176
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
177
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
178
|
+
k_type = Regexp.last_match[:k_type]
|
|
179
|
+
v_type = Regexp.last_match[:v_type]
|
|
180
|
+
{}.tap do |hash|
|
|
181
|
+
value.each do |k, v|
|
|
182
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
183
|
+
end
|
|
184
|
+
end
|
|
185
|
+
else # model
|
|
186
|
+
# models (e.g. Pet) or oneOf
|
|
187
|
+
klass = UltracartClient.const_get(type)
|
|
188
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
189
|
+
end
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
# Returns the string representation of the object
|
|
193
|
+
# @return [String] String presentation of the object
|
|
194
|
+
def to_s
|
|
195
|
+
to_hash.to_s
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
199
|
+
# @return [Hash] Returns the object in the form of hash
|
|
200
|
+
def to_body
|
|
201
|
+
to_hash
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
# Returns the object in the form of hash
|
|
205
|
+
# @return [Hash] Returns the object in the form of hash
|
|
206
|
+
def to_hash
|
|
207
|
+
hash = {}
|
|
208
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
209
|
+
value = self.send(attr)
|
|
210
|
+
if value.nil?
|
|
211
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
212
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
hash[param] = _to_hash(value)
|
|
216
|
+
end
|
|
217
|
+
hash
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Outputs non-array value in the form of hash
|
|
221
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
222
|
+
# @param [Object] value Any valid value
|
|
223
|
+
# @return [Hash] Returns the value in the form of hash
|
|
224
|
+
def _to_hash(value)
|
|
225
|
+
if value.is_a?(Array)
|
|
226
|
+
value.compact.map { |v| _to_hash(v) }
|
|
227
|
+
elsif value.is_a?(Hash)
|
|
228
|
+
{}.tap do |hash|
|
|
229
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
230
|
+
end
|
|
231
|
+
elsif value.respond_to? :to_hash
|
|
232
|
+
value.to_hash
|
|
233
|
+
else
|
|
234
|
+
value
|
|
235
|
+
end
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
end
|
|
@@ -18,30 +18,50 @@ module UltracartClient
|
|
|
18
18
|
# Affiliates with non-empty email, sorted by email.
|
|
19
19
|
attr_accessor :affiliates
|
|
20
20
|
|
|
21
|
+
# Valid values for avs_match_type on the 'address street and zip avs' rule type.
|
|
22
|
+
attr_accessor :avs_match_types
|
|
23
|
+
|
|
21
24
|
# ISO country codes available to this merchant.
|
|
22
25
|
attr_accessor :countries
|
|
23
26
|
|
|
27
|
+
# Valid values for failure_action on insert and search requests.
|
|
28
|
+
attr_accessor :failure_actions
|
|
29
|
+
|
|
24
30
|
# Valid values for ip_range_type on IP-based rules.
|
|
25
31
|
attr_accessor :ip_range_types
|
|
26
32
|
|
|
27
33
|
# True when this merchant has at least one linked merchant account.
|
|
28
34
|
attr_accessor :linked_accounts
|
|
29
35
|
|
|
36
|
+
# Rotating transaction gateways configured for this merchant. Use the oid as a value in rotating_transaction_gateway_filters on insert.
|
|
37
|
+
attr_accessor :rotating_transaction_gateways
|
|
38
|
+
|
|
30
39
|
# Valid values for rule_group on search requests.
|
|
31
40
|
attr_accessor :rule_groups
|
|
32
41
|
|
|
33
42
|
# Valid values for rule_type on insert and search requests.
|
|
34
43
|
attr_accessor :rule_types
|
|
35
44
|
|
|
45
|
+
# Screen branding themes configured for this merchant. Use the oid as a value in screen_branding_theme_filters on insert.
|
|
46
|
+
attr_accessor :screen_branding_themes
|
|
47
|
+
|
|
48
|
+
# Valid values for user_action on rule types that distinguish between attempted and approved transactions.
|
|
49
|
+
attr_accessor :user_actions
|
|
50
|
+
|
|
36
51
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
52
|
def self.attribute_map
|
|
38
53
|
{
|
|
39
54
|
:'affiliates' => :'affiliates',
|
|
55
|
+
:'avs_match_types' => :'avs_match_types',
|
|
40
56
|
:'countries' => :'countries',
|
|
57
|
+
:'failure_actions' => :'failure_actions',
|
|
41
58
|
:'ip_range_types' => :'ip_range_types',
|
|
42
59
|
:'linked_accounts' => :'linked_accounts',
|
|
60
|
+
:'rotating_transaction_gateways' => :'rotating_transaction_gateways',
|
|
43
61
|
:'rule_groups' => :'rule_groups',
|
|
44
|
-
:'rule_types' => :'rule_types'
|
|
62
|
+
:'rule_types' => :'rule_types',
|
|
63
|
+
:'screen_branding_themes' => :'screen_branding_themes',
|
|
64
|
+
:'user_actions' => :'user_actions'
|
|
45
65
|
}
|
|
46
66
|
end
|
|
47
67
|
|
|
@@ -53,12 +73,17 @@ module UltracartClient
|
|
|
53
73
|
# Attribute type mapping.
|
|
54
74
|
def self.openapi_types
|
|
55
75
|
{
|
|
56
|
-
:'affiliates' => :'
|
|
57
|
-
:'
|
|
58
|
-
:'
|
|
76
|
+
:'affiliates' => :'Array<FraudLookupAffiliate>',
|
|
77
|
+
:'avs_match_types' => :'Array<String>',
|
|
78
|
+
:'countries' => :'Array<String>',
|
|
79
|
+
:'failure_actions' => :'Array<String>',
|
|
80
|
+
:'ip_range_types' => :'Array<String>',
|
|
59
81
|
:'linked_accounts' => :'Boolean',
|
|
60
|
-
:'
|
|
61
|
-
:'
|
|
82
|
+
:'rotating_transaction_gateways' => :'Array<FraudLookupGateway>',
|
|
83
|
+
:'rule_groups' => :'Array<String>',
|
|
84
|
+
:'rule_types' => :'Array<String>',
|
|
85
|
+
:'screen_branding_themes' => :'Array<FraudLookupTheme>',
|
|
86
|
+
:'user_actions' => :'Array<String>'
|
|
62
87
|
}
|
|
63
88
|
end
|
|
64
89
|
|
|
@@ -84,27 +109,67 @@ module UltracartClient
|
|
|
84
109
|
}
|
|
85
110
|
|
|
86
111
|
if attributes.key?(:'affiliates')
|
|
87
|
-
|
|
112
|
+
if (value = attributes[:'affiliates']).is_a?(Array)
|
|
113
|
+
self.affiliates = value
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
if attributes.key?(:'avs_match_types')
|
|
118
|
+
if (value = attributes[:'avs_match_types']).is_a?(Array)
|
|
119
|
+
self.avs_match_types = value
|
|
120
|
+
end
|
|
88
121
|
end
|
|
89
122
|
|
|
90
123
|
if attributes.key?(:'countries')
|
|
91
|
-
|
|
124
|
+
if (value = attributes[:'countries']).is_a?(Array)
|
|
125
|
+
self.countries = value
|
|
126
|
+
end
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
if attributes.key?(:'failure_actions')
|
|
130
|
+
if (value = attributes[:'failure_actions']).is_a?(Array)
|
|
131
|
+
self.failure_actions = value
|
|
132
|
+
end
|
|
92
133
|
end
|
|
93
134
|
|
|
94
135
|
if attributes.key?(:'ip_range_types')
|
|
95
|
-
|
|
136
|
+
if (value = attributes[:'ip_range_types']).is_a?(Array)
|
|
137
|
+
self.ip_range_types = value
|
|
138
|
+
end
|
|
96
139
|
end
|
|
97
140
|
|
|
98
141
|
if attributes.key?(:'linked_accounts')
|
|
99
142
|
self.linked_accounts = attributes[:'linked_accounts']
|
|
100
143
|
end
|
|
101
144
|
|
|
145
|
+
if attributes.key?(:'rotating_transaction_gateways')
|
|
146
|
+
if (value = attributes[:'rotating_transaction_gateways']).is_a?(Array)
|
|
147
|
+
self.rotating_transaction_gateways = value
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
|
|
102
151
|
if attributes.key?(:'rule_groups')
|
|
103
|
-
|
|
152
|
+
if (value = attributes[:'rule_groups']).is_a?(Array)
|
|
153
|
+
self.rule_groups = value
|
|
154
|
+
end
|
|
104
155
|
end
|
|
105
156
|
|
|
106
157
|
if attributes.key?(:'rule_types')
|
|
107
|
-
|
|
158
|
+
if (value = attributes[:'rule_types']).is_a?(Array)
|
|
159
|
+
self.rule_types = value
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
if attributes.key?(:'screen_branding_themes')
|
|
164
|
+
if (value = attributes[:'screen_branding_themes']).is_a?(Array)
|
|
165
|
+
self.screen_branding_themes = value
|
|
166
|
+
end
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if attributes.key?(:'user_actions')
|
|
170
|
+
if (value = attributes[:'user_actions']).is_a?(Array)
|
|
171
|
+
self.user_actions = value
|
|
172
|
+
end
|
|
108
173
|
end
|
|
109
174
|
end
|
|
110
175
|
|
|
@@ -127,11 +192,16 @@ module UltracartClient
|
|
|
127
192
|
return true if self.equal?(o)
|
|
128
193
|
self.class == o.class &&
|
|
129
194
|
affiliates == o.affiliates &&
|
|
195
|
+
avs_match_types == o.avs_match_types &&
|
|
130
196
|
countries == o.countries &&
|
|
197
|
+
failure_actions == o.failure_actions &&
|
|
131
198
|
ip_range_types == o.ip_range_types &&
|
|
132
199
|
linked_accounts == o.linked_accounts &&
|
|
200
|
+
rotating_transaction_gateways == o.rotating_transaction_gateways &&
|
|
133
201
|
rule_groups == o.rule_groups &&
|
|
134
|
-
rule_types == o.rule_types
|
|
202
|
+
rule_types == o.rule_types &&
|
|
203
|
+
screen_branding_themes == o.screen_branding_themes &&
|
|
204
|
+
user_actions == o.user_actions
|
|
135
205
|
end
|
|
136
206
|
|
|
137
207
|
# @see the `==` method
|
|
@@ -143,7 +213,7 @@ module UltracartClient
|
|
|
143
213
|
# Calculates hash code according to all attributes.
|
|
144
214
|
# @return [Integer] Hash code
|
|
145
215
|
def hash
|
|
146
|
-
[affiliates, countries, ip_range_types, linked_accounts, rule_groups, rule_types].hash
|
|
216
|
+
[affiliates, avs_match_types, countries, failure_actions, ip_range_types, linked_accounts, rotating_transaction_gateways, rule_groups, rule_types, screen_branding_themes, user_actions].hash
|
|
147
217
|
end
|
|
148
218
|
|
|
149
219
|
# Builds the object from hash
|