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.
@@ -2966,11 +2966,13 @@ module UltracartClient
2966
2966
  end
2967
2967
 
2968
2968
  # Clear one tracking provider
2969
- # Clears every field and secret the API can change, the consent gate and the events, and turns off Google Tag Gateway. The provider stops being sent anything. An OAuth connection is left alone, and notes say to disconnect it in the admin. Send the provider's hash_sha256 as If-Match. Needs sfvb_publish. No approval.
2969
+ # Clears every field and secret the API can change, the consent gate and the events, and turns off Google Tag Gateway. An OAuth connection is left alone, and notes say to disconnect it in the admin. Send the provider's hash_sha256 as If-Match. Needs sfvb_publish. dry_run=true reports the changes, and approval_needed, without clearing. No approval, except when the clear removes a consent gate while something outside the provider's fields still fires it (Google Ads for an affiliate's own Google conversion id, Commission Junction for an affiliate network of its type): that needs an approved tracking_provider.clear request for the provider (Approval-Id).
2970
2970
  # @param storefront_oid [Integer]
2971
2971
  # @param provider [String]
2972
2972
  # @param if_match [String] The provider's hash_sha256 from the last read. 428 when absent, 412 when stale.
2973
2973
  # @param [Hash] opts the optional parameters
2974
+ # @option opts [Boolean] :dry_run
2975
+ # @option opts [String] :approval_id When the clear removes a consent gate while something else still fires the provider, the approval_id of an approved tracking_provider.clear request for it. See POST /sfvb/approvals.
2974
2976
  # @return [SfvbTrackingProvider]
2975
2977
  def delete_sfvb_tracking_provider(storefront_oid, provider, if_match, opts = {})
2976
2978
  data, _status_code, _headers = delete_sfvb_tracking_provider_with_http_info(storefront_oid, provider, if_match, opts)
@@ -2978,11 +2980,13 @@ module UltracartClient
2978
2980
  end
2979
2981
 
2980
2982
  # Clear one tracking provider
2981
- # Clears every field and secret the API can change, the consent gate and the events, and turns off Google Tag Gateway. The provider stops being sent anything. An OAuth connection is left alone, and notes say to disconnect it in the admin. Send the provider's hash_sha256 as If-Match. Needs sfvb_publish. No approval.
2983
+ # Clears every field and secret the API can change, the consent gate and the events, and turns off Google Tag Gateway. An OAuth connection is left alone, and notes say to disconnect it in the admin. Send the provider's hash_sha256 as If-Match. Needs sfvb_publish. dry_run=true reports the changes, and approval_needed, without clearing. No approval, except when the clear removes a consent gate while something outside the provider's fields still fires it (Google Ads for an affiliate's own Google conversion id, Commission Junction for an affiliate network of its type): that needs an approved tracking_provider.clear request for the provider (Approval-Id).
2982
2984
  # @param storefront_oid [Integer]
2983
2985
  # @param provider [String]
2984
2986
  # @param if_match [String] The provider's hash_sha256 from the last read. 428 when absent, 412 when stale.
2985
2987
  # @param [Hash] opts the optional parameters
2988
+ # @option opts [Boolean] :dry_run
2989
+ # @option opts [String] :approval_id When the clear removes a consent gate while something else still fires the provider, the approval_id of an approved tracking_provider.clear request for it. See POST /sfvb/approvals.
2986
2990
  # @return [Array<(SfvbTrackingProvider, Integer, Hash)>] SfvbTrackingProvider data, response status code and response headers
2987
2991
  def delete_sfvb_tracking_provider_with_http_info(storefront_oid, provider, if_match, opts = {})
2988
2992
  if @api_client.config.debugging
@@ -3005,6 +3009,7 @@ module UltracartClient
3005
3009
 
3006
3010
  # query parameters
3007
3011
  query_params = opts[:query_params] || {}
3012
+ query_params[:'dry_run'] = opts[:'dry_run'] if !opts[:'dry_run'].nil?
3008
3013
 
3009
3014
  # header parameters
