ultracart_api 4.1.227 → 4.1.229

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.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -2
  3. data/docs/SfvbApi.md +445 -0
  4. data/docs/SfvbApprovalCreateRequest.md +2 -0
  5. data/docs/SfvbBlogPostDetail.md +2 -0
  6. data/docs/SfvbBlogPostRequest.md +2 -0
  7. data/docs/SfvbNotFoundEntry.md +2 -0
  8. data/docs/SfvbNotFoundSummary.md +28 -0
  9. data/docs/SfvbRedirectImportRow.md +2 -0
  10. data/docs/SfvbRedirectRequest.md +2 -0
  11. data/docs/SfvbRedirectResolveBatchRequest.md +18 -0
  12. data/docs/SfvbRedirectResolveBatchResponse.md +24 -0
  13. data/docs/SfvbSiteSeo.md +40 -0
  14. data/docs/SfvbSiteSeoChange.md +26 -0
  15. data/docs/SfvbSiteSeoRequest.md +24 -0
  16. data/docs/SfvbStepCounts.md +34 -0
  17. data/docs/SfvbStepDispatchLog.md +22 -0
  18. data/docs/SfvbStepDispatchLogsResponse.md +32 -0
  19. data/lib/ultracart_api/api/sfvb_api.rb +583 -0
  20. data/lib/ultracart_api/models/sfvb_approval_create_request.rb +12 -3
  21. data/lib/ultracart_api/models/sfvb_blog_post_detail.rb +11 -1
  22. data/lib/ultracart_api/models/sfvb_blog_post_request.rb +11 -1
  23. data/lib/ultracart_api/models/sfvb_not_found_entry.rb +11 -1
  24. data/lib/ultracart_api/models/sfvb_not_found_summary.rb +280 -0
  25. data/lib/ultracart_api/models/sfvb_redirect_import_row.rb +11 -1
  26. data/lib/ultracart_api/models/sfvb_redirect_request.rb +11 -1
  27. data/lib/ultracart_api/models/sfvb_redirect_resolve_batch_request.rb +222 -0
  28. data/lib/ultracart_api/models/sfvb_redirect_resolve_batch_response.rb +252 -0
  29. data/lib/ultracart_api/models/sfvb_site_seo.rb +334 -0
  30. data/lib/ultracart_api/models/sfvb_site_seo_change.rb +260 -0
  31. data/lib/ultracart_api/models/sfvb_site_seo_request.rb +250 -0
  32. data/lib/ultracart_api/models/sfvb_step_counts.rb +300 -0
  33. data/lib/ultracart_api/models/sfvb_step_dispatch_log.rb +240 -0
  34. data/lib/ultracart_api/models/sfvb_step_dispatch_logs_response.rb +293 -0
  35. data/lib/ultracart_api/version.rb +1 -1
  36. data/lib/ultracart_api.rb +9 -0
  37. metadata +19 -1
@@ -40,6 +40,8 @@ module UltracartClient
40
40
 
41
41
  attr_accessor :segment_update
42
42
 
43
+ attr_accessor :site_seo
44
+
43
45
  attr_accessor :smart_attribution
44
46
 
45
47
  attr_accessor :tracking_provider
@@ -79,6 +81,7 @@ module UltracartClient
79
81
  :'reason' => :'reason',
80
82
  :'redirect_rows' => :'redirect_rows',
81
83
  :'segment_update' => :'segment_update',
84
+ :'site_seo' => :'site_seo',
82
85
  :'smart_attribution' => :'smart_attribution',
83
86
  :'tracking_provider' => :'tracking_provider'
84
87
  }
@@ -102,6 +105,7 @@ module UltracartClient
102
105
  :'reason' => :'String',
103
106
  :'redirect_rows' => :'Array<SfvbRedirectDeleteRow>',
104
107
  :'segment_update' => :'SfvbCommsSegmentWriteRequest',
108
+ :'site_seo' => :'SfvbSiteSeoRequest',
105
109
  :'smart_attribution' => :'SfvbSmartAttributionRequest',
106
110
  :'tracking_provider' => :'SfvbTrackingProviderRequest'
107
111
  }
@@ -172,6 +176,10 @@ module UltracartClient
172
176
  self.segment_update = attributes[:'segment_update']
173
177
  end
174
178
 
