ultracart_api 4.1.233 → 4.1.234
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 +8 -2
- data/docs/SfvbApi.md +119 -5
- data/docs/SfvbApprovalParams.md +1 -1
- data/docs/SfvbCommsLookupOwner.md +2 -0
- data/docs/SfvbCommsLookupResponse.md +2 -0
- data/docs/SfvbPreviewTrackingHtmlRequest.md +20 -0
- data/docs/SfvbServerLog.md +1 -1
- data/docs/SfvbTrackingHtmlRenderRequest.md +20 -0
- data/docs/SfvbTrackingHtmlRenderResponse.md +32 -0
- data/docs/SfvbTrackingProvider.md +2 -0
- data/lib/ultracart_api/api/sfvb_api.rb +172 -4
- data/lib/ultracart_api/models/sfvb_approval_params.rb +1 -1
- data/lib/ultracart_api/models/sfvb_comms_lookup_owner.rb +11 -1
- data/lib/ultracart_api/models/sfvb_comms_lookup_response.rb +11 -1
- data/lib/ultracart_api/models/sfvb_preview_tracking_html_request.rb +230 -0
- data/lib/ultracart_api/models/sfvb_server_log.rb +1 -1
- data/lib/ultracart_api/models/sfvb_tracking_html_render_request.rb +230 -0
- data/lib/ultracart_api/models/sfvb_tracking_html_render_response.rb +328 -0
- data/lib/ultracart_api/models/sfvb_tracking_provider.rb +11 -1
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +3 -0
- metadata +8 -2
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#UltraCart Rest API V2
|
|
3
|
+
|
|
4
|
+
#UltraCart REST API Version 2
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
|
7
|
+
Contact: support@ultracart.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 6.0.1-SNAPSHOT
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module UltracartClient
|
|
17
|
+
class SfvbTrackingHtmlRenderRequest
|
|
18
|
+
# HTML to render instead of the stored slot, such as a draft about to be written. The same checks as a write apply. Left out, the stored slot is rendered.
|
|
19
|
+
attr_accessor :content
|
|
20
|
+
|
|
21
|
+
# A test order on this account, as sf orders test-orders lists them. A real or unknown order is refused the same way.
|
|
22
|
+
attr_accessor :order_id
|
|
23
|
+
|
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
25
|
+
def self.attribute_map
|
|
26
|
+
{
|
|
27
|
+
:'content' => :'content',
|
|
28
|
+
:'order_id' => :'order_id'
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Returns all the JSON keys this model knows about
|
|
33
|
+
def self.acceptable_attributes
|
|
34
|
+
attribute_map.values
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Attribute type mapping.
|
|
38
|
+
def self.openapi_types
|
|
39
|
+
{
|
|
40
|
+
:'content' => :'String',
|
|
41
|
+
:'order_id' => :'String'
|
|
42
|
+
}
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# List of attributes with nullable: true
|
|
46
|
+
def self.openapi_nullable
|
|
47
|
+
Set.new([
|
|
48
|
+
])
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# Initializes the object
|
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
if (!attributes.is_a?(Hash))
|
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbTrackingHtmlRenderRequest` initialize method"
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
60
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbTrackingHtmlRenderRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
62
|
+
end
|
|
63
|
+
h[k.to_sym] = v
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
if attributes.key?(:'content')
|
|
67
|
+
self.content = attributes[:'content']
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
if attributes.key?(:'order_id')
|
|
71
|
+
self.order_id = attributes[:'order_id']
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
76
|
+
# @return Array for valid properties with the reasons
|
|
77
|
+
def list_invalid_properties
|
|
78
|
+
invalid_properties = Array.new
|
|
79
|
+
invalid_properties
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
# Check to see if the all the properties in the model are valid
|
|
83
|
+
# @return true if the model is valid
|
|
84
|
+
def valid?
|
|
85
|
+
true
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Checks equality by comparing each attribute.
|
|
89
|
+
# @param [Object] Object to be compared
|
|
90
|
+
def ==(o)
|
|
91
|
+
return true if self.equal?(o)
|
|
92
|
+
self.class == o.class &&
|
|
93
|
+
content == o.content &&
|
|
94
|
+
order_id == o.order_id
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# @see the `==` method
|
|
98
|
+
# @param [Object] Object to be compared
|
|
99
|
+
def eql?(o)
|
|
100
|
+
self == o
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Calculates hash code according to all attributes.
|
|
104
|
+
# @return [Integer] Hash code
|
|
105
|
+
def hash
|
|
106
|
+
[content, order_id].hash
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Builds the object from hash
|
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
111
|
+
# @return [Object] Returns the model itself
|
|
112
|
+
def self.build_from_hash(attributes)
|
|
113
|
+
new.build_from_hash(attributes)
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Builds the object from hash
|
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
118
|
+
# @return [Object] Returns the model itself
|
|
119
|
+
def build_from_hash(attributes)
|
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
|
121
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
122
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
123
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
124
|
+
self.send("#{key}=", nil)
|
|
125
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
126
|
+
# check to ensure the input is an array given that the attribute
|
|
127
|
+
# is documented as an array but the input is not
|
|
128
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
129
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
130
|
+
end
|
|
131
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
132
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
self
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Deserializes the data based on type
|
|
140
|
+
# @param string type Data type
|
|
141
|
+
# @param string value Value to be deserialized
|
|
142
|
+
# @return [Object] Deserialized data
|
|
143
|
+
def _deserialize(type, value)
|
|
144
|
+
case type.to_sym
|
|
145
|
+
when :Time
|
|
146
|
+
Time.parse(value)
|
|
147
|
+
when :Date
|
|
148
|
+
Date.parse(value)
|
|
149
|
+
when :String
|
|
150
|
+
value.to_s
|
|
151
|
+
when :Integer
|
|
152
|
+
value.to_i
|
|
153
|
+
when :Float
|
|
154
|
+
value.to_f
|
|
155
|
+
when :Boolean
|
|
156
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
157
|
+
true
|
|
158
|
+
else
|
|
159
|
+
false
|
|
160
|
+
end
|
|
161
|
+
when :Object
|
|
162
|
+
# generic object (usually a Hash), return directly
|
|
163
|
+
value
|
|
164
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
165
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
166
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
167
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
168
|
+
k_type = Regexp.last_match[:k_type]
|
|
169
|
+
v_type = Regexp.last_match[:v_type]
|
|
170
|
+
{}.tap do |hash|
|
|
171
|
+
value.each do |k, v|
|
|
172
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
173
|
+
end
|
|
174
|
+
end
|
|
175
|
+
else # model
|
|
176
|
+
# models (e.g. Pet) or oneOf
|
|
177
|
+
klass = UltracartClient.const_get(type)
|
|
178
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
179
|
+
end
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
# Returns the string representation of the object
|
|
183
|
+
# @return [String] String presentation of the object
|
|
184
|
+
def to_s
|
|
185
|
+
to_hash.to_s
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
|
190
|
+
def to_body
|
|
191
|
+
to_hash
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# Returns the object in the form of hash
|
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
|
196
|
+
def to_hash
|
|
197
|
+
hash = {}
|
|
198
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
199
|
+
value = self.send(attr)
|
|
200
|
+
if value.nil?
|
|
201
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
202
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
hash[param] = _to_hash(value)
|
|
206
|
+
end
|
|
207
|
+
hash
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# Outputs non-array value in the form of hash
|
|
211
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
212
|
+
# @param [Object] value Any valid value
|
|
213
|
+
# @return [Hash] Returns the value in the form of hash
|
|
214
|
+
def _to_hash(value)
|
|
215
|
+
if value.is_a?(Array)
|
|
216
|
+
value.compact.map { |v| _to_hash(v) }
|
|
217
|
+
elsif value.is_a?(Hash)
|
|
218
|
+
{}.tap do |hash|
|
|
219
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
220
|
+
end
|
|
221
|
+
elsif value.respond_to? :to_hash
|
|
222
|
+
value.to_hash
|
|
223
|
+
else
|
|
224
|
+
value
|
|
225
|
+
end
|
|
226
|
+
end
|
|
227
|
+
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
end
|
|
@@ -0,0 +1,328 @@
|
|
|
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 SfvbTrackingHtmlRenderResponse
|
|
18
|
+
# The SHA-256 of the HTML rendered, before rendering, as the slot would store it. For a draft, the hash a tracking_html.put approval binds.
|
|
19
|
+
attr_accessor :content_sha256
|
|
20
|
+
|
|
21
|
+
# The rendered HTML, with order tokens filled and Velocity run, as the receipt would inject it. Empty when the slot is empty.
|
|
22
|
+
attr_accessor :html
|
|
23
|
+
|
|
24
|
+
# The test order rendered against.
|
|
25
|
+
attr_accessor :order_id
|
|
26
|
+
|
|
27
|
+
# The Velocity references the render provides. Any other reference the receipt page has is left as written.
|
|
28
|
+
attr_accessor :provides
|
|
29
|
+
|
|
30
|
+
# The size of html in UTF-8 bytes.
|
|
31
|
+
attr_accessor :size_bytes
|
|
32
|
+
|
|
33
|
+
# The slot rendered. Always conversion.
|
|
34
|
+
attr_accessor :slot
|
|
35
|
+
|
|
36
|
+
# stored when the slot's saved HTML was rendered, draft when the request's content was.
|
|
37
|
+
attr_accessor :source
|
|
38
|
+
|
|
39
|
+
# What the render left out or could not do, such as tokens it doesn't fill.
|
|
40
|
+
attr_accessor :warnings
|
|
41
|
+
|
|
42
|
+
class EnumAttributeValidator
|
|
43
|
+
attr_reader :datatype
|
|
44
|
+
attr_reader :allowable_values
|
|
45
|
+
|
|
46
|
+
def initialize(datatype, allowable_values)
|
|
47
|
+
@allowable_values = allowable_values.map do |value|
|
|
48
|
+
case datatype.to_s
|
|
49
|
+
when /Integer/i
|
|
50
|
+
value.to_i
|
|
51
|
+
when /Float/i
|
|
52
|
+
value.to_f
|
|
53
|
+
else
|
|
54
|
+
value
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def valid?(value)
|
|
60
|
+
!value || allowable_values.include?(value)
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
65
|
+
def self.attribute_map
|
|
66
|
+
{
|
|
67
|
+
:'content_sha256' => :'content_sha256',
|
|
68
|
+
:'html' => :'html',
|
|
69
|
+
:'order_id' => :'order_id',
|
|
70
|
+
:'provides' => :'provides',
|
|
71
|
+
:'size_bytes' => :'size_bytes',
|
|
72
|
+
:'slot' => :'slot',
|
|
73
|
+
:'source' => :'source',
|
|
74
|
+
:'warnings' => :'warnings'
|
|
75
|
+
}
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# Returns all the JSON keys this model knows about
|
|
79
|
+
def self.acceptable_attributes
|
|
80
|
+
attribute_map.values
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
# Attribute type mapping.
|
|
84
|
+
def self.openapi_types
|
|
85
|
+
{
|
|
86
|
+
:'content_sha256' => :'String',
|
|
87
|
+
:'html' => :'String',
|
|
88
|
+
:'order_id' => :'String',
|
|
89
|
+
:'provides' => :'Array<String>',
|
|
90
|
+
:'size_bytes' => :'Integer',
|
|
91
|
+
:'slot' => :'String',
|
|
92
|
+
:'source' => :'String',
|
|
93
|
+
:'warnings' => :'Array<SfvbErrorDetail>'
|
|
94
|
+
}
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# List of attributes with nullable: true
|
|
98
|
+
def self.openapi_nullable
|
|
99
|
+
Set.new([
|
|
100
|
+
])
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
# Initializes the object
|
|
104
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
105
|
+
def initialize(attributes = {})
|
|
106
|
+
if (!attributes.is_a?(Hash))
|
|
107
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbTrackingHtmlRenderResponse` initialize method"
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
111
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
112
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
113
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbTrackingHtmlRenderResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
114
|
+
end
|
|
115
|
+
h[k.to_sym] = v
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
if attributes.key?(:'content_sha256')
|
|
119
|
+
self.content_sha256 = attributes[:'content_sha256']
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if attributes.key?(:'html')
|
|
123
|
+
self.html = attributes[:'html']
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if attributes.key?(:'order_id')
|
|
127
|
+
self.order_id = attributes[:'order_id']
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if attributes.key?(:'provides')
|
|
131
|
+
if (value = attributes[:'provides']).is_a?(Array)
|
|
132
|
+
self.provides = value
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if attributes.key?(:'size_bytes')
|
|
137
|
+
self.size_bytes = attributes[:'size_bytes']
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if attributes.key?(:'slot')
|
|
141
|
+
self.slot = attributes[:'slot']
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if attributes.key?(:'source')
|
|
145
|
+
self.source = attributes[:'source']
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
if attributes.key?(:'warnings')
|
|
149
|
+
if (value = attributes[:'warnings']).is_a?(Array)
|
|
150
|
+
self.warnings = value
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
156
|
+
# @return Array for valid properties with the reasons
|
|
157
|
+
def list_invalid_properties
|
|
158
|
+
invalid_properties = Array.new
|
|
159
|
+
invalid_properties
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Check to see if the all the properties in the model are valid
|
|
163
|
+
# @return true if the model is valid
|
|
164
|
+
def valid?
|
|
165
|
+
source_validator = EnumAttributeValidator.new('String', ["stored", "draft"])
|
|
166
|
+
return false unless source_validator.valid?(@source)
|
|
167
|
+
true
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
171
|
+
# @param [Object] source Object to be assigned
|
|
172
|
+
def source=(source)
|
|
173
|
+
validator = EnumAttributeValidator.new('String', ["stored", "draft"])
|
|
174
|
+
unless validator.valid?(source)
|
|
175
|
+
fail ArgumentError, "invalid value for \"source\", must be one of #{validator.allowable_values}."
|
|
176
|
+
end
|
|
177
|
+
@source = source
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# Checks equality by comparing each attribute.
|
|
181
|
+
# @param [Object] Object to be compared
|
|
182
|
+
def ==(o)
|
|
183
|
+
return true if self.equal?(o)
|
|
184
|
+
self.class == o.class &&
|
|
185
|
+
content_sha256 == o.content_sha256 &&
|
|
186
|
+
html == o.html &&
|
|
187
|
+
order_id == o.order_id &&
|
|
188
|
+
provides == o.provides &&
|
|
189
|
+
size_bytes == o.size_bytes &&
|
|
190
|
+
slot == o.slot &&
|
|
191
|
+
source == o.source &&
|
|
192
|
+
warnings == o.warnings
|
|
193
|
+
end
|
|
194
|
+
|
|
195
|
+
# @see the `==` method
|
|
196
|
+
# @param [Object] Object to be compared
|
|
197
|
+
def eql?(o)
|
|
198
|
+
self == o
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
# Calculates hash code according to all attributes.
|
|
202
|
+
# @return [Integer] Hash code
|
|
203
|
+
def hash
|
|
204
|
+
[content_sha256, html, order_id, provides, size_bytes, slot, source, warnings].hash
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Builds the object from hash
|
|
208
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
209
|
+
# @return [Object] Returns the model itself
|
|
210
|
+
def self.build_from_hash(attributes)
|
|
211
|
+
new.build_from_hash(attributes)
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Builds the object from hash
|
|
215
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
216
|
+
# @return [Object] Returns the model itself
|
|
217
|
+
def build_from_hash(attributes)
|
|
218
|
+
return nil unless attributes.is_a?(Hash)
|
|
219
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
220
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
221
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
222
|
+
self.send("#{key}=", nil)
|
|
223
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
224
|
+
# check to ensure the input is an array given that the attribute
|
|
225
|
+
# is documented as an array but the input is not
|
|
226
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
227
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
228
|
+
end
|
|
229
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
230
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
231
|
+
end
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
self
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Deserializes the data based on type
|
|
238
|
+
# @param string type Data type
|
|
239
|
+
# @param string value Value to be deserialized
|
|
240
|
+
# @return [Object] Deserialized data
|
|
241
|
+
def _deserialize(type, value)
|
|
242
|
+
case type.to_sym
|
|
243
|
+
when :Time
|
|
244
|
+
Time.parse(value)
|
|
245
|
+
when :Date
|
|
246
|
+
Date.parse(value)
|
|
247
|
+
when :String
|
|
248
|
+
value.to_s
|
|
249
|
+
when :Integer
|
|
250
|
+
value.to_i
|
|
251
|
+
when :Float
|
|
252
|
+
value.to_f
|
|
253
|
+
when :Boolean
|
|
254
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
255
|
+
true
|
|
256
|
+
else
|
|
257
|
+
false
|
|
258
|
+
end
|
|
259
|
+
when :Object
|
|
260
|
+
# generic object (usually a Hash), return directly
|
|
261
|
+
value
|
|
262
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
263
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
264
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
265
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
266
|
+
k_type = Regexp.last_match[:k_type]
|
|
267
|
+
v_type = Regexp.last_match[:v_type]
|
|
268
|
+
{}.tap do |hash|
|
|
269
|
+
value.each do |k, v|
|
|
270
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
271
|
+
end
|
|
272
|
+
end
|
|
273
|
+
else # model
|
|
274
|
+
# models (e.g. Pet) or oneOf
|
|
275
|
+
klass = UltracartClient.const_get(type)
|
|
276
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
277
|
+
end
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# Returns the string representation of the object
|
|
281
|
+
# @return [String] String presentation of the object
|
|
282
|
+
def to_s
|
|
283
|
+
to_hash.to_s
|
|
284
|
+
end
|
|
285
|
+
|
|
286
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
287
|
+
# @return [Hash] Returns the object in the form of hash
|
|
288
|
+
def to_body
|
|
289
|
+
to_hash
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
# Returns the object in the form of hash
|
|
293
|
+
# @return [Hash] Returns the object in the form of hash
|
|
294
|
+
def to_hash
|
|
295
|
+
hash = {}
|
|
296
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
297
|
+
value = self.send(attr)
|
|
298
|
+
if value.nil?
|
|
299
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
300
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
hash[param] = _to_hash(value)
|
|
304
|
+
end
|
|
305
|
+
hash
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# Outputs non-array value in the form of hash
|
|
309
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
310
|
+
# @param [Object] value Any valid value
|
|
311
|
+
# @return [Hash] Returns the value in the form of hash
|
|
312
|
+
def _to_hash(value)
|
|
313
|
+
if value.is_a?(Array)
|
|
314
|
+
value.compact.map { |v| _to_hash(v) }
|
|
315
|
+
elsif value.is_a?(Hash)
|
|
316
|
+
{}.tap do |hash|
|
|
317
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
318
|
+
end
|
|
319
|
+
elsif value.respond_to? :to_hash
|
|
320
|
+
value.to_hash
|
|
321
|
+
else
|
|
322
|
+
value
|
|
323
|
+
end
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
end
|
|
@@ -61,6 +61,9 @@ module UltracartClient
|
|
|
61
61
|
|
|
62
62
|
attr_accessor :oauth
|
|
63
63
|
|
|
64
|
+
# What the provider also sends from UltraCart's servers. A consent gate holds back only the browser pixel, not these. Absent when it sends nothing server side.
|
|
65
|
+
attr_accessor :server_side
|
|
66
|
+
|
|
64
67
|
# For google_analytics, the account number per wholesale pricing tier.
|
|
65
68
|
attr_accessor :wholesale_tiers
|
|
66
69
|
|
|
@@ -83,6 +86,7 @@ module UltracartClient
|
|
|
83
86
|
:'name' => :'name',
|
|
84
87
|
:'notes' => :'notes',
|
|
85
88
|
:'oauth' => :'oauth',
|
|
89
|
+
:'server_side' => :'server_side',
|
|
86
90
|
:'wholesale_tiers' => :'wholesale_tiers'
|
|
87
91
|
}
|
|
88
92
|
end
|
|
@@ -111,6 +115,7 @@ module UltracartClient
|
|
|
111
115
|
:'name' => :'String',
|
|
112
116
|
:'notes' => :'Array<String>',
|
|
113
117
|
:'oauth' => :'SfvbTrackingProviderOauth',
|
|
118
|
+
:'server_side' => :'String',
|
|
114
119
|
:'wholesale_tiers' => :'Array<SfvbTrackingWholesaleTier>'
|
|
115
120
|
}
|
|
116
121
|
end
|
|
@@ -208,6 +213,10 @@ module UltracartClient
|
|
|
208
213
|
self.oauth = attributes[:'oauth']
|
|
209
214
|
end
|
|
210
215
|
|
|
216
|
+
if attributes.key?(:'server_side')
|
|
217
|
+
self.server_side = attributes[:'server_side']
|
|
218
|
+
end
|
|
219
|
+
|
|
211
220
|
if attributes.key?(:'wholesale_tiers')
|
|
212
221
|
if (value = attributes[:'wholesale_tiers']).is_a?(Array)
|
|
213
222
|
self.wholesale_tiers = value
|
|
@@ -249,6 +258,7 @@ module UltracartClient
|
|
|
249
258
|
name == o.name &&
|
|
250
259
|
notes == o.notes &&
|
|
251
260
|
oauth == o.oauth &&
|
|
261
|
+
server_side == o.server_side &&
|
|
252
262
|
wholesale_tiers == o.wholesale_tiers
|
|
253
263
|
end
|
|
254
264
|
|
|
@@ -261,7 +271,7 @@ module UltracartClient
|
|
|
261
271
|
# Calculates hash code according to all attributes.
|
|
262
272
|
# @return [Integer] Hash code
|
|
263
273
|
def hash
|
|
264
|
-
[admin_path, approval_needed, changes, configured, consent, consent_supported, cost, dry_run, events, fields, group, hash_sha256, key, name, notes, oauth, wholesale_tiers].hash
|
|
274
|
+
[admin_path, approval_needed, changes, configured, consent, consent_supported, cost, dry_run, events, fields, group, hash_sha256, key, name, notes, oauth, server_side, wholesale_tiers].hash
|
|
265
275
|
end
|
|
266
276
|
|
|
267
277
|
# Builds the object from hash
|
data/lib/ultracart_api.rb
CHANGED
|
@@ -1218,6 +1218,7 @@ require 'ultracart_api/models/sfvb_preview_access_request'
|
|
|
1218
1218
|
require 'ultracart_api/models/sfvb_preview_access_response'
|
|
1219
1219
|
require 'ultracart_api/models/sfvb_preview_session_request'
|
|
1220
1220
|
require 'ultracart_api/models/sfvb_preview_session_response'
|
|
1221
|
+
require 'ultracart_api/models/sfvb_preview_tracking_html_request'
|
|
1221
1222
|
require 'ultracart_api/models/sfvb_preview_url_response'
|
|
1222
1223
|
require 'ultracart_api/models/sfvb_recording'
|
|
1223
1224
|
require 'ultracart_api/models/sfvb_recording_event'
|
|
@@ -1308,6 +1309,8 @@ require 'ultracart_api/models/sfvb_tracking_advanced'
|
|
|
1308
1309
|
require 'ultracart_api/models/sfvb_tracking_advanced_request'
|
|
1309
1310
|
require 'ultracart_api/models/sfvb_tracking_change'
|
|
1310
1311
|
require 'ultracart_api/models/sfvb_tracking_html'
|
|
1312
|
+
require 'ultracart_api/models/sfvb_tracking_html_render_request'
|
|
1313
|
+
require 'ultracart_api/models/sfvb_tracking_html_render_response'
|
|
1311
1314
|
require 'ultracart_api/models/sfvb_tracking_html_request'
|
|
1312
1315
|
require 'ultracart_api/models/sfvb_tracking_html_response'
|
|
1313
1316
|
require 'ultracart_api/models/sfvb_tracking_privacy'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ultracart_api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.1.
|
|
4
|
+
version: 4.1.234
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- UltraCart
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: typhoeus
|
|
@@ -1280,6 +1280,7 @@ files:
|
|
|
1280
1280
|
- docs/SfvbPreviewAccessResponse.md
|
|
1281
1281
|
- docs/SfvbPreviewSessionRequest.md
|
|
1282
1282
|
- docs/SfvbPreviewSessionResponse.md
|
|
1283
|
+
- docs/SfvbPreviewTrackingHtmlRequest.md
|
|
1283
1284
|
- docs/SfvbPreviewUrlResponse.md
|
|
1284
1285
|
- docs/SfvbRecording.md
|
|
1285
1286
|
- docs/SfvbRecordingEvent.md
|
|
@@ -1370,6 +1371,8 @@ files:
|
|
|
1370
1371
|
- docs/SfvbTrackingAdvancedRequest.md
|
|
1371
1372
|
- docs/SfvbTrackingChange.md
|
|
1372
1373
|
- docs/SfvbTrackingHtml.md
|
|
1374
|
+
- docs/SfvbTrackingHtmlRenderRequest.md
|
|
1375
|
+
- docs/SfvbTrackingHtmlRenderResponse.md
|
|
1373
1376
|
- docs/SfvbTrackingHtmlRequest.md
|
|
1374
1377
|
- docs/SfvbTrackingHtmlResponse.md
|
|
1375
1378
|
- docs/SfvbTrackingPrivacy.md
|
|
@@ -2742,6 +2745,7 @@ files:
|
|
|
2742
2745
|
- lib/ultracart_api/models/sfvb_preview_access_response.rb
|
|
2743
2746
|
- lib/ultracart_api/models/sfvb_preview_session_request.rb
|
|
2744
2747
|
- lib/ultracart_api/models/sfvb_preview_session_response.rb
|
|
2748
|
+
- lib/ultracart_api/models/sfvb_preview_tracking_html_request.rb
|
|
2745
2749
|
- lib/ultracart_api/models/sfvb_preview_url_response.rb
|
|
2746
2750
|
- lib/ultracart_api/models/sfvb_recording.rb
|
|
2747
2751
|
- lib/ultracart_api/models/sfvb_recording_event.rb
|
|
@@ -2832,6 +2836,8 @@ files:
|
|
|
2832
2836
|
- lib/ultracart_api/models/sfvb_tracking_advanced_request.rb
|
|
2833
2837
|
- lib/ultracart_api/models/sfvb_tracking_change.rb
|
|
2834
2838
|
- lib/ultracart_api/models/sfvb_tracking_html.rb
|
|
2839
|
+
- lib/ultracart_api/models/sfvb_tracking_html_render_request.rb
|
|
2840
|
+
- lib/ultracart_api/models/sfvb_tracking_html_render_response.rb
|
|
2835
2841
|
- lib/ultracart_api/models/sfvb_tracking_html_request.rb
|
|
2836
2842
|
- lib/ultracart_api/models/sfvb_tracking_html_response.rb
|
|
2837
2843
|
- lib/ultracart_api/models/sfvb_tracking_privacy.rb
|