ultracart_api 4.1.178 → 4.1.180
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 +18 -2
- data/docs/AutoOrderApi.md +54 -0
- data/docs/OrderApi.md +165 -0
- data/docs/OrderAssignRmaRequest.md +18 -0
- data/docs/OrderAutoOrderUpdateBillingUrlResponse.md +26 -0
- data/docs/SfvbApi.md +111 -0
- data/docs/SfvbBlogPostDetail.md +8 -2
- data/docs/SfvbBlogPostRequest.md +6 -0
- data/docs/SfvbRecording.md +60 -0
- data/docs/SfvbRecordingEvent.md +24 -0
- data/docs/SfvbRecordingEventsResponse.md +24 -0
- data/docs/SfvbRecordingPageView.md +42 -0
- data/docs/SfvbRecordingParameter.md +20 -0
- data/docs/SfvbRecordingResponse.md +18 -0
- data/lib/ultracart_api/api/auto_order_api.rb +64 -0
- data/lib/ultracart_api/api/order_api.rb +209 -0
- data/lib/ultracart_api/api/sfvb_api.rb +146 -0
- data/lib/ultracart_api/models/order_assign_rma_request.rb +235 -0
- data/lib/ultracart_api/models/order_auto_order_update_billing_url_response.rb +257 -0
- data/lib/ultracart_api/models/sfvb_blog_post_detail.rb +33 -3
- data/lib/ultracart_api/models/sfvb_blog_post_request.rb +31 -1
- data/lib/ultracart_api/models/sfvb_recording.rb +431 -0
- data/lib/ultracart_api/models/sfvb_recording_event.rb +252 -0
- data/lib/ultracart_api/models/sfvb_recording_events_response.rb +250 -0
- data/lib/ultracart_api/models/sfvb_recording_page_view.rb +344 -0
- data/lib/ultracart_api/models/sfvb_recording_parameter.rb +230 -0
- data/lib/ultracart_api/models/sfvb_recording_response.rb +219 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +8 -0
- metadata +18 -2
|
@@ -0,0 +1,235 @@
|
|
|
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 OrderAssignRmaRequest
|
|
18
|
+
# RMA number to associate with the order
|
|
19
|
+
attr_accessor :rma
|
|
20
|
+
|
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
22
|
+
def self.attribute_map
|
|
23
|
+
{
|
|
24
|
+
:'rma' => :'rma'
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
# Returns all the JSON keys this model knows about
|
|
29
|
+
def self.acceptable_attributes
|
|
30
|
+
attribute_map.values
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Attribute type mapping.
|
|
34
|
+
def self.openapi_types
|
|
35
|
+
{
|
|
36
|
+
:'rma' => :'String'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# List of attributes with nullable: true
|
|
41
|
+
def self.openapi_nullable
|
|
42
|
+
Set.new([
|
|
43
|
+
])
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Initializes the object
|
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
48
|
+
def initialize(attributes = {})
|
|
49
|
+
if (!attributes.is_a?(Hash))
|
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::OrderAssignRmaRequest` initialize method"
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
54
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
55
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
56
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::OrderAssignRmaRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
57
|
+
end
|
|
58
|
+
h[k.to_sym] = v
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if attributes.key?(:'rma')
|
|
62
|
+
self.rma = attributes[:'rma']
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
67
|
+
# @return Array for valid properties with the reasons
|
|
68
|
+
def list_invalid_properties
|
|
69
|
+
invalid_properties = Array.new
|
|
70
|
+
if !@rma.nil? && @rma.to_s.length > 30
|
|
71
|
+
invalid_properties.push('invalid value for "rma", the character length must be smaller than or equal to 30.')
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
invalid_properties
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Check to see if the all the properties in the model are valid
|
|
78
|
+
# @return true if the model is valid
|
|
79
|
+
def valid?
|
|
80
|
+
return false if !@rma.nil? && @rma.to_s.length > 30
|
|
81
|
+
true
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Custom attribute writer method with validation
|
|
85
|
+
# @param [Object] rma Value to be assigned
|
|
86
|
+
def rma=(rma)
|
|
87
|
+
if !rma.nil? && rma.to_s.length > 30
|
|
88
|
+
fail ArgumentError, 'invalid value for "rma", the character length must be smaller than or equal to 30.'
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
@rma = rma
|
|
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
|
+
rma == o.rma
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
# @see the `==` method
|
|
103
|
+
# @param [Object] Object to be compared
|
|
104
|
+
def eql?(o)
|
|
105
|
+
self == o
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Calculates hash code according to all attributes.
|
|
109
|
+
# @return [Integer] Hash code
|
|
110
|
+
def hash
|
|
111
|
+
[rma].hash
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Builds the object from hash
|
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
116
|
+
# @return [Object] Returns the model itself
|
|
117
|
+
def self.build_from_hash(attributes)
|
|
118
|
+
new.build_from_hash(attributes)
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Builds the object from hash
|
|
122
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
123
|
+
# @return [Object] Returns the model itself
|
|
124
|
+
def build_from_hash(attributes)
|
|
125
|
+
return nil unless attributes.is_a?(Hash)
|
|
126
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
127
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
128
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
129
|
+
self.send("#{key}=", nil)
|
|
130
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
131
|
+
# check to ensure the input is an array given that the attribute
|
|
132
|
+
# is documented as an array but the input is not
|
|
133
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
134
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
135
|
+
end
|
|
136
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
137
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
self
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Deserializes the data based on type
|
|
145
|
+
# @param string type Data type
|
|
146
|
+
# @param string value Value to be deserialized
|
|
147
|
+
# @return [Object] Deserialized data
|
|
148
|
+
def _deserialize(type, value)
|
|
149
|
+
case type.to_sym
|
|
150
|
+
when :Time
|
|
151
|
+
Time.parse(value)
|
|
152
|
+
when :Date
|
|
153
|
+
Date.parse(value)
|
|
154
|
+
when :String
|
|
155
|
+
value.to_s
|
|
156
|
+
when :Integer
|
|
157
|
+
value.to_i
|
|
158
|
+
when :Float
|
|
159
|
+
value.to_f
|
|
160
|
+
when :Boolean
|
|
161
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
162
|
+
true
|
|
163
|
+
else
|
|
164
|
+
false
|
|
165
|
+
end
|
|
166
|
+
when :Object
|
|
167
|
+
# generic object (usually a Hash), return directly
|
|
168
|
+
value
|
|
169
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
170
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
171
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
172
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
173
|
+
k_type = Regexp.last_match[:k_type]
|
|
174
|
+
v_type = Regexp.last_match[:v_type]
|
|
175
|
+
{}.tap do |hash|
|
|
176
|
+
value.each do |k, v|
|
|
177
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
178
|
+
end
|
|
179
|
+
end
|
|
180
|
+
else # model
|
|
181
|
+
# models (e.g. Pet) or oneOf
|
|
182
|
+
klass = UltracartClient.const_get(type)
|
|
183
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
184
|
+
end
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Returns the string representation of the object
|
|
188
|
+
# @return [String] String presentation of the object
|
|
189
|
+
def to_s
|
|
190
|
+
to_hash.to_s
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
|
195
|
+
def to_body
|
|
196
|
+
to_hash
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# Returns the object in the form of hash
|
|
200
|
+
# @return [Hash] Returns the object in the form of hash
|
|
201
|
+
def to_hash
|
|
202
|
+
hash = {}
|
|
203
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
204
|
+
value = self.send(attr)
|
|
205
|
+
if value.nil?
|
|
206
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
207
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
hash[param] = _to_hash(value)
|
|
211
|
+
end
|
|
212
|
+
hash
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Outputs non-array value in the form of hash
|
|
216
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
217
|
+
# @param [Object] value Any valid value
|
|
218
|
+
# @return [Hash] Returns the value in the form of hash
|
|
219
|
+
def _to_hash(value)
|
|
220
|
+
if value.is_a?(Array)
|
|
221
|
+
value.compact.map { |v| _to_hash(v) }
|
|
222
|
+
elsif value.is_a?(Hash)
|
|
223
|
+
{}.tap do |hash|
|
|
224
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
225
|
+
end
|
|
226
|
+
elsif value.respond_to? :to_hash
|
|
227
|
+
value.to_hash
|
|
228
|
+
else
|
|
229
|
+
value
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
end
|
|
@@ -0,0 +1,257 @@
|
|
|
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 OrderAutoOrderUpdateBillingUrlResponse
|
|
18
|
+
attr_accessor :error
|
|
19
|
+
|
|
20
|
+
attr_accessor :metadata
|
|
21
|
+
|
|
22
|
+
# Indicates if API call was successful
|
|
23
|
+
attr_accessor :success
|
|
24
|
+
|
|
25
|
+
# The url the customer can use to update the billing information on their auto order
|
|
26
|
+
attr_accessor :update_billing_url
|
|
27
|
+
|
|
28
|
+
attr_accessor :warning
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'error' => :'error',
|
|
34
|
+
:'metadata' => :'metadata',
|
|
35
|
+
:'success' => :'success',
|
|
36
|
+
:'update_billing_url' => :'update_billing_url',
|
|
37
|
+
:'warning' => :'warning'
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Returns all the JSON keys this model knows about
|
|
42
|
+
def self.acceptable_attributes
|
|
43
|
+
attribute_map.values
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Attribute type mapping.
|
|
47
|
+
def self.openapi_types
|
|
48
|
+
{
|
|
49
|
+
:'error' => :'Error',
|
|
50
|
+
:'metadata' => :'ResponseMetadata',
|
|
51
|
+
:'success' => :'Boolean',
|
|
52
|
+
:'update_billing_url' => :'String',
|
|
53
|
+
:'warning' => :'Warning'
|
|
54
|
+
}
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# List of attributes with nullable: true
|
|
58
|
+
def self.openapi_nullable
|
|
59
|
+
Set.new([
|
|
60
|
+
])
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# Initializes the object
|
|
64
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
65
|
+
def initialize(attributes = {})
|
|
66
|
+
if (!attributes.is_a?(Hash))
|
|
67
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::OrderAutoOrderUpdateBillingUrlResponse` initialize method"
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
72
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::OrderAutoOrderUpdateBillingUrlResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
74
|
+
end
|
|
75
|
+
h[k.to_sym] = v
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if attributes.key?(:'error')
|
|
79
|
+
self.error = attributes[:'error']
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
if attributes.key?(:'metadata')
|
|
83
|
+
self.metadata = attributes[:'metadata']
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
if attributes.key?(:'success')
|
|
87
|
+
self.success = attributes[:'success']
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
if attributes.key?(:'update_billing_url')
|
|
91
|
+
self.update_billing_url = attributes[:'update_billing_url']
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
if attributes.key?(:'warning')
|
|
95
|
+
self.warning = attributes[:'warning']
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
100
|
+
# @return Array for valid properties with the reasons
|
|
101
|
+
def list_invalid_properties
|
|
102
|
+
invalid_properties = Array.new
|
|
103
|
+
invalid_properties
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Check to see if the all the properties in the model are valid
|
|
107
|
+
# @return true if the model is valid
|
|
108
|
+
def valid?
|
|
109
|
+
true
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
# Checks equality by comparing each attribute.
|
|
113
|
+
# @param [Object] Object to be compared
|
|
114
|
+
def ==(o)
|
|
115
|
+
return true if self.equal?(o)
|
|
116
|
+
self.class == o.class &&
|
|
117
|
+
error == o.error &&
|
|
118
|
+
metadata == o.metadata &&
|
|
119
|
+
success == o.success &&
|
|
120
|
+
update_billing_url == o.update_billing_url &&
|
|
121
|
+
warning == o.warning
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# @see the `==` method
|
|
125
|
+
# @param [Object] Object to be compared
|
|
126
|
+
def eql?(o)
|
|
127
|
+
self == o
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Calculates hash code according to all attributes.
|
|
131
|
+
# @return [Integer] Hash code
|
|
132
|
+
def hash
|
|
133
|
+
[error, metadata, success, update_billing_url, warning].hash
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Builds the object from hash
|
|
137
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
138
|
+
# @return [Object] Returns the model itself
|
|
139
|
+
def self.build_from_hash(attributes)
|
|
140
|
+
new.build_from_hash(attributes)
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Builds the object from hash
|
|
144
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
145
|
+
# @return [Object] Returns the model itself
|
|
146
|
+
def build_from_hash(attributes)
|
|
147
|
+
return nil unless attributes.is_a?(Hash)
|
|
148
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
149
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
150
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
151
|
+
self.send("#{key}=", nil)
|
|
152
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
153
|
+
# check to ensure the input is an array given that the attribute
|
|
154
|
+
# is documented as an array but the input is not
|
|
155
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
156
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
157
|
+
end
|
|
158
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
159
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
160
|
+
end
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
self
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Deserializes the data based on type
|
|
167
|
+
# @param string type Data type
|
|
168
|
+
# @param string value Value to be deserialized
|
|
169
|
+
# @return [Object] Deserialized data
|
|
170
|
+
def _deserialize(type, value)
|
|
171
|
+
case type.to_sym
|
|
172
|
+
when :Time
|
|
173
|
+
Time.parse(value)
|
|
174
|
+
when :Date
|
|
175
|
+
Date.parse(value)
|
|
176
|
+
when :String
|
|
177
|
+
value.to_s
|
|
178
|
+
when :Integer
|
|
179
|
+
value.to_i
|
|
180
|
+
when :Float
|
|
181
|
+
value.to_f
|
|
182
|
+
when :Boolean
|
|
183
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
184
|
+
true
|
|
185
|
+
else
|
|
186
|
+
false
|
|
187
|
+
end
|
|
188
|
+
when :Object
|
|
189
|
+
# generic object (usually a Hash), return directly
|
|
190
|
+
value
|
|
191
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
192
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
193
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
194
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
195
|
+
k_type = Regexp.last_match[:k_type]
|
|
196
|
+
v_type = Regexp.last_match[:v_type]
|
|
197
|
+
{}.tap do |hash|
|
|
198
|
+
value.each do |k, v|
|
|
199
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
else # model
|
|
203
|
+
# models (e.g. Pet) or oneOf
|
|
204
|
+
klass = UltracartClient.const_get(type)
|
|
205
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
206
|
+
end
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# Returns the string representation of the object
|
|
210
|
+
# @return [String] String presentation of the object
|
|
211
|
+
def to_s
|
|
212
|
+
to_hash.to_s
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
216
|
+
# @return [Hash] Returns the object in the form of hash
|
|
217
|
+
def to_body
|
|
218
|
+
to_hash
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
# Returns the object in the form of hash
|
|
222
|
+
# @return [Hash] Returns the object in the form of hash
|
|
223
|
+
def to_hash
|
|
224
|
+
hash = {}
|
|
225
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
226
|
+
value = self.send(attr)
|
|
227
|
+
if value.nil?
|
|
228
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
229
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
hash[param] = _to_hash(value)
|
|
233
|
+
end
|
|
234
|
+
hash
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
# Outputs non-array value in the form of hash
|
|
238
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
239
|
+
# @param [Object] value Any valid value
|
|
240
|
+
# @return [Hash] Returns the value in the form of hash
|
|
241
|
+
def _to_hash(value)
|
|
242
|
+
if value.is_a?(Array)
|
|
243
|
+
value.compact.map { |v| _to_hash(v) }
|
|
244
|
+
elsif value.is_a?(Hash)
|
|
245
|
+
{}.tap do |hash|
|
|
246
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
247
|
+
end
|
|
248
|
+
elsif value.respond_to? :to_hash
|
|
249
|
+
value.to_hash
|
|
250
|
+
else
|
|
251
|
+
value
|
|
252
|
+
end
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
end
|
|
@@ -15,7 +15,7 @@ require 'time'
|
|
|
15
15
|
|
|
16
16
|
module UltracartClient
|
|
17
17
|
class SfvbBlogPostDetail
|
|
18
|
-
# Whether shoppers may comment.
|
|
18
|
+
# Whether shoppers may comment. Like every false value here, false is left out of the response.
|
|
19
19
|
attr_accessor :allow_comments
|
|
20
20
|
|
|
21
21
|
# The post author.
|
|
@@ -42,7 +42,16 @@ module UltracartClient
|
|
|
42
42
|
# When the post is published (ISO 8601, UTC), or null for a draft.
|
|
43
43
|
attr_accessor :publication_dts
|
|
44
44
|
|
|
45
|
-
# The
|
|
45
|
+
# The meta description (storefrontSEODescription). Absent when not set.
|
|
46
|
+
attr_accessor :seo_description
|
|
47
|
+
|
|
48
|
+
# The meta keywords (storefrontSEOKeywords). Absent when not set.
|
|
49
|
+
attr_accessor :seo_keywords
|
|
50
|
+
|
|
51
|
+
# The page head title (storefrontSEOTitle). Absent when not set, and the head then uses the post title.
|
|
52
|
+
attr_accessor :seo_title
|
|
53
|
+
|
|
54
|
+
# The post's tags, in alphabetical order. The order they were sent in is not kept.
|
|
46
55
|
attr_accessor :tags
|
|
47
56
|
|
|
48
57
|
# The post title.
|
|
@@ -72,6 +81,9 @@ module UltracartClient
|
|
|
72
81
|
:'images' => :'images',
|
|
73
82
|
:'last_modified_dts' => :'last_modified_dts',
|
|
74
83
|
:'publication_dts' => :'publication_dts',
|
|
84
|
+
:'seo_description' => :'seo_description',
|
|
85
|
+
:'seo_keywords' => :'seo_keywords',
|
|
86
|
+
:'seo_title' => :'seo_title',
|
|
75
87
|
:'tags' => :'tags',
|
|
76
88
|
:'title' => :'title',
|
|
77
89
|
:'unassigned' => :'unassigned',
|
|
@@ -98,6 +110,9 @@ module UltracartClient
|
|
|
98
110
|
:'images' => :'Array<SfvbBlogPostImage>',
|
|
99
111
|
:'last_modified_dts' => :'String',
|
|
100
112
|
:'publication_dts' => :'String',
|
|
113
|
+
:'seo_description' => :'String',
|
|
114
|
+
:'seo_keywords' => :'String',
|
|
115
|
+
:'seo_title' => :'String',
|
|
101
116
|
:'tags' => :'Array<String>',
|
|
102
117
|
:'title' => :'String',
|
|
103
118
|
:'unassigned' => :'Boolean',
|
|
@@ -166,6 +181,18 @@ module UltracartClient
|
|
|
166
181
|
self.publication_dts = attributes[:'publication_dts']
|
|
167
182
|
end
|
|
168
183
|
|
|
184
|
+
if attributes.key?(:'seo_description')
|
|
185
|
+
self.seo_description = attributes[:'seo_description']
|
|
186
|
+
end
|
|
187
|
+
|
|
188
|
+
if attributes.key?(:'seo_keywords')
|
|
189
|
+
self.seo_keywords = attributes[:'seo_keywords']
|
|
190
|
+
end
|
|
191
|
+
|
|
192
|
+
if attributes.key?(:'seo_title')
|
|
193
|
+
self.seo_title = attributes[:'seo_title']
|
|
194
|
+
end
|
|
195
|
+
|
|
169
196
|
if attributes.key?(:'tags')
|
|
170
197
|
if (value = attributes[:'tags']).is_a?(Array)
|
|
171
198
|
self.tags = value
|
|
@@ -220,6 +247,9 @@ module UltracartClient
|
|
|
220
247
|
images == o.images &&
|
|
221
248
|
last_modified_dts == o.last_modified_dts &&
|
|
222
249
|
publication_dts == o.publication_dts &&
|
|
250
|
+
seo_description == o.seo_description &&
|
|
251
|
+
seo_keywords == o.seo_keywords &&
|
|
252
|
+
seo_title == o.seo_title &&
|
|
223
253
|
tags == o.tags &&
|
|
224
254
|
title == o.title &&
|
|
225
255
|
unassigned == o.unassigned &&
|
|
@@ -237,7 +267,7 @@ module UltracartClient
|
|
|
237
267
|
# Calculates hash code according to all attributes.
|
|
238
268
|
# @return [Integer] Hash code
|
|
239
269
|
def hash
|
|
240
|
-
[allow_comments, author, blog_post_oid, body, created_dts, excerpt, images, last_modified_dts, publication_dts, tags, title, unassigned, url_part, view_url, visibility].hash
|
|
270
|
+
[allow_comments, author, blog_post_oid, body, created_dts, excerpt, images, last_modified_dts, publication_dts, seo_description, seo_keywords, seo_title, tags, title, unassigned, url_part, view_url, visibility].hash
|
|
241
271
|
end
|
|
242
272
|
|
|
243
273
|
# Builds the object from hash
|
|
@@ -30,6 +30,15 @@ module UltracartClient
|
|
|
30
30
|
# When the post is published, as an ISO 8601 UTC time in the same form publication_dts reads back. Refused on a draft. A post made public without one is published now.
|
|
31
31
|
attr_accessor :publication_dts
|
|
32
32
|
|
|
33
|
+
# The meta description (storefrontSEODescription), the search result snippet. Plain text with no angle brackets or double quotes, up to 1000 characters. Left out, it is unchanged; an empty string clears it, and the head falls back to the site's description.
|
|
34
|
+
attr_accessor :seo_description
|
|
35
|
+
|
|
36
|
+
# The meta keywords (storefrontSEOKeywords). Plain text with no angle brackets or double quotes, up to 1000 characters. Left out, it is unchanged; an empty string clears it, and the head falls back to the site's keywords.
|
|
37
|
+
attr_accessor :seo_keywords
|
|
38
|
+
|
|
39
|
+
# The page head title (storefrontSEOTitle), used in place of the post title in the browser tab and search results. Plain text with no angle brackets or double quotes, up to 1000 characters. Left out, it is unchanged; an empty string clears it, and the head falls back to the post title.
|
|
40
|
+
attr_accessor :seo_title
|
|
41
|
+
|
|
33
42
|
# The post's tags as plain text, up to 100 characters each, with no quotes or angle brackets and no repeats. On an update the list replaces every tag, and an empty list clears them.
|
|
34
43
|
attr_accessor :tags
|
|
35
44
|
|
|
@@ -72,6 +81,9 @@ module UltracartClient
|
|
|
72
81
|
:'body' => :'body',
|
|
73
82
|
:'excerpt' => :'excerpt',
|
|
74
83
|
:'publication_dts' => :'publication_dts',
|
|
84
|
+
:'seo_description' => :'seo_description',
|
|
85
|
+
:'seo_keywords' => :'seo_keywords',
|
|
86
|
+
:'seo_title' => :'seo_title',
|
|
75
87
|
:'tags' => :'tags',
|
|
76
88
|
:'title' => :'title',
|
|
77
89
|
:'url_part' => :'url_part',
|
|
@@ -92,6 +104,9 @@ module UltracartClient
|
|
|
92
104
|
:'body' => :'String',
|
|
93
105
|
:'excerpt' => :'String',
|
|
94
106
|
:'publication_dts' => :'String',
|
|
107
|
+
:'seo_description' => :'String',
|
|
108
|
+
:'seo_keywords' => :'String',
|
|
109
|
+
:'seo_title' => :'String',
|
|
95
110
|
:'tags' => :'Array<String>',
|
|
96
111
|
:'title' => :'String',
|
|
97
112
|
:'url_part' => :'String',
|
|
@@ -140,6 +155,18 @@ module UltracartClient
|
|
|
140
155
|
self.publication_dts = attributes[:'publication_dts']
|
|
141
156
|
end
|
|
142
157
|
|
|
158
|
+
if attributes.key?(:'seo_description')
|
|
159
|
+
self.seo_description = attributes[:'seo_description']
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
if attributes.key?(:'seo_keywords')
|
|
163
|
+
self.seo_keywords = attributes[:'seo_keywords']
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if attributes.key?(:'seo_title')
|
|
167
|
+
self.seo_title = attributes[:'seo_title']
|
|
168
|
+
end
|
|
169
|
+
|
|
143
170
|
if attributes.key?(:'tags')
|
|
144
171
|
if (value = attributes[:'tags']).is_a?(Array)
|
|
145
172
|
self.tags = value
|
|
@@ -194,6 +221,9 @@ module UltracartClient
|
|
|
194
221
|
body == o.body &&
|
|
195
222
|
excerpt == o.excerpt &&
|
|
196
223
|
publication_dts == o.publication_dts &&
|
|
224
|
+
seo_description == o.seo_description &&
|
|
225
|
+
seo_keywords == o.seo_keywords &&
|
|
226
|
+
seo_title == o.seo_title &&
|
|
197
227
|
tags == o.tags &&
|
|
198
228
|
title == o.title &&
|
|
199
229
|
url_part == o.url_part &&
|
|
@@ -209,7 +239,7 @@ module UltracartClient
|
|
|
209
239
|
# Calculates hash code according to all attributes.
|
|
210
240
|
# @return [Integer] Hash code
|
|
211
241
|
def hash
|
|
212
|
-
[allow_comments, author, body, excerpt, publication_dts, tags, title, url_part, visibility].hash
|
|
242
|
+
[allow_comments, author, body, excerpt, publication_dts, seo_description, seo_keywords, seo_title, tags, title, url_part, visibility].hash
|
|
213
243
|
end
|
|
214
244
|
|
|
215
245
|
# Builds the object from hash
|