179
+ if attributes.key?(:'site_seo')
180
+ self.site_seo = attributes[:'site_seo']
181
+ end
182
+
175
183
  if attributes.key?(:'smart_attribution')
176
184
  self.smart_attribution = attributes[:'smart_attribution']
177
185
  end
@@ -191,7 +199,7 @@ module UltracartClient
191
199
  # Check to see if the all the properties in the model are valid
192
200
  # @return true if the model is valid
193
201
  def valid?
194
- action_validator = EnumAttributeValidator.new('String', ["file.delete", "blog_post.delete", "file.put_script", "redirect.delete_batch", "experiment.start", "experiment.end", "upsell.enable", "item.attribute_batch", "item.pricing", "twilio_account.delete", "sending_domain.delete", "sequence_step.delete", "sequence_step.move", "sequence_step.enable_postcard", "segment.update", "smart_attribution.change", "smart_attribution.delete", "tracking_provider.change", "tracking_html.put", "affiliate_network.change", "affiliate_network.delete"])
202
+ action_validator = EnumAttributeValidator.new('String', ["file.delete", "blog_post.delete", "file.put_script", "redirect.delete_batch", "experiment.start", "experiment.end", "upsell.enable", "item.attribute_batch", "item.pricing", "twilio_account.delete", "sending_domain.delete", "sequence_step.delete", "sequence_step.move", "sequence_step.enable_postcard", "segment.update", "smart_attribution.change", "smart_attribution.delete", "tracking_provider.change", "tracking_html.put", "affiliate_network.change", "affiliate_network.delete", "site_seo.change"])
195
203
  return false unless action_validator.valid?(@action)
196
204
  true
197
205
  end
@@ -199,7 +207,7 @@ module UltracartClient
199
207
  # Custom attribute writer method checking allowed values (enum).
200
208
  # @param [Object] action Object to be assigned
201
209
  def action=(action)
202
- validator = EnumAttributeValidator.new('String', ["file.delete", "blog_post.delete", "file.put_script", "redirect.delete_batch", "experiment.start", "experiment.end", "upsell.enable", "item.attribute_batch", "item.pricing", "twilio_account.delete", "sending_domain.delete", "sequence_step.delete", "sequence_step.move", "sequence_step.enable_postcard", "segment.update", "smart_attribution.change", "smart_attribution.delete", "tracking_provider.change", "tracking_html.put", "affiliate_network.change", "affiliate_network.delete"])
210
+ validator = EnumAttributeValidator.new('String', ["file.delete", "blog_post.delete", "file.put_script", "redirect.delete_batch", "experiment.start", "experiment.end", "upsell.enable", "item.attribute_batch", "item.pricing", "twilio_account.delete", "sending_domain.delete", "sequence_step.delete", "sequence_step.move", "sequence_step.enable_postcard", "segment.update", "smart_attribution.change", "smart_attribution.delete", "tracking_provider.change", "tracking_html.put", "affiliate_network.change", "affiliate_network.delete", "site_seo.change"])
203
211
  unless validator.valid?(action)
204
212
  fail ArgumentError, "invalid value for \"action\", must be one of #{validator.allowable_values}."
205
213
  end
@@ -221,6 +229,7 @@ module UltracartClient
221
229
  reason == o.reason &&
222
230
  redirect_rows == o.redirect_rows &&
223
231
  segment_update == o.segment_update &&
232
+ site_seo == o.site_seo &&
224
233
  smart_attribution == o.smart_attribution &&
225
234
  tracking_provider == o.tracking_provider
226
235
  end
@@ -234,7 +243,7 @@ module UltracartClient
234
243
  # Calculates hash code according to all attributes.
235
244
  # @return [Integer] Hash code
236
245
  def hash
237
- [action, affiliate_network, content, experiment_start, item_attribute_rows, item_pricing, params, reason, redirect_rows, segment_update, smart_attribution, tracking_provider].hash
246
+ [action, affiliate_network, content, experiment_start, item_attribute_rows, item_pricing, params, reason, redirect_rows, segment_update, site_seo, smart_attribution, tracking_provider].hash
238
247
  end
239
248
 
240
249
  # Builds the object from hash
@@ -30,6 +30,9 @@ module UltracartClient
30
30
  # When the post was created (ISO 8601, UTC).
31
31
  attr_accessor :created_dts
32
32
 