3010
3015
  header_params = opts[:header_params] || {}
@@ -3012,6 +3017,7 @@ module UltracartClient
3012
3017
  # HTTP header 'Accept' (if needed)
3013
3018
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3014
3019
  header_params[:'If-Match'] = if_match
3020
+ header_params[:'Approval-Id'] = opts[:'approval_id'] if !opts[:'approval_id'].nil?
3015
3021
 
3016
3022
  # form parameters
3017
3023
  form_params = opts[:form_params] || {}
@@ -5834,7 +5840,7 @@ module UltracartClient
5834
5840
  end
5835
5841
 
5836
5842
  # Find which storefront a communications uuid lives on
5837
- # Takes a campaign, flow, sequence, step, email, postcard, list or segment uuid and says which of this account's storefronts it is on, what it is, the campaign or flow it belongs to, and the command that reads it. A uuid nothing on this account has, another account's included, is 404. Read only.
5843
+ # Takes a campaign, flow, sequence, step, email, postcard, list or segment uuid and says which of this account's storefronts it is on, what it is, the campaign or flow it belongs to, and the command that reads it. An archived campaign or flow is found too, with archived true, and owner.archived is true when what was found belongs to one. A uuid nothing on this account has, another account's included, and a deleted step, email, postcard, list or segment, is 404. Read only.
5838
5844
  # @param uuid [String] The uuid to find.
5839
5845
  # @param [Hash] opts the optional parameters
5840
5846
  # @return [SfvbCommsLookupResponse]
@@ -5844,7 +5850,7 @@ module UltracartClient
5844
5850
  end
5845
5851
 
5846
5852
  # Find which storefront a communications uuid lives on
5847
- # Takes a campaign, flow, sequence, step, email, postcard, list or segment uuid and says which of this account&#39;s storefronts it is on, what it is, the campaign or flow it belongs to, and the command that reads it. A uuid nothing on this account has, another account&#39;s included, is 404. Read only.
5853
+ # Takes a campaign, flow, sequence, step, email, postcard, list or segment uuid and says which of this account&#39;s storefronts it is on, what it is, the campaign or flow it belongs to, and the command that reads it. An archived campaign or flow is found too, with archived true, and owner.archived is true when what was found belongs to one. A uuid nothing on this account has, another account&#39;s included, and a deleted step, email, postcard, list or segment, is 404. Read only.
5848
5854
  # @param uuid [String] The uuid to find.
5849
5855
  # @param [Hash] opts the optional parameters
5850
5856
  # @return [Array<(SfvbCommsLookupResponse, Integer, Hash)>] SfvbCommsLookupResponse data, response status code and response headers
@@ -16265,6 +16271,87 @@ module UltracartClient
16265
16271
  return data, status_code, headers
16266
16272
  end
16267
16273
 