33
+ # True when this is the result of a dry run and nothing was saved. The post is shown as it is stored.
34
+ attr_accessor :dry_run
35
+
33
36
  # The post excerpt as HTML, exactly as stored.
34
37
  attr_accessor :excerpt
35
38
 
@@ -77,6 +80,7 @@ module UltracartClient
77
80
  :'blog_post_oid' => :'blog_post_oid',
78
81
  :'body' => :'body',
79
82
  :'created_dts' => :'created_dts',
83
+ :'dry_run' => :'dry_run',
80
84
  :'excerpt' => :'excerpt',
81
85
  :'images' => :'images',
82
86
  :'last_modified_dts' => :'last_modified_dts',
@@ -106,6 +110,7 @@ module UltracartClient
106
110
  :'blog_post_oid' => :'Integer',
107
111
  :'body' => :'String',
108
112
  :'created_dts' => :'String',
113
+ :'dry_run' => :'Boolean',
109
114
  :'excerpt' => :'String',
110
115
  :'images' => :'Array<SfvbBlogPostImage>',
111
116
  :'last_modified_dts' => :'String',
@@ -163,6 +168,10 @@ module UltracartClient
163
168
  self.created_dts = attributes[:'created_dts']
164
169
  end
165
170
 
171
+ if attributes.key?(:'dry_run')
172
+ self.dry_run = attributes[:'dry_run']
173
+ end
174
+
166
175
  if attributes.key?(:'excerpt')
167
176
  self.excerpt = attributes[:'excerpt']
168
177
  end
@@ -243,6 +252,7 @@ module UltracartClient
243
252
  blog_post_oid == o.blog_post_oid &&
244
253
  body == o.body &&
245
254
  created_dts == o.created_dts &&
255
+ dry_run == o.dry_run &&
246
256
  excerpt == o.excerpt &&
247
257
  images == o.images &&
248
258
  last_modified_dts == o.last_modified_dts &&
@@ -267,7 +277,7 @@ module UltracartClient
267
277
  # Calculates hash code according to all attributes.
268
278
  # @return [Integer] Hash code
269
279
  def 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
280
+ [allow_comments, author, blog_post_oid, body, created_dts, dry_run, excerpt, images, last_modified_dts, publication_dts, seo_description, seo_keywords, seo_title, tags, title, unassigned, url_part, view_url, visibility].hash
271
281
  end
272
282
 
273
283
  # Builds the object from hash
@@ -24,6 +24,9 @@ module UltracartClient
24
24
  # The post body as HTML, up to 1 MB, rendered exactly as stored. Refused with sfvb.unsafe_html if it could run script - script and other executable tags, on attributes, links that are not http, https, mailto, tel or relative, and iframes other than YouTube or Vimeo players. Reference an attached image by the url the post's images report.
25
25
  attr_accessor :body
26
26
 
27
+ # On an update, true to run every check the write would run and save nothing. A refusal comes back exactly as it would on the real write.
28
+ attr_accessor :dry_run
29
+
27
30
  # The post excerpt as HTML, up to 256 KB. Held to the same rule as body.
28
31
  attr_accessor :excerpt
29
32
 
@@ -79,6 +82,7 @@ module UltracartClient
79
82
  :'allow_comments' => :'allow_comments',
80
83
  :'author' => :'author',
81
84
  :'body' => :'body',
85
+ :'dry_run' => :'dry_run',
82
86
  :'excerpt' => :'excerpt',
83
87
  :'publication_dts' => :'publication_dts',
84
88
  :'seo_description' => :'seo_description',
@@ -102,6 +106,7 @@ module UltracartClient
102
106
  :'allow_comments' => :'Boolean',
103
107
  :'author' => :'String',
104
108
  :'body' => :'String',
109
+ :'dry_run' => :'Boolean',
105
110
  :'excerpt' => :'String',
106
111
  :'publication_dts' => :'String',
107
112
  :'seo_description' => :'String',
@@ -147,6 +152,10 @@ module UltracartClient
147
152
  self.body = attributes[:'body']
148
153
  end
149
154
 
155
+ if attributes.key?(:'dry_run')
156
+ self.dry_run = attributes[:'dry_run']
157
+ end
158
+
150
159
  if attributes.key?(:'excerpt')
151
160
  self.excerpt = attributes[:'excerpt']
152
161
  end
@@ -219,6 +228,7 @@ module UltracartClient
219
228
  allow_comments == o.allow_comments &&
220
229
  author == o.author &&
221
230
  body == o.body &&
231
+ dry_run == o.dry_run &&
222
232
  excerpt == o.excerpt &&
223
233
  publication_dts == o.publication_dts &&
224
234
  seo_description == o.seo_description &&
@@ -239,7 +249,7 @@ module UltracartClient
239
249
  # Calculates hash code according to all attributes.
240
250
  # @return [Integer] Hash code
241
251
  def hash
242
- [allow_comments, author, body, excerpt, publication_dts, seo_description, seo_keywords, seo_title, tags, title, url_part, visibility].hash
252
+ [allow_comments, author, body, dry_run, excerpt, publication_dts, seo_description, seo_keywords, seo_title, tags, title, url_part, visibility].hash
243
253
  end
244
254
 
245
255
  # Builds the object from hash
@@ -27,6 +27,9 @@ module UltracartClient
27
27
  # First hit, ISO 8601.
28
28
  attr_accessor :first_seen_dts
29
29
 
30
+ # True when the entry is marked fixed or mapped. The next hit on the path clears it.
31
+ attr_accessor :fixed
32
+
30
33
  # Every recorded hit, bots included.
31
34
  attr_accessor :hits
32
35
 
@@ -55,6 +58,7 @@ module UltracartClient
55
58
  :'bot_share' => :'bot_share',
56
59
  :'counted_hits' => :'counted_hits',
57
60
  :'first_seen_dts' => :'first_seen_dts',
61
+ :'fixed' => :'fixed',
58
62
  :'hits' => :'hits',
59
63
  :'ignored' => :'ignored',
60
64
  :'last_seen_dts' => :'last_seen_dts',
@@ -77,6 +81,7 @@ module UltracartClient
77
81
  :'bot_share' => :'Object',
78
82
  :'counted_hits' => :'Integer',
79
83
  :'first_seen_dts' => :'String',
84
+ :'fixed' => :'Boolean',
80
85
  :'hits' => :'Integer',
81
86
  :'ignored' => :'Boolean',
82
87
  :'last_seen_dts' => :'String',
@@ -124,6 +129,10 @@ module UltracartClient
124
129
  self.first_seen_dts = attributes[:'first_seen_dts']
125
130
  end
126
131
 
132
+ if attributes.key?(:'fixed')
133
+ self.fixed = attributes[:'fixed']
134
+ end
135
+
127
136
  if attributes.key?(:'hits')
128
137
  self.hits = attributes[:'hits']
129
138
  end
@@ -177,6 +186,7 @@ module UltracartClient
177
186
  bot_share == o.bot_share &&
178
187
  counted_hits == o.counted_hits &&
179
188
  first_seen_dts == o.first_seen_dts &&
189
+ fixed == o.fixed &&
180
190
  hits == o.hits &&
181
191
  ignored == o.ignored &&
182
192
  last_seen_dts == o.last_seen_dts &&
@@ -195,7 +205,7 @@ module UltracartClient
195
205
  # Calculates hash code according to all attributes.
196
206
  # @return [Integer] Hash code
197
207
  def hash
198
- [bot_hits, bot_share, counted_hits, first_seen_dts, hits, ignored, last_seen_dts, not_found_id, path, redirected_to, referrer_hosts].hash
208
+ [bot_hits, bot_share, counted_hits, first_seen_dts, fixed, hits, ignored, last_seen_dts, not_found_id, path, redirected_to, referrer_hosts].hash
199
209
  end
200
210
 
201
211
  # Builds the object from hash