16274
+ # Stage custom tracking HTML in a preview session
16275
+ # Runs Tracking HTML, Conversion HTML or both instead of the storefront's live slots, only in a browser that opened this session's preview access link, so a page can be checked before the write is approved. Staged Conversion HTML runs only on a test order's receipt. Each slot gets the same checks as a write. An empty string unstages a slot; a slot left out is left as it is. Containers pushed to the session later keep what is staged. Needs sfvb_write and a token that resolves to a user; no approval, since nothing durable is written and only that user's own session runs it.
16276
+ # @param storefront_oid [Integer]
16277
+ # @param preview_session_id [String]
16278
+ # @param preview_tracking_html [SfvbPreviewTrackingHtmlRequest] The HTML to stage
16279
+ # @param [Hash] opts the optional parameters
16280
+ # @return [SfvbTrackingHtmlResponse]
16281
+ def put_sfvb_preview_tracking_html(storefront_oid, preview_session_id, preview_tracking_html, opts = {})
16282
+ data, _status_code, _headers = put_sfvb_preview_tracking_html_with_http_info(storefront_oid, preview_session_id, preview_tracking_html, opts)
16283
+ data
16284
+ end
16285
+
16286
+ # Stage custom tracking HTML in a preview session
16287
+ # Runs Tracking HTML, Conversion HTML or both instead of the storefront&#39;s live slots, only in a browser that opened this session&#39;s preview access link, so a page can be checked before the write is approved. Staged Conversion HTML runs only on a test order&#39;s receipt. Each slot gets the same checks as a write. An empty string unstages a slot; a slot left out is left as it is. Containers pushed to the session later keep what is staged. Needs sfvb_write and a token that resolves to a user; no approval, since nothing durable is written and only that user&#39;s own session runs it.
16288
+ # @param storefront_oid [Integer]
16289
+ # @param preview_session_id [String]
16290
+ # @param preview_tracking_html [SfvbPreviewTrackingHtmlRequest] The HTML to stage
16291
+ # @param [Hash] opts the optional parameters
16292
+ # @return [Array<(SfvbTrackingHtmlResponse, Integer, Hash)>] SfvbTrackingHtmlResponse data, response status code and response headers
16293
+ def put_sfvb_preview_tracking_html_with_http_info(storefront_oid, preview_session_id, preview_tracking_html, opts = {})
16294
+ if @api_client.config.debugging
16295
+ @api_client.config.logger.debug 'Calling API: SfvbApi.put_sfvb_preview_tracking_html ...'
16296
+ end
16297
+ # verify the required parameter 'storefront_oid' is set
16298
+ if @api_client.config.client_side_validation && storefront_oid.nil?
16299
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.put_sfvb_preview_tracking_html"
16300
+ end
16301
+ # verify the required parameter 'preview_session_id' is set
16302
+ if @api_client.config.client_side_validation && preview_session_id.nil?
16303
+ fail ArgumentError, "Missing the required parameter 'preview_session_id' when calling SfvbApi.put_sfvb_preview_tracking_html"
16304
+ end
16305
+ # verify the required parameter 'preview_tracking_html' is set
16306
+ if @api_client.config.client_side_validation && preview_tracking_html.nil?
16307
+ fail ArgumentError, "Missing the required parameter 'preview_tracking_html' when calling SfvbApi.put_sfvb_preview_tracking_html"
16308
+ end
16309
+ # resource path
16310
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/preview_sessions/{preview_session_id}/tracking_html'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'preview_session_id' + '}', CGI.escape(preview_session_id.to_s))
16311
+
16312
+ # query parameters
16313
+ query_params = opts[:query_params] || {}
16314
+
16315
+ # header parameters
16316
+ header_params = opts[:header_params] || {}
16317
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
16318
+ # HTTP header 'Accept' (if needed)
16319
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
16320
+ # HTTP header 'Content-Type'
16321
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
16322
+ if !content_type.nil?
16323
+ header_params['Content-Type'] = content_type
16324
+ end
16325
+
16326
+ # form parameters
16327
+ form_params = opts[:form_params] || {}
16328
+
16329
+ # http body (model)
16330
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(preview_tracking_html)
16331
+
16332
+ # return_type
16333
+ return_type = opts[:debug_return_type] || 'SfvbTrackingHtmlResponse'
16334
+
16335
+ # auth_names
16336
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
16337
+
16338
+ new_options = opts.merge(
16339
+ :operation => :"SfvbApi.put_sfvb_preview_tracking_html",
16340
+ :header_params => header_params,
16341
+ :query_params => query_params,
16342
+ :form_params => form_params,
16343
+ :body => post_body,
16344
+ :auth_names => auth_names,
16345
+ :return_type => return_type
16346
+ )
16347
+
16348
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
16349
+ if @api_client.config.debugging
16350
+ @api_client.config.logger.debug "API called: SfvbApi#put_sfvb_preview_tracking_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
16351
+ end
16352
+ return data, status_code, headers
16353
+ end
16354
+
16268
16355
  # Turn the storefront's screen recording on or off