@@ -0,0 +1,280 @@
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 SfvbNotFoundSummary
18
+ # 404 hits per hour for the last 24 hours, oldest first.
19
+ attr_accessor :last_24_hours
20
+
21
+ # 404 hits per day, oldest first, ending today in the server's time zone. Bots and shoppers together.
22
+ attr_accessor :last_30_days
23
+
24
+ # 404 hits per day for the last 7 days, oldest first.
25
+ attr_accessor :last_7_days
26
+
27
+ # Up to 10 open paths first seen in the last 30 days, most hits first, leaving out paths only bots have hit.
28
+ attr_accessor :new_paths
29
+
30
+ # What a person should know about reading these counts.
31
+ attr_accessor :notes
32
+
33
+ # The sum of last_30_days.
34
+ attr_accessor :total_30_days
35
+
36
+ # Attribute mapping from ruby-style variable name to JSON key.
37
+ def self.attribute_map
38
+ {
39
+ :'last_24_hours' => :'last_24_hours',
40
+ :'last_30_days' => :'last_30_days',
41
+ :'last_7_days' => :'last_7_days',
42
+ :'new_paths' => :'new_paths',
43
+ :'notes' => :'notes',
44
+ :'total_30_days' => :'total_30_days'
45
+ }
46
+ end
47
+
48
+ # Returns all the JSON keys this model knows about
49
+ def self.acceptable_attributes
50
+ attribute_map.values
51
+ end
52
+
53
+ # Attribute type mapping.
54
+ def self.openapi_types
55
+ {
56
+ :'last_24_hours' => :'Array<Integer>',
57
+ :'last_30_days' => :'Array<Integer>',
58
+ :'last_7_days' => :'Array<Integer>',
59
+ :'new_paths' => :'Array<SfvbNotFoundEntry>',
60
+ :'notes' => :'Array<String>',
61
+ :'total_30_days' => :'Integer'
62
+ }
63
+ end
64
+
65
+ # List of attributes with nullable: true
66
+ def self.openapi_nullable
67
+ Set.new([
68
+ ])
69
+ end
70
+
71
+ # Initializes the object
72
+ # @param [Hash] attributes Model attributes in the form of hash
73
+ def initialize(attributes = {})
74
+ if (!attributes.is_a?(Hash))
75
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbNotFoundSummary` initialize method"
76
+ end
77
+
78
+ # check to see if the attribute exists and convert string to symbol for hash key
79
+ attributes = attributes.each_with_object({}) { |(k, v), h|
80
+ if (!self.class.attribute_map.key?(k.to_sym))
81
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbNotFoundSummary`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
82
+ end
83
+ h[k.to_sym] = v
84
+ }
85
+
86
+ if attributes.key?(:'last_24_hours')
87
+ if (value = attributes[:'last_24_hours']).is_a?(Array)
88
+ self.last_24_hours = value
89
+ end
90
+ end
91
+
92
+ if attributes.key?(:'last_30_days')
93
+ if (value = attributes[:'last_30_days']).is_a?(Array)
94
+ self.last_30_days = value
95
+ end
96
+ end
97
+
98
+ if attributes.key?(:'last_7_days')
99
+ if (value = attributes[:'last_7_days']).is_a?(Array)
100
+ self.last_7_days = value
101
+ end
102
+ end
103
+
104
+ if attributes.key?(:'new_paths')
105
+ if (value = attributes[:'new_paths']).is_a?(Array)
106
+ self.new_paths = value
107
+ end
108
+ end
109
+
110
+ if attributes.key?(:'notes')
111
+ if (value = attributes[:'notes']).is_a?(Array)
112
+ self.notes = value
113
+ end
114
+ end
115
+
116
+ if attributes.key?(:'total_30_days')
117
+ self.total_30_days = attributes[:'total_30_days']
118
+ end
119
+ end
120
+
121
+ # Show invalid properties with the reasons. Usually used together with valid?
122
+ # @return Array for valid properties with the reasons
123
+ def list_invalid_properties
124
+ invalid_properties = Array.new
125
+ invalid_properties
126
+ end
127
+
128
+ # Check to see if the all the properties in the model are valid
129
+ # @return true if the model is valid
130
+ def valid?
131
+ true
132
+ end
133
+
134
+ # Checks equality by comparing each attribute.
135
+ # @param [Object] Object to be compared
136
+ def ==(o)
137
+ return true if self.equal?(o)
138
+ self.class == o.class &&
139
+ last_24_hours == o.last_24_hours &&
140
+ last_30_days == o.last_30_days &&
141
+ last_7_days == o.last_7_days &&
142
+ new_paths == o.new_paths &&
143
+ notes == o.notes &&
144
+ total_30_days == o.total_30_days
145
+ end
146
+
147
+ # @see the `==` method
148
+ # @param [Object] Object to be compared
149
+ def eql?(o)
150
+ self == o
151
+ end
152
+
153
+ # Calculates hash code according to all attributes.
154
+ # @return [Integer] Hash code
155
+ def hash
156
+ [last_24_hours, last_30_days, last_7_days, new_paths, notes, total_30_days].hash
157
+ end
158
+
159
+ # Builds the object from hash
160
+ # @param [Hash] attributes Model attributes in the form of hash
161
+ # @return [Object] Returns the model itself
162
+ def self.build_from_hash(attributes)
163
+ new.build_from_hash(attributes)
164
+ end
165
+
166
+ # Builds the object from hash
167
+ # @param [Hash] attributes Model attributes in the form of hash
168
+ # @return [Object] Returns the model itself
169
+ def build_from_hash(attributes)
170
+ return nil unless attributes.is_a?(Hash)
171
+ attributes = attributes.transform_keys(&:to_sym)
172
+ self.class.openapi_types.each_pair do |key, type|
173
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
174
+ self.send("#{key}=", nil)
175
+ elsif type =~ /\AArray<(.*)>/i
176
+ # check to ensure the input is an array given that the attribute
177
+ # is documented as an array but the input is not
178
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
179
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
180
+ end
181
+ elsif !attributes[self.class.attribute_map[key]].nil?
182
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
183
+ end
184
+ end
185
+
186
+ self
187
+ end
188
+
189
+ # Deserializes the data based on type
190
+ # @param string type Data type
191
+ # @param string value Value to be deserialized
192
+ # @return [Object] Deserialized data
193
+ def _deserialize(type, value)
194
+ case type.to_sym
195
+ when :Time
196
+ Time.parse(value)
197
+ when :Date
198
+ Date.parse(value)
199
+ when :String
200
+ value.to_s
201
+ when :Integer
202
+ value.to_i
203
+ when :Float
204
+ value.to_f
205
+ when :Boolean
206
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
207
+ true
208
+ else
209
+ false
210
+ end
211
+ when :Object
212
+ # generic object (usually a Hash), return directly
213
+ value
214
+ when /\AArray<(?<inner_type>.+)>\z/
215
+ inner_type = Regexp.last_match[:inner_type]
216
+ value.map { |v| _deserialize(inner_type, v) }
217
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
218
+ k_type = Regexp.last_match[:k_type]
219
+ v_type = Regexp.last_match[:v_type]
220
+ {}.tap do |hash|
221
+ value.each do |k, v|
222
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
223
+ end
224
+ end
225
+ else # model
226
+ # models (e.g. Pet) or oneOf
227
+ klass = UltracartClient.const_get(type)
228
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
229
+ end
230
+ end
231
+
232
+ # Returns the string representation of the object
233
+ # @return [String] String presentation of the object
234
+ def to_s
235
+ to_hash.to_s
236
+ end
237
+
238
+ # to_body is an alias to to_hash (backward compatibility)
239
+ # @return [Hash] Returns the object in the form of hash
240
+ def to_body
241
+ to_hash
242
+ end
243
+
244
+ # Returns the object in the form of hash
245
+ # @return [Hash] Returns the object in the form of hash
246
+ def to_hash
247
+ hash = {}
248
+ self.class.attribute_map.each_pair do |attr, param|
249
+ value = self.send(attr)
250
+ if value.nil?
251
+ is_nullable = self.class.openapi_nullable.include?(attr)
252
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
253
+ end
254
+
255
+ hash[param] = _to_hash(value)
256
+ end
257
+ hash
258
+ end
259
+
260
+ # Outputs non-array value in the form of hash
261
+ # For object, use to_hash. Otherwise, just return the value
262
+ # @param [Object] value Any valid value
263
+ # @return [Hash] Returns the value in the form of hash
264
+ def _to_hash(value)
265
+ if value.is_a?(Array)
266
+ value.compact.map { |v| _to_hash(v) }
267
+ elsif value.is_a?(Hash)
268
+ {}.tap do |hash|
269
+ value.each { |k, v| hash[k] = _to_hash(v) }
270
+ end
271
+ elsif value.respond_to? :to_hash
272
+ value.to_hash
273
+ else
274
+ value
275
+ end
276
+ end
277
+
278
+ end
279
+
280
+ end
@@ -15,6 +15,9 @@ require 'time'
15
15
 