16269
16356
  # Turning it on records real shoppers' sessions from that moment, with no history before it. The first time starts a 14 day free trial, after which recorded sessions are billed per 1,000. Only change it when the merchant has asked for it. Asking for the state it is already in changes nothing, and changed comes back false. Always needs sfvb_publish, in both directions, because it decides whether live shoppers are recorded. Limited per storefront to 5 changes a minute, 20 an hour and 50 a day.
16270
16357
  # @param storefront_oid [Integer]
@@ -16880,6 +16967,87 @@ module UltracartClient
16880
16967
  return data, status_code, headers
16881
16968
  end
16882
16969
 
16970
+ # Render the Conversion HTML against a test order
16971
+ # The Conversion HTML as the receipt of that order would inject it: order tokens filled, then Velocity run with $order, $conversion and $formatHelper. Renders the stored slot, or content when it is sent (a draft, checked as a write is). Only a test order on this account may be used; a real or unknown order is refused the same way. Nothing is saved, injected or sent: the receipt's provider pixels, analytics and postbacks do not run, and a token that would write something ([CouponForNewAffiliate=...]) is left as written. Only the conversion slot renders; tracking HTML is checked by staging it in a preview session.
16972
+ # @param storefront_oid [Integer]
16973
+ # @param slot [String] conversion
16974
+ # @param tracking_html_render_request [SfvbTrackingHtmlRenderRequest] The test order, and optionally a draft
16975
+ # @param [Hash] opts the optional parameters
16976
+ # @return [SfvbTrackingHtmlRenderResponse]
16977
+ def render_sfvb_tracking_html(storefront_oid, slot, tracking_html_render_request, opts = {})
16978
+ data, _status_code, _headers = render_sfvb_tracking_html_with_http_info(storefront_oid, slot, tracking_html_render_request, opts)
16979
+ data
16980
+ end
16981
+
16982
+ # Render the Conversion HTML against a test order
16983
+ # The Conversion HTML as the receipt of that order would inject it: order tokens filled, then Velocity run with $order, $conversion and $formatHelper. Renders the stored slot, or content when it is sent (a draft, checked as a write is). Only a test order on this account may be used; a real or unknown order is refused the same way. Nothing is saved, injected or sent: the receipt&#39;s provider pixels, analytics and postbacks do not run, and a token that would write something ([CouponForNewAffiliate&#x3D;...]) is left as written. Only the conversion slot renders; tracking HTML is checked by staging it in a preview session.
16984
+ # @param storefront_oid [Integer]
16985
+ # @param slot [String] conversion
16986
+ # @param tracking_html_render_request [SfvbTrackingHtmlRenderRequest] The test order, and optionally a draft
16987
+ # @param [Hash] opts the optional parameters
16988
+ # @return [Array<(SfvbTrackingHtmlRenderResponse, Integer, Hash)>] SfvbTrackingHtmlRenderResponse data, response status code and response headers
16989
+ def render_sfvb_tracking_html_with_http_info(storefront_oid, slot, tracking_html_render_request, opts = {})
16990
+ if @api_client.config.debugging
16991
+ @api_client.config.logger.debug 'Calling API: SfvbApi.render_sfvb_tracking_html ...'
16992
+ end
16993
+ # verify the required parameter 'storefront_oid' is set
16994
+ if @api_client.config.client_side_validation && storefront_oid.nil?
16995
+ fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.render_sfvb_tracking_html"
16996
+ end
16997
+ # verify the required parameter 'slot' is set
16998
+ if @api_client.config.client_side_validation && slot.nil?
16999
+ fail ArgumentError, "Missing the required parameter 'slot' when calling SfvbApi.render_sfvb_tracking_html"
17000
+ end
17001
+ # verify the required parameter 'tracking_html_render_request' is set
17002
+ if @api_client.config.client_side_validation && tracking_html_render_request.nil?
17003
+ fail ArgumentError, "Missing the required parameter 'tracking_html_render_request' when calling SfvbApi.render_sfvb_tracking_html"
17004
+ end
17005
+ # resource path
17006
+ local_var_path = '/sfvb/storefronts/{storefront_oid}/tracking/html/{slot}/render'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'slot' + '}', CGI.escape(slot.to_s))
17007
+
17008
+ # query parameters
17009
+ query_params = opts[:query_params] || {}
17010
+
17011
+ # header parameters
17012
+ header_params = opts[:header_params] || {}
17013
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
17014
+ # HTTP header 'Accept' (if needed)
17015
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
17016
+ # HTTP header 'Content-Type'
17017
+ content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
17018
+ if !content_type.nil?
17019
+ header_params['Content-Type'] = content_type
17020
+ end
17021
+
17022
+ # form parameters
17023
+ form_params = opts[:form_params] || {}
17024
+
17025
+ # http body (model)
17026
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(tracking_html_render_request)
17027
+
17028
+ # return_type
17029
+ return_type = opts[:debug_return_type] || 'SfvbTrackingHtmlRenderResponse'
17030
+
17031
+ # auth_names
17032
+ auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
17033
+
17034
+ new_options = opts.merge(
17035
+ :operation => :"SfvbApi.render_sfvb_tracking_html",
17036
+ :header_params => header_params,
17037
+ :query_params => query_params,
17038
+ :form_params => form_params,
17039
+ :body => post_body,
17040
+ :auth_names => auth_names,
17041
+ :return_type => return_type
17042
+ )
17043
+
17044
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
17045
+ if @api_client.config.debugging
17046
+ @api_client.config.logger.debug "API called: SfvbApi#render_sfvb_tracking_html\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
17047
+ end
17048
+ return data, status_code, headers
17049
+ end
17050
+
16883
17051
  # Render a transactional email without sending it