16
16
  module UltracartClient
17
17
  class SfvbRedirectImportRow
18
+ # True to leave the rule's source out of the generated sitemap. Left out means false, as in the admin.
19
+ attr_accessor :exclude_from_sitemap
20
+
18
21
  # Why the rule exists.
19
22
  attr_accessor :note
20
23
 
@@ -27,6 +30,7 @@ module UltracartClient
27
30
  # Attribute mapping from ruby-style variable name to JSON key.
28
31
  def self.attribute_map
29
32
  {
33
+ :'exclude_from_sitemap' => :'exclude_from_sitemap',
30
34
  :'note' => :'note',
31
35
  :'source' => :'source',
32
36
  :'target' => :'target'
@@ -41,6 +45,7 @@ module UltracartClient
41
45
  # Attribute type mapping.
42
46
  def self.openapi_types
43
47
  {
48
+ :'exclude_from_sitemap' => :'Boolean',
44
49
  :'note' => :'String',
45
50
  :'source' => :'String',
46
51
  :'target' => :'String'
@@ -68,6 +73,10 @@ module UltracartClient
68
73
  h[k.to_sym] = v
69
74
  }
70
75
 
76
+ if attributes.key?(:'exclude_from_sitemap')
77
+ self.exclude_from_sitemap = attributes[:'exclude_from_sitemap']
78
+ end
79
+
71
80
  if attributes.key?(:'note')
72
81
  self.note = attributes[:'note']
73
82
  end
@@ -99,6 +108,7 @@ module UltracartClient
99
108
  def ==(o)
100
109
  return true if self.equal?(o)
101
110
  self.class == o.class &&
111
+ exclude_from_sitemap == o.exclude_from_sitemap &&
102
112
  note == o.note &&
103
113
  source == o.source &&
104
114
  target == o.target
@@ -113,7 +123,7 @@ module UltracartClient
113
123
  # Calculates hash code according to all attributes.
114
124
  # @return [Integer] Hash code
115
125
  def hash
116
- [note, source, target].hash
126
+ [exclude_from_sitemap, note, source, target].hash
117
127
  end
118
128
 
119
129
  # Builds the object from hash
@@ -15,6 +15,9 @@ require 'time'
15
15
 
16
16
  module UltracartClient
17
17
  class SfvbRedirectRequest
18
+ # True to leave the rule's source out of the generated sitemap. On a create, left out means false, as in the admin. On an update, left out keeps the rule's value.
19
+ attr_accessor :exclude_from_sitemap
20
+
18
21
  # Why the rule exists, up to 500 characters.
19
22
  attr_accessor :note
20
23
 
@@ -33,6 +36,7 @@ module UltracartClient
33
36
  # Attribute mapping from ruby-style variable name to JSON key.
34
37
  def self.attribute_map
35
38
  {
39
+ :'exclude_from_sitemap' => :'exclude_from_sitemap',
36
40
  :'note' => :'note',
37
41
  :'over_live_page' => :'over_live_page',
38
42
  :'source' => :'source',
@@ -49,6 +53,7 @@ module UltracartClient
49
53
  # Attribute type mapping.
50
54
  def self.openapi_types
51
55
  {
56
+ :'exclude_from_sitemap' => :'Boolean',
52
57
  :'note' => :'String',
53
58
  :'over_live_page' => :'Boolean',
54
59
  :'source' => :'String',
@@ -78,6 +83,10 @@ module UltracartClient
78
83
  h[k.to_sym] = v
79
84
  }
80
85
 
86
+ if attributes.key?(:'exclude_from_sitemap')
87
+ self.exclude_from_sitemap = attributes[:'exclude_from_sitemap']
88
+ end
89
+
81
90
  if attributes.key?(:'note')
82
91
  self.note = attributes[:'note']
83
92
  end
@@ -117,6 +126,7 @@ module UltracartClient
117
126
  def ==(o)
118
127
  return true if self.equal?(o)
119
128
  self.class == o.class &&
129
+ exclude_from_sitemap == o.exclude_from_sitemap &&
120
130
  note == o.note &&
121
131
  over_live_page == o.over_live_page &&
122
132
  source == o.source &&
@@ -133,7 +143,7 @@ module UltracartClient
133
143
  # Calculates hash code according to all attributes.
134
144
  # @return [Integer] Hash code
135
145
  def hash
136
- [note, over_live_page, source, status, target].hash
146
+ [exclude_from_sitemap, note, over_live_page, source, status, target].hash
137
147
  end
138
148
 
139
149
  # Builds the object from hash