16884
17052
  # Renders a transactional email, such as the order receipt, exactly as it is sent, and returns the subject, HTML and text. Nothing is sent or saved. file_name is the template file, such as receipt_html.vm, or the display name. Give cjson to render an unsaved draft of the email's body container in place of the saved one. The order must be a test order. Without one the email renders with a made up order.
16885
17053
  # @param storefront_oid [Integer]
@@ -75,7 +75,7 @@ module UltracartClient
75
75
  # The step to remove, for sequence_step.delete, to move, for sequence_step.move, or to turn on, for sequence_step.enable_postcard.
76
76
  attr_accessor :step_uuid
77
77
 
78
- # The tracking provider key, for tracking_provider.change.
78
+ # The tracking provider key, for tracking_provider.change and tracking_provider.clear.
79
79
  attr_accessor :tracking_provider
80
80
 
81
81
  # For upsell.enable, what to switch on.
@@ -15,6 +15,9 @@ require 'time'
15
15
 
16
16
  module UltracartClient
17
17
  class SfvbCommsLookupOwner
18
+ # True when the campaign or flow is archived. It sends nothing, and 'sf comms flows list' or 'campaigns list' shows it only with --include-deleted.
19
+ attr_accessor :archived
20
+
18
21
  # True when it is sending now, by the same rule the sequence read uses.
19
22
  attr_accessor :live
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
+ :'archived' => :'archived',
36
40
  :'live' => :'live',
37
41
  :'name' => :'name',
38
42
  :'status' => :'status',
@@ -49,6 +53,7 @@ module UltracartClient
49
53
  # Attribute type mapping.
50
54
  def self.openapi_types
51
55
  {
56
+ :'archived' => :'Boolean',
52
57
  :'live' => :'Boolean',
53
58
  :'name' => :'String',
54
59
  :'status' => :'String',
@@ -78,6 +83,10 @@ module UltracartClient
78
83
  h[k.to_sym] = v
79
84
  }
80
85
 
86
+ if attributes.key?(:'archived')
87
+ self.archived = attributes[:'archived']
88
+ end
89
+
81
90
  if attributes.key?(:'live')
82
91
  self.live = attributes[:'live']
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
+ archived == o.archived &&
120
130
  live == o.live &&
121
131
  name == o.name &&
122
132
  status == o.status &&
@@ -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
- [live, name, status, type, uuid].hash
146
+ [archived, live, name, status, type, uuid].hash
137
147
  end
138
148
 
139
149
  # Builds the object from hash
@@ -15,6 +15,9 @@ require 'time'
15
15
 
16
16
  module UltracartClient
17
17
  class SfvbCommsLookupResponse
18
+ # True when the uuid is an archived campaign or flow. It is still on its storefront and can be read; it sends nothing.
19
+ attr_accessor :archived
20
+
18
21
  # The sequence it belongs to, when there is one.
19
22
  attr_accessor :communication_sequence_uuid
20
23
 
@@ -44,6 +47,7 @@ module UltracartClient
44
47
  # Attribute mapping from ruby-style variable name to JSON key.
45
48
  def self.attribute_map
46
49
  {
50
+ :'archived' => :'archived',
47
51
  :'communication_sequence_uuid' => :'communication_sequence_uuid',
48
52
  :'kind' => :'kind',
49
53
  :'name' => :'name',
@@ -64,6 +68,7 @@ module UltracartClient
64
68
  # Attribute type mapping.
65
69
  def self.openapi_types
66
70
  {
71
+ :'archived' => :'Boolean',
67
72
  :'communication_sequence_uuid' => :'String',
68
73
  :'kind' => :'String',
69
74
  :'name' => :'String',
@@ -97,6 +102,10 @@ module UltracartClient
97
102
  h[k.to_sym] = v
98
103
  }
99
104
 
105
+ if attributes.key?(:'archived')
106
+ self.archived = attributes[:'archived']
107
+ end
108
+
100
109
  if attributes.key?(:'communication_sequence_uuid')
101
110
  self.communication_sequence_uuid = attributes[:'communication_sequence_uuid']
102
111
  end
@@ -154,6 +163,7 @@ module UltracartClient
154
163
  def ==(o)
155
164
  return true if self.equal?(o)
156
165
  self.class == o.class &&
166
+ archived == o.archived &&
157
167
  communication_sequence_uuid == o.communication_sequence_uuid &&
158
168
  kind == o.kind &&
159
169
  name == o.name &&
@@ -174,7 +184,7 @@ module UltracartClient
174
184
  # Calculates hash code according to all attributes.
175
185
  # @return [Integer] Hash code
176
186
  def hash
177
- [communication_sequence_uuid, kind, name, _next, notes, owner, step_uuid, storefront_oid, uuid].hash
187
+ [archived, communication_sequence_uuid, kind, name, _next, notes, owner, step_uuid, storefront_oid, uuid].hash
178
188
  end
179
189
 
180
190
  # Builds the object from hash
@@ -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 SfvbPreviewTrackingHtmlRequest
18
+ # Conversion HTML to run instead of the live slot on a test order's receipt opened through this session's preview access link. Never on a real order's receipt. An empty string unstages it. The same checks as a write apply.
19
+ attr_accessor :conversion_html
20
+
21
+ # Tracking HTML to run instead of the live slot on pages opened through this session's preview access link. An empty string unstages it. The same checks as a write apply.
22
+ attr_accessor :tracking_html
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'conversion_html' => :'conversion_html',
28
+ :'tracking_html' => :'tracking_html'
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
+ :'conversion_html' => :'String',
41
+ :'tracking_html' => :'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::SfvbPreviewTrackingHtmlRequest` 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::SfvbPreviewTrackingHtmlRequest`. 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?(:'conversion_html')
67
+ self.conversion_html = attributes[:'conversion_html']
68
+ end
69
+
70
+ if attributes.key?(:'tracking_html')
71
+ self.tracking_html = attributes[:'tracking_html']
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
+ conversion_html == o.conversion_html &&
94
+ tracking_html == o.tracking_html
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
+ [conversion_html, tracking_html].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
@@ -21,7 +21,7 @@ module UltracartClient
21
21
  # How long the render took in milliseconds.
22
22
  attr_accessor :duration_ms
23
23
 
24
- # Error lines in the log, including Velocity problems such as a null
24
+ # Error lines in the log, including Velocity problems such as setting a variable to null.
25
25
  attr_accessor :error_count
26
26
 
27
27
  # Lines in the full log text.