ultracart_api 4.1.208 → 4.1.210
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 +26 -2
- data/docs/SfvbApi.md +717 -48
- data/docs/SfvbArchiveRequest.md +18 -0
- data/docs/SfvbCampaign.md +16 -0
- data/docs/SfvbCampaignMembership.md +24 -0
- data/docs/SfvbCampaignWriteRequest.md +32 -0
- data/docs/SfvbCommsEmail.md +6 -0
- data/docs/SfvbCommsList.md +24 -0
- data/docs/SfvbCommsListsResponse.md +18 -0
- data/docs/SfvbCommsSegment.md +26 -0
- data/docs/SfvbCommsSegmentsResponse.md +18 -0
- data/docs/SfvbEmail.md +2 -0
- data/docs/SfvbEmailReviewRequest.md +18 -0
- data/docs/SfvbFlow.md +22 -0
- data/docs/SfvbFlowStatusRequest.md +18 -0
- data/docs/SfvbFlowWriteRequest.md +38 -0
- data/lib/ultracart_api/api/sfvb_api.rb +1027 -88
- data/lib/ultracart_api/models/sfvb_archive_request.rb +220 -0
- data/lib/ultracart_api/models/sfvb_campaign.rb +85 -1
- data/lib/ultracart_api/models/sfvb_campaign_membership.rb +250 -0
- data/lib/ultracart_api/models/sfvb_campaign_write_request.rb +292 -0
- data/lib/ultracart_api/models/sfvb_comms_email.rb +31 -1
- data/lib/ultracart_api/models/sfvb_comms_list.rb +250 -0
- data/lib/ultracart_api/models/sfvb_comms_lists_response.rb +222 -0
- data/lib/ultracart_api/models/sfvb_comms_segment.rb +260 -0
- data/lib/ultracart_api/models/sfvb_comms_segments_response.rb +222 -0
- data/lib/ultracart_api/models/sfvb_email.rb +13 -1
- data/lib/ultracart_api/models/sfvb_email_review_request.rb +220 -0
- data/lib/ultracart_api/models/sfvb_flow.rb +113 -1
- data/lib/ultracart_api/models/sfvb_flow_status_request.rb +254 -0
- data/lib/ultracart_api/models/sfvb_flow_write_request.rb +354 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +10 -0
- metadata +22 -2
|
@@ -196,6 +196,182 @@ module UltracartClient
|
|
|
196
196
|
return data, status_code, headers
|
|
197
197
|
end
|
|
198
198
|
|
|
199
|
+
# Archive or unarchive a campaign
|
|
200
|
+
# Archiving alone never stops a send, so archiving a scheduled campaign also sets it back to draft, and notes says so. A campaign whose send is under way is refused with sfvb.campaign_sending. Send the hash_sha256 you read as If-Match. A scheduled, sending or sent campaign needs sfvb_publish.
|
|
201
|
+
# @param storefront_oid [Integer]
|
|
202
|
+
# @param campaign_uuid [String]
|
|
203
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
204
|
+
# @param archive_request [SfvbArchiveRequest] Whether to archive
|
|
205
|
+
# @param [Hash] opts the optional parameters
|
|
206
|
+
# @return [SfvbCampaign]
|
|
207
|
+
def archive_sfvb_campaign(storefront_oid, campaign_uuid, if_match, archive_request, opts = {})
|
|
208
|
+
data, _status_code, _headers = archive_sfvb_campaign_with_http_info(storefront_oid, campaign_uuid, if_match, archive_request, opts)
|
|
209
|
+
data
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Archive or unarchive a campaign
|
|
213
|
+
# Archiving alone never stops a send, so archiving a scheduled campaign also sets it back to draft, and notes says so. A campaign whose send is under way is refused with sfvb.campaign_sending. Send the hash_sha256 you read as If-Match. A scheduled, sending or sent campaign needs sfvb_publish.
|
|
214
|
+
# @param storefront_oid [Integer]
|
|
215
|
+
# @param campaign_uuid [String]
|
|
216
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
217
|
+
# @param archive_request [SfvbArchiveRequest] Whether to archive
|
|
218
|
+
# @param [Hash] opts the optional parameters
|
|
219
|
+
# @return [Array<(SfvbCampaign, Integer, Hash)>] SfvbCampaign data, response status code and response headers
|
|
220
|
+
def archive_sfvb_campaign_with_http_info(storefront_oid, campaign_uuid, if_match, archive_request, opts = {})
|
|
221
|
+
if @api_client.config.debugging
|
|
222
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.archive_sfvb_campaign ...'
|
|
223
|
+
end
|
|
224
|
+
# verify the required parameter 'storefront_oid' is set
|
|
225
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
226
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.archive_sfvb_campaign"
|
|
227
|
+
end
|
|
228
|
+
# verify the required parameter 'campaign_uuid' is set
|
|
229
|
+
if @api_client.config.client_side_validation && campaign_uuid.nil?
|
|
230
|
+
fail ArgumentError, "Missing the required parameter 'campaign_uuid' when calling SfvbApi.archive_sfvb_campaign"
|
|
231
|
+
end
|
|
232
|
+
# verify the required parameter 'if_match' is set
|
|
233
|
+
if @api_client.config.client_side_validation && if_match.nil?
|
|
234
|
+
fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.archive_sfvb_campaign"
|
|
235
|
+
end
|
|
236
|
+
# verify the required parameter 'archive_request' is set
|
|
237
|
+
if @api_client.config.client_side_validation && archive_request.nil?
|
|
238
|
+
fail ArgumentError, "Missing the required parameter 'archive_request' when calling SfvbApi.archive_sfvb_campaign"
|
|
239
|
+
end
|
|
240
|
+
# resource path
|
|
241
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/campaigns/{campaign_uuid}/archive'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'campaign_uuid' + '}', CGI.escape(campaign_uuid.to_s))
|
|
242
|
+
|
|
243
|
+
# query parameters
|
|
244
|
+
query_params = opts[:query_params] || {}
|
|
245
|
+
|
|
246
|
+
# header parameters
|
|
247
|
+
header_params = opts[:header_params] || {}
|
|
248
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
249
|
+
# HTTP header 'Accept' (if needed)
|
|
250
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
251
|
+
# HTTP header 'Content-Type'
|
|
252
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
253
|
+
if !content_type.nil?
|
|
254
|
+
header_params['Content-Type'] = content_type
|
|
255
|
+
end
|
|
256
|
+
header_params[:'If-Match'] = if_match
|
|
257
|
+
|
|
258
|
+
# form parameters
|
|
259
|
+
form_params = opts[:form_params] || {}
|
|
260
|
+
|
|
261
|
+
# http body (model)
|
|
262
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(archive_request)
|
|
263
|
+
|
|
264
|
+
# return_type
|
|
265
|
+
return_type = opts[:debug_return_type] || 'SfvbCampaign'
|
|
266
|
+
|
|
267
|
+
# auth_names
|
|
268
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
269
|
+
|
|
270
|
+
new_options = opts.merge(
|
|
271
|
+
:operation => :"SfvbApi.archive_sfvb_campaign",
|
|
272
|
+
:header_params => header_params,
|
|
273
|
+
:query_params => query_params,
|
|
274
|
+
:form_params => form_params,
|
|
275
|
+
:body => post_body,
|
|
276
|
+
:auth_names => auth_names,
|
|
277
|
+
:return_type => return_type
|
|
278
|
+
)
|
|
279
|
+
|
|
280
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
281
|
+
if @api_client.config.debugging
|
|
282
|
+
@api_client.config.logger.debug "API called: SfvbApi#archive_sfvb_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
283
|
+
end
|
|
284
|
+
return data, status_code, headers
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
# Archive or unarchive a flow
|
|
288
|
+
# A flow that is still enrolling customers is refused, because archiving would only hide it. Set its status to inactive first. Send the hash_sha256 you read as If-Match.
|
|
289
|
+
# @param storefront_oid [Integer]
|
|
290
|
+
# @param flow_uuid [String]
|
|
291
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
292
|
+
# @param archive_request [SfvbArchiveRequest] Whether to archive
|
|
293
|
+
# @param [Hash] opts the optional parameters
|
|
294
|
+
# @return [SfvbFlow]
|
|
295
|
+
def archive_sfvb_flow(storefront_oid, flow_uuid, if_match, archive_request, opts = {})
|
|
296
|
+
data, _status_code, _headers = archive_sfvb_flow_with_http_info(storefront_oid, flow_uuid, if_match, archive_request, opts)
|
|
297
|
+
data
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
# Archive or unarchive a flow
|
|
301
|
+
# A flow that is still enrolling customers is refused, because archiving would only hide it. Set its status to inactive first. Send the hash_sha256 you read as If-Match.
|
|
302
|
+
# @param storefront_oid [Integer]
|
|
303
|
+
# @param flow_uuid [String]
|
|
304
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
305
|
+
# @param archive_request [SfvbArchiveRequest] Whether to archive
|
|
306
|
+
# @param [Hash] opts the optional parameters
|
|
307
|
+
# @return [Array<(SfvbFlow, Integer, Hash)>] SfvbFlow data, response status code and response headers
|
|
308
|
+
def archive_sfvb_flow_with_http_info(storefront_oid, flow_uuid, if_match, archive_request, opts = {})
|
|
309
|
+
if @api_client.config.debugging
|
|
310
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.archive_sfvb_flow ...'
|
|
311
|
+
end
|
|
312
|
+
# verify the required parameter 'storefront_oid' is set
|
|
313
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
314
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.archive_sfvb_flow"
|
|
315
|
+
end
|
|
316
|
+
# verify the required parameter 'flow_uuid' is set
|
|
317
|
+
if @api_client.config.client_side_validation && flow_uuid.nil?
|
|
318
|
+
fail ArgumentError, "Missing the required parameter 'flow_uuid' when calling SfvbApi.archive_sfvb_flow"
|
|
319
|
+
end
|
|
320
|
+
# verify the required parameter 'if_match' is set
|
|
321
|
+
if @api_client.config.client_side_validation && if_match.nil?
|
|
322
|
+
fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.archive_sfvb_flow"
|
|
323
|
+
end
|
|
324
|
+
# verify the required parameter 'archive_request' is set
|
|
325
|
+
if @api_client.config.client_side_validation && archive_request.nil?
|
|
326
|
+
fail ArgumentError, "Missing the required parameter 'archive_request' when calling SfvbApi.archive_sfvb_flow"
|
|
327
|
+
end
|
|
328
|
+
# resource path
|
|
329
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/flows/{flow_uuid}/archive'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'flow_uuid' + '}', CGI.escape(flow_uuid.to_s))
|
|
330
|
+
|
|
331
|
+
# query parameters
|
|
332
|
+
query_params = opts[:query_params] || {}
|
|
333
|
+
|
|
334
|
+
# header parameters
|
|
335
|
+
header_params = opts[:header_params] || {}
|
|
336
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
337
|
+
# HTTP header 'Accept' (if needed)
|
|
338
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
339
|
+
# HTTP header 'Content-Type'
|
|
340
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
341
|
+
if !content_type.nil?
|
|
342
|
+
header_params['Content-Type'] = content_type
|
|
343
|
+
end
|
|
344
|
+
header_params[:'If-Match'] = if_match
|
|
345
|
+
|
|
346
|
+
# form parameters
|
|
347
|
+
form_params = opts[:form_params] || {}
|
|
348
|
+
|
|
349
|
+
# http body (model)
|
|
350
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(archive_request)
|
|
351
|
+
|
|
352
|
+
# return_type
|
|
353
|
+
return_type = opts[:debug_return_type] || 'SfvbFlow'
|
|
354
|
+
|
|
355
|
+
# auth_names
|
|
356
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
357
|
+
|
|
358
|
+
new_options = opts.merge(
|
|
359
|
+
:operation => :"SfvbApi.archive_sfvb_flow",
|
|
360
|
+
:header_params => header_params,
|
|
361
|
+
:query_params => query_params,
|
|
362
|
+
:form_params => form_params,
|
|
363
|
+
:body => post_body,
|
|
364
|
+
:auth_names => auth_names,
|
|
365
|
+
:return_type => return_type
|
|
366
|
+
)
|
|
367
|
+
|
|
368
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
369
|
+
if @api_client.config.debugging
|
|
370
|
+
@api_client.config.logger.debug "API called: SfvbApi#archive_sfvb_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
371
|
+
end
|
|
372
|
+
return data, status_code, headers
|
|
373
|
+
end
|
|
374
|
+
|
|
199
375
|
# Archive an upsell path
|
|
200
376
|
# Files the path out of the default list. An archived path does not run. Archiving one that is switched on is a live change and needs sfvb_publish.
|
|
201
377
|
# @param storefront_oid [Integer]
|
|
@@ -400,13 +576,299 @@ module UltracartClient
|
|
|
400
576
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(redirect_request)
|
|
401
577
|
|
|
402
578
|
# return_type
|
|
403
|
-
return_type = opts[:debug_return_type] || 'SfvbRedirectCheckResponse'
|
|
579
|
+
return_type = opts[:debug_return_type] || 'SfvbRedirectCheckResponse'
|
|
580
|
+
|
|
581
|
+
# auth_names
|
|
582
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
583
|
+
|
|
584
|
+
new_options = opts.merge(
|
|
585
|
+
:operation => :"SfvbApi.check_sfvb_redirect",
|
|
586
|
+
:header_params => header_params,
|
|
587
|
+
:query_params => query_params,
|
|
588
|
+
:form_params => form_params,
|
|
589
|
+
:body => post_body,
|
|
590
|
+
:auth_names => auth_names,
|
|
591
|
+
:return_type => return_type
|
|
592
|
+
)
|
|
593
|
+
|
|
594
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
595
|
+
if @api_client.config.debugging
|
|
596
|
+
@api_client.config.logger.debug "API called: SfvbApi#check_sfvb_redirect\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
597
|
+
end
|
|
598
|
+
return data, status_code, headers
|
|
599
|
+
end
|
|
600
|
+
|
|
601
|
+
# Remove a library entry's screenshot
|
|
602
|
+
# Owner only, with the draft's hash_sha256 as If-Match. Clears the screenshot and thumbnail. Published revisions and copies that used the image keep it.
|
|
603
|
+
# @param storefront_oid [Integer]
|
|
604
|
+
# @param library_oid [Integer]
|
|
605
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
606
|
+
# @param [Hash] opts the optional parameters
|
|
607
|
+
# @return [SfvbLibraryEntry]
|
|
608
|
+
def clear_sfvb_library_screenshot(storefront_oid, library_oid, if_match, opts = {})
|
|
609
|
+
data, _status_code, _headers = clear_sfvb_library_screenshot_with_http_info(storefront_oid, library_oid, if_match, opts)
|
|
610
|
+
data
|
|
611
|
+
end
|
|
612
|
+
|
|
613
|
+
# Remove a library entry's screenshot
|
|
614
|
+
# Owner only, with the draft's hash_sha256 as If-Match. Clears the screenshot and thumbnail. Published revisions and copies that used the image keep it.
|
|
615
|
+
# @param storefront_oid [Integer]
|
|
616
|
+
# @param library_oid [Integer]
|
|
617
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
618
|
+
# @param [Hash] opts the optional parameters
|
|
619
|
+
# @return [Array<(SfvbLibraryEntry, Integer, Hash)>] SfvbLibraryEntry data, response status code and response headers
|
|
620
|
+
def clear_sfvb_library_screenshot_with_http_info(storefront_oid, library_oid, if_match, opts = {})
|
|
621
|
+
if @api_client.config.debugging
|
|
622
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.clear_sfvb_library_screenshot ...'
|
|
623
|
+
end
|
|
624
|
+
# verify the required parameter 'storefront_oid' is set
|
|
625
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
626
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.clear_sfvb_library_screenshot"
|
|
627
|
+
end
|
|
628
|
+
# verify the required parameter 'library_oid' is set
|
|
629
|
+
if @api_client.config.client_side_validation && library_oid.nil?
|
|
630
|
+
fail ArgumentError, "Missing the required parameter 'library_oid' when calling SfvbApi.clear_sfvb_library_screenshot"
|
|
631
|
+
end
|
|
632
|
+
# verify the required parameter 'if_match' is set
|
|
633
|
+
if @api_client.config.client_side_validation && if_match.nil?
|
|
634
|
+
fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.clear_sfvb_library_screenshot"
|
|
635
|
+
end
|
|
636
|
+
# resource path
|
|
637
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/library/{library_oid}/screenshot'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'library_oid' + '}', CGI.escape(library_oid.to_s))
|
|
638
|
+
|
|
639
|
+
# query parameters
|
|
640
|
+
query_params = opts[:query_params] || {}
|
|
641
|
+
|
|
642
|
+
# header parameters
|
|
643
|
+
header_params = opts[:header_params] || {}
|
|
644
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
645
|
+
# HTTP header 'Accept' (if needed)
|
|
646
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
647
|
+
header_params[:'If-Match'] = if_match
|
|
648
|
+
|
|
649
|
+
# form parameters
|
|
650
|
+
form_params = opts[:form_params] || {}
|
|
651
|
+
|
|
652
|
+
# http body (model)
|
|
653
|
+
post_body = opts[:debug_body]
|
|
654
|
+
|
|
655
|
+
# return_type
|
|
656
|
+
return_type = opts[:debug_return_type] || 'SfvbLibraryEntry'
|
|
657
|
+
|
|
658
|
+
# auth_names
|
|
659
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
660
|
+
|
|
661
|
+
new_options = opts.merge(
|
|
662
|
+
:operation => :"SfvbApi.clear_sfvb_library_screenshot",
|
|
663
|
+
:header_params => header_params,
|
|
664
|
+
:query_params => query_params,
|
|
665
|
+
:form_params => form_params,
|
|
666
|
+
:body => post_body,
|
|
667
|
+
:auth_names => auth_names,
|
|
668
|
+
:return_type => return_type
|
|
669
|
+
)
|
|
670
|
+
|
|
671
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
|
672
|
+
if @api_client.config.debugging
|
|
673
|
+
@api_client.config.logger.debug "API called: SfvbApi#clear_sfvb_library_screenshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
674
|
+
end
|
|
675
|
+
return data, status_code, headers
|
|
676
|
+
end
|
|
677
|
+
|
|
678
|
+
# Copy a campaign on the same storefront
|
|
679
|
+
# A draft copy with copies of its emails and postcards, named Copy of and the original name, never archived and never scheduled. Steps keep their settings, including a paused rate limiter or an experiment winner, and notes names each one.
|
|
680
|
+
# @param storefront_oid [Integer]
|
|
681
|
+
# @param campaign_uuid [String]
|
|
682
|
+
# @param [Hash] opts the optional parameters
|
|
683
|
+
# @return [SfvbCampaign]
|
|
684
|
+
def clone_sfvb_campaign(storefront_oid, campaign_uuid, opts = {})
|
|
685
|
+
data, _status_code, _headers = clone_sfvb_campaign_with_http_info(storefront_oid, campaign_uuid, opts)
|
|
686
|
+
data
|
|
687
|
+
end
|
|
688
|
+
|
|
689
|
+
# Copy a campaign on the same storefront
|
|
690
|
+
# A draft copy with copies of its emails and postcards, named Copy of and the original name, never archived and never scheduled. Steps keep their settings, including a paused rate limiter or an experiment winner, and notes names each one.
|
|
691
|
+
# @param storefront_oid [Integer]
|
|
692
|
+
# @param campaign_uuid [String]
|
|
693
|
+
# @param [Hash] opts the optional parameters
|
|
694
|
+
# @return [Array<(SfvbCampaign, Integer, Hash)>] SfvbCampaign data, response status code and response headers
|
|
695
|
+
def clone_sfvb_campaign_with_http_info(storefront_oid, campaign_uuid, opts = {})
|
|
696
|
+
if @api_client.config.debugging
|
|
697
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.clone_sfvb_campaign ...'
|
|
698
|
+
end
|
|
699
|
+
# verify the required parameter 'storefront_oid' is set
|
|
700
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
701
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.clone_sfvb_campaign"
|
|
702
|
+
end
|
|
703
|
+
# verify the required parameter 'campaign_uuid' is set
|
|
704
|
+
if @api_client.config.client_side_validation && campaign_uuid.nil?
|
|
705
|
+
fail ArgumentError, "Missing the required parameter 'campaign_uuid' when calling SfvbApi.clone_sfvb_campaign"
|
|
706
|
+
end
|
|
707
|
+
# resource path
|
|
708
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/campaigns/{campaign_uuid}/clone'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'campaign_uuid' + '}', CGI.escape(campaign_uuid.to_s))
|
|
709
|
+
|
|
710
|
+
# query parameters
|
|
711
|
+
query_params = opts[:query_params] || {}
|
|
712
|
+
|
|
713
|
+
# header parameters
|
|
714
|
+
header_params = opts[:header_params] || {}
|
|
715
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
716
|
+
# HTTP header 'Accept' (if needed)
|
|
717
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
718
|
+
|
|
719
|
+
# form parameters
|
|
720
|
+
form_params = opts[:form_params] || {}
|
|
721
|
+
|
|
722
|
+
# http body (model)
|
|
723
|
+
post_body = opts[:debug_body]
|
|
724
|
+
|
|
725
|
+
# return_type
|
|
726
|
+
return_type = opts[:debug_return_type] || 'SfvbCampaign'
|
|
727
|
+
|
|
728
|
+
# auth_names
|
|
729
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
730
|
+
|
|
731
|
+
new_options = opts.merge(
|
|
732
|
+
:operation => :"SfvbApi.clone_sfvb_campaign",
|
|
733
|
+
:header_params => header_params,
|
|
734
|
+
:query_params => query_params,
|
|
735
|
+
:form_params => form_params,
|
|
736
|
+
:body => post_body,
|
|
737
|
+
:auth_names => auth_names,
|
|
738
|
+
:return_type => return_type
|
|
739
|
+
)
|
|
740
|
+
|
|
741
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
742
|
+
if @api_client.config.debugging
|
|
743
|
+
@api_client.config.logger.debug "API called: SfvbApi#clone_sfvb_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
744
|
+
end
|
|
745
|
+
return data, status_code, headers
|
|
746
|
+
end
|
|
747
|
+
|
|
748
|
+
# Copy a flow on the same storefront
|
|
749
|
+
# A draft copy with copies of its emails and postcards, named Copy of and the original name, never archived. It enrolls nobody until it is turned on. Steps keep their settings, including a paused rate limiter or an experiment winner, and notes names each one.
|
|
750
|
+
# @param storefront_oid [Integer]
|
|
751
|
+
# @param flow_uuid [String]
|
|
752
|
+
# @param [Hash] opts the optional parameters
|
|
753
|
+
# @return [SfvbFlow]
|
|
754
|
+
def clone_sfvb_flow(storefront_oid, flow_uuid, opts = {})
|
|
755
|
+
data, _status_code, _headers = clone_sfvb_flow_with_http_info(storefront_oid, flow_uuid, opts)
|
|
756
|
+
data
|
|
757
|
+
end
|
|
758
|
+
|
|
759
|
+
# Copy a flow on the same storefront
|
|
760
|
+
# A draft copy with copies of its emails and postcards, named Copy of and the original name, never archived. It enrolls nobody until it is turned on. Steps keep their settings, including a paused rate limiter or an experiment winner, and notes names each one.
|
|
761
|
+
# @param storefront_oid [Integer]
|
|
762
|
+
# @param flow_uuid [String]
|
|
763
|
+
# @param [Hash] opts the optional parameters
|
|
764
|
+
# @return [Array<(SfvbFlow, Integer, Hash)>] SfvbFlow data, response status code and response headers
|
|
765
|
+
def clone_sfvb_flow_with_http_info(storefront_oid, flow_uuid, opts = {})
|
|
766
|
+
if @api_client.config.debugging
|
|
767
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.clone_sfvb_flow ...'
|
|
768
|
+
end
|
|
769
|
+
# verify the required parameter 'storefront_oid' is set
|
|
770
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
771
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.clone_sfvb_flow"
|
|
772
|
+
end
|
|
773
|
+
# verify the required parameter 'flow_uuid' is set
|
|
774
|
+
if @api_client.config.client_side_validation && flow_uuid.nil?
|
|
775
|
+
fail ArgumentError, "Missing the required parameter 'flow_uuid' when calling SfvbApi.clone_sfvb_flow"
|
|
776
|
+
end
|
|
777
|
+
# resource path
|
|
778
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/flows/{flow_uuid}/clone'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'flow_uuid' + '}', CGI.escape(flow_uuid.to_s))
|
|
779
|
+
|
|
780
|
+
# query parameters
|
|
781
|
+
query_params = opts[:query_params] || {}
|
|
782
|
+
|
|
783
|
+
# header parameters
|
|
784
|
+
header_params = opts[:header_params] || {}
|
|
785
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
786
|
+
# HTTP header 'Accept' (if needed)
|
|
787
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
788
|
+
|
|
789
|
+
# form parameters
|
|
790
|
+
form_params = opts[:form_params] || {}
|
|
791
|
+
|
|
792
|
+
# http body (model)
|
|
793
|
+
post_body = opts[:debug_body]
|
|
794
|
+
|
|
795
|
+
# return_type
|
|
796
|
+
return_type = opts[:debug_return_type] || 'SfvbFlow'
|
|
797
|
+
|
|
798
|
+
# auth_names
|
|
799
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
800
|
+
|
|
801
|
+
new_options = opts.merge(
|
|
802
|
+
:operation => :"SfvbApi.clone_sfvb_flow",
|
|
803
|
+
:header_params => header_params,
|
|
804
|
+
:query_params => query_params,
|
|
805
|
+
:form_params => form_params,
|
|
806
|
+
:body => post_body,
|
|
807
|
+
:auth_names => auth_names,
|
|
808
|
+
:return_type => return_type
|
|
809
|
+
)
|
|
810
|
+
|
|
811
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
812
|
+
if @api_client.config.debugging
|
|
813
|
+
@api_client.config.logger.debug "API called: SfvbApi#clone_sfvb_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
814
|
+
end
|
|
815
|
+
return data, status_code, headers
|
|
816
|
+
end
|
|
817
|
+
|
|
818
|
+
# Compile CJSON to Velocity
|
|
819
|
+
# Compiles a container document to Velocity without storing anything. Supply theme_oid to compile with the theme's inherit groups applied; omit it to compile standalone.
|
|
820
|
+
# @param compile_request [SfvbCompileRequest] CJSON to compile
|
|
821
|
+
# @param [Hash] opts the optional parameters
|
|
822
|
+
# @return [SfvbCompileResponse]
|
|
823
|
+
def compile_sfvb_cjson(compile_request, opts = {})
|
|
824
|
+
data, _status_code, _headers = compile_sfvb_cjson_with_http_info(compile_request, opts)
|
|
825
|
+
data
|
|
826
|
+
end
|
|
827
|
+
|
|
828
|
+
# Compile CJSON to Velocity
|
|
829
|
+
# Compiles a container document to Velocity without storing anything. Supply theme_oid to compile with the theme's inherit groups applied; omit it to compile standalone.
|
|
830
|
+
# @param compile_request [SfvbCompileRequest] CJSON to compile
|
|
831
|
+
# @param [Hash] opts the optional parameters
|
|
832
|
+
# @return [Array<(SfvbCompileResponse, Integer, Hash)>] SfvbCompileResponse data, response status code and response headers
|
|
833
|
+
def compile_sfvb_cjson_with_http_info(compile_request, opts = {})
|
|
834
|
+
if @api_client.config.debugging
|
|
835
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.compile_sfvb_cjson ...'
|
|
836
|
+
end
|
|
837
|
+
# verify the required parameter 'compile_request' is set
|
|
838
|
+
if @api_client.config.client_side_validation && compile_request.nil?
|
|
839
|
+
fail ArgumentError, "Missing the required parameter 'compile_request' when calling SfvbApi.compile_sfvb_cjson"
|
|
840
|
+
end
|
|
841
|
+
# resource path
|
|
842
|
+
local_var_path = '/sfvb/cjson/compile'
|
|
843
|
+
|
|
844
|
+
# query parameters
|
|
845
|
+
query_params = opts[:query_params] || {}
|
|
846
|
+
|
|
847
|
+
# header parameters
|
|
848
|
+
header_params = opts[:header_params] || {}
|
|
849
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
850
|
+
# HTTP header 'Accept' (if needed)
|
|
851
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
852
|
+
# HTTP header 'Content-Type'
|
|
853
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
854
|
+
if !content_type.nil?
|
|
855
|
+
header_params['Content-Type'] = content_type
|
|
856
|
+
end
|
|
857
|
+
|
|
858
|
+
# form parameters
|
|
859
|
+
form_params = opts[:form_params] || {}
|
|
860
|
+
|
|
861
|
+
# http body (model)
|
|
862
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(compile_request)
|
|
863
|
+
|
|
864
|
+
# return_type
|
|
865
|
+
return_type = opts[:debug_return_type] || 'SfvbCompileResponse'
|
|
404
866
|
|
|
405
867
|
# auth_names
|
|
406
868
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
407
869
|
|
|
408
870
|
new_options = opts.merge(
|
|
409
|
-
:operation => :"SfvbApi.
|
|
871
|
+
:operation => :"SfvbApi.compile_sfvb_cjson",
|
|
410
872
|
:header_params => header_params,
|
|
411
873
|
:query_params => query_params,
|
|
412
874
|
:form_params => form_params,
|
|
@@ -417,48 +879,42 @@ module UltracartClient
|
|
|
417
879
|
|
|
418
880
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
419
881
|
if @api_client.config.debugging
|
|
420
|
-
@api_client.config.logger.debug "API called: SfvbApi#
|
|
882
|
+
@api_client.config.logger.debug "API called: SfvbApi#compile_sfvb_cjson\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
421
883
|
end
|
|
422
884
|
return data, status_code, headers
|
|
423
885
|
end
|
|
424
886
|
|
|
425
|
-
#
|
|
426
|
-
#
|
|
887
|
+
# Create a draft campaign
|
|
888
|
+
# A new draft campaign with an empty communication sequence. name is required. The sender defaults to the storefront's marketing sending settings. Nothing here starts a campaign.
|
|
427
889
|
# @param storefront_oid [Integer]
|
|
428
|
-
# @param
|
|
429
|
-
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
890
|
+
# @param campaign_write_request [SfvbCampaignWriteRequest] The campaign to create
|
|
430
891
|
# @param [Hash] opts the optional parameters
|
|
431
|
-
# @return [
|
|
432
|
-
def
|
|
433
|
-
data, _status_code, _headers =
|
|
892
|
+
# @return [SfvbCampaign]
|
|
893
|
+
def create_sfvb_campaign(storefront_oid, campaign_write_request, opts = {})
|
|
894
|
+
data, _status_code, _headers = create_sfvb_campaign_with_http_info(storefront_oid, campaign_write_request, opts)
|
|
434
895
|
data
|
|
435
896
|
end
|
|
436
897
|
|
|
437
|
-
#
|
|
438
|
-
#
|
|
898
|
+
# Create a draft campaign
|
|
899
|
+
# A new draft campaign with an empty communication sequence. name is required. The sender defaults to the storefront's marketing sending settings. Nothing here starts a campaign.
|
|
439
900
|
# @param storefront_oid [Integer]
|
|
440
|
-
# @param
|
|
441
|
-
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
901
|
+
# @param campaign_write_request [SfvbCampaignWriteRequest] The campaign to create
|
|
442
902
|
# @param [Hash] opts the optional parameters
|
|
443
|
-
# @return [Array<(
|
|
444
|
-
def
|
|
903
|
+
# @return [Array<(SfvbCampaign, Integer, Hash)>] SfvbCampaign data, response status code and response headers
|
|
904
|
+
def create_sfvb_campaign_with_http_info(storefront_oid, campaign_write_request, opts = {})
|
|
445
905
|
if @api_client.config.debugging
|
|
446
|
-
@api_client.config.logger.debug 'Calling API: SfvbApi.
|
|
906
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.create_sfvb_campaign ...'
|
|
447
907
|
end
|
|
448
908
|
# verify the required parameter 'storefront_oid' is set
|
|
449
909
|
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
450
|
-
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.
|
|
451
|
-
end
|
|
452
|
-
# verify the required parameter 'library_oid' is set
|
|
453
|
-
if @api_client.config.client_side_validation && library_oid.nil?
|
|
454
|
-
fail ArgumentError, "Missing the required parameter 'library_oid' when calling SfvbApi.clear_sfvb_library_screenshot"
|
|
910
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.create_sfvb_campaign"
|
|
455
911
|
end
|
|
456
|
-
# verify the required parameter '
|
|
457
|
-
if @api_client.config.client_side_validation &&
|
|
458
|
-
fail ArgumentError, "Missing the required parameter '
|
|
912
|
+
# verify the required parameter 'campaign_write_request' is set
|
|
913
|
+
if @api_client.config.client_side_validation && campaign_write_request.nil?
|
|
914
|
+
fail ArgumentError, "Missing the required parameter 'campaign_write_request' when calling SfvbApi.create_sfvb_campaign"
|
|
459
915
|
end
|
|
460
916
|
# resource path
|
|
461
|
-
local_var_path = '/sfvb/storefronts/{storefront_oid}/
|
|
917
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/campaigns'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
462
918
|
|
|
463
919
|
# query parameters
|
|
464
920
|
query_params = opts[:query_params] || {}
|
|
@@ -468,22 +924,26 @@ module UltracartClient
|
|
|
468
924
|
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
469
925
|
# HTTP header 'Accept' (if needed)
|
|
470
926
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
471
|
-
|
|
927
|
+
# HTTP header 'Content-Type'
|
|
928
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
929
|
+
if !content_type.nil?
|
|
930
|
+
header_params['Content-Type'] = content_type
|
|
931
|
+
end
|
|
472
932
|
|
|
473
933
|
# form parameters
|
|
474
934
|
form_params = opts[:form_params] || {}
|
|
475
935
|
|
|
476
936
|
# http body (model)
|
|
477
|
-
post_body = opts[:debug_body]
|
|
937
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(campaign_write_request)
|
|
478
938
|
|
|
479
939
|
# return_type
|
|
480
|
-
return_type = opts[:debug_return_type] || '
|
|
940
|
+
return_type = opts[:debug_return_type] || 'SfvbCampaign'
|
|
481
941
|
|
|
482
942
|
# auth_names
|
|
483
943
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
484
944
|
|
|
485
945
|
new_options = opts.merge(
|
|
486
|
-
:operation => :"SfvbApi.
|
|
946
|
+
:operation => :"SfvbApi.create_sfvb_campaign",
|
|
487
947
|
:header_params => header_params,
|
|
488
948
|
:query_params => query_params,
|
|
489
949
|
:form_params => form_params,
|
|
@@ -492,38 +952,44 @@ module UltracartClient
|
|
|
492
952
|
:return_type => return_type
|
|
493
953
|
)
|
|
494
954
|
|
|
495
|
-
data, status_code, headers = @api_client.call_api(:
|
|
955
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
496
956
|
if @api_client.config.debugging
|
|
497
|
-
@api_client.config.logger.debug "API called: SfvbApi#
|
|
957
|
+
@api_client.config.logger.debug "API called: SfvbApi#create_sfvb_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
498
958
|
end
|
|
499
959
|
return data, status_code, headers
|
|
500
960
|
end
|
|
501
961
|
|
|
502
|
-
#
|
|
503
|
-
#
|
|
504
|
-
# @param
|
|
962
|
+
# Create a draft flow
|
|
963
|
+
# A new draft flow with an empty communication sequence. name and trigger_type are required. A list or segment trigger needs trigger_parameter, the uuid of a list or segment on this storefront. The sender defaults to the storefront's marketing sending settings. A draft flow enrolls nobody until it is turned on.
|
|
964
|
+
# @param storefront_oid [Integer]
|
|
965
|
+
# @param flow_write_request [SfvbFlowWriteRequest] The flow to create
|
|
505
966
|
# @param [Hash] opts the optional parameters
|
|
506
|
-
# @return [
|
|
507
|
-
def
|
|
508
|
-
data, _status_code, _headers =
|
|
967
|
+
# @return [SfvbFlow]
|
|
968
|
+
def create_sfvb_flow(storefront_oid, flow_write_request, opts = {})
|
|
969
|
+
data, _status_code, _headers = create_sfvb_flow_with_http_info(storefront_oid, flow_write_request, opts)
|
|
509
970
|
data
|
|
510
971
|
end
|
|
511
972
|
|
|
512
|
-
#
|
|
513
|
-
#
|
|
514
|
-
# @param
|
|
973
|
+
# Create a draft flow
|
|
974
|
+
# A new draft flow with an empty communication sequence. name and trigger_type are required. A list or segment trigger needs trigger_parameter, the uuid of a list or segment on this storefront. The sender defaults to the storefront's marketing sending settings. A draft flow enrolls nobody until it is turned on.
|
|
975
|
+
# @param storefront_oid [Integer]
|
|
976
|
+
# @param flow_write_request [SfvbFlowWriteRequest] The flow to create
|
|
515
977
|
# @param [Hash] opts the optional parameters
|
|
516
|
-
# @return [Array<(
|
|
517
|
-
def
|
|
978
|
+
# @return [Array<(SfvbFlow, Integer, Hash)>] SfvbFlow data, response status code and response headers
|
|
979
|
+
def create_sfvb_flow_with_http_info(storefront_oid, flow_write_request, opts = {})
|
|
518
980
|
if @api_client.config.debugging
|
|
519
|
-
@api_client.config.logger.debug 'Calling API: SfvbApi.
|
|
981
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.create_sfvb_flow ...'
|
|
520
982
|
end
|
|
521
|
-
# verify the required parameter '
|
|
522
|
-
if @api_client.config.client_side_validation &&
|
|
523
|
-
fail ArgumentError, "Missing the required parameter '
|
|
983
|
+
# verify the required parameter 'storefront_oid' is set
|
|
984
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
985
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.create_sfvb_flow"
|
|
986
|
+
end
|
|
987
|
+
# verify the required parameter 'flow_write_request' is set
|
|
988
|
+
if @api_client.config.client_side_validation && flow_write_request.nil?
|
|
989
|
+
fail ArgumentError, "Missing the required parameter 'flow_write_request' when calling SfvbApi.create_sfvb_flow"
|
|
524
990
|
end
|
|
525
991
|
# resource path
|
|
526
|
-
local_var_path = '/sfvb/
|
|
992
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/flows'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
527
993
|
|
|
528
994
|
# query parameters
|
|
529
995
|
query_params = opts[:query_params] || {}
|
|
@@ -543,16 +1009,16 @@ module UltracartClient
|
|
|
543
1009
|
form_params = opts[:form_params] || {}
|
|
544
1010
|
|
|
545
1011
|
# http body (model)
|
|
546
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
1012
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(flow_write_request)
|
|
547
1013
|
|
|
548
1014
|
# return_type
|
|
549
|
-
return_type = opts[:debug_return_type] || '
|
|
1015
|
+
return_type = opts[:debug_return_type] || 'SfvbFlow'
|
|
550
1016
|
|
|
551
1017
|
# auth_names
|
|
552
1018
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
553
1019
|
|
|
554
1020
|
new_options = opts.merge(
|
|
555
|
-
:operation => :"SfvbApi.
|
|
1021
|
+
:operation => :"SfvbApi.create_sfvb_flow",
|
|
556
1022
|
:header_params => header_params,
|
|
557
1023
|
:query_params => query_params,
|
|
558
1024
|
:form_params => form_params,
|
|
@@ -563,7 +1029,7 @@ module UltracartClient
|
|
|
563
1029
|
|
|
564
1030
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
565
1031
|
if @api_client.config.debugging
|
|
566
|
-
@api_client.config.logger.debug "API called: SfvbApi#
|
|
1032
|
+
@api_client.config.logger.debug "API called: SfvbApi#create_sfvb_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
567
1033
|
end
|
|
568
1034
|
return data, status_code, headers
|
|
569
1035
|
end
|
|
@@ -8207,6 +8673,134 @@ module UltracartClient
|
|
|
8207
8673
|
return data, status_code, headers
|
|
8208
8674
|
end
|
|
8209
8675
|
|
|
8676
|
+
# List the storefront's email lists
|
|
8677
|
+
# Each list's uuid, name and member count, by name, for a campaign's memberships or a list trigger. Never its members. Archived lists are left out.
|
|
8678
|
+
# @param storefront_oid [Integer]
|
|
8679
|
+
# @param [Hash] opts the optional parameters
|
|
8680
|
+
# @return [SfvbCommsListsResponse]
|
|
8681
|
+
def list_sfvb_comms_lists(storefront_oid, opts = {})
|
|
8682
|
+
data, _status_code, _headers = list_sfvb_comms_lists_with_http_info(storefront_oid, opts)
|
|
8683
|
+
data
|
|
8684
|
+
end
|
|
8685
|
+
|
|
8686
|
+
# List the storefront's email lists
|
|
8687
|
+
# Each list's uuid, name and member count, by name, for a campaign's memberships or a list trigger. Never its members. Archived lists are left out.
|
|
8688
|
+
# @param storefront_oid [Integer]
|
|
8689
|
+
# @param [Hash] opts the optional parameters
|
|
8690
|
+
# @return [Array<(SfvbCommsListsResponse, Integer, Hash)>] SfvbCommsListsResponse data, response status code and response headers
|
|
8691
|
+
def list_sfvb_comms_lists_with_http_info(storefront_oid, opts = {})
|
|
8692
|
+
if @api_client.config.debugging
|
|
8693
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_comms_lists ...'
|
|
8694
|
+
end
|
|
8695
|
+
# verify the required parameter 'storefront_oid' is set
|
|
8696
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
8697
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_comms_lists"
|
|
8698
|
+
end
|
|
8699
|
+
# resource path
|
|
8700
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/lists'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
8701
|
+
|
|
8702
|
+
# query parameters
|
|
8703
|
+
query_params = opts[:query_params] || {}
|
|
8704
|
+
|
|
8705
|
+
# header parameters
|
|
8706
|
+
header_params = opts[:header_params] || {}
|
|
8707
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
8708
|
+
# HTTP header 'Accept' (if needed)
|
|
8709
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
8710
|
+
|
|
8711
|
+
# form parameters
|
|
8712
|
+
form_params = opts[:form_params] || {}
|
|
8713
|
+
|
|
8714
|
+
# http body (model)
|
|
8715
|
+
post_body = opts[:debug_body]
|
|
8716
|
+
|
|
8717
|
+
# return_type
|
|
8718
|
+
return_type = opts[:debug_return_type] || 'SfvbCommsListsResponse'
|
|
8719
|
+
|
|
8720
|
+
# auth_names
|
|
8721
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
8722
|
+
|
|
8723
|
+
new_options = opts.merge(
|
|
8724
|
+
:operation => :"SfvbApi.list_sfvb_comms_lists",
|
|
8725
|
+
:header_params => header_params,
|
|
8726
|
+
:query_params => query_params,
|
|
8727
|
+
:form_params => form_params,
|
|
8728
|
+
:body => post_body,
|
|
8729
|
+
:auth_names => auth_names,
|
|
8730
|
+
:return_type => return_type
|
|
8731
|
+
)
|
|
8732
|
+
|
|
8733
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
8734
|
+
if @api_client.config.debugging
|
|
8735
|
+
@api_client.config.logger.debug "API called: SfvbApi#list_sfvb_comms_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
8736
|
+
end
|
|
8737
|
+
return data, status_code, headers
|
|
8738
|
+
end
|
|
8739
|
+
|
|
8740
|
+
# List the storefront's segments
|
|
8741
|
+
# Each segment's uuid, name and member count at its last rebuild, by name, for a campaign's memberships or a segment trigger. Never its members or its rule. Archived segments are left out.
|
|
8742
|
+
# @param storefront_oid [Integer]
|
|
8743
|
+
# @param [Hash] opts the optional parameters
|
|
8744
|
+
# @return [SfvbCommsSegmentsResponse]
|
|
8745
|
+
def list_sfvb_comms_segments(storefront_oid, opts = {})
|
|
8746
|
+
data, _status_code, _headers = list_sfvb_comms_segments_with_http_info(storefront_oid, opts)
|
|
8747
|
+
data
|
|
8748
|
+
end
|
|
8749
|
+
|
|
8750
|
+
# List the storefront's segments
|
|
8751
|
+
# Each segment's uuid, name and member count at its last rebuild, by name, for a campaign's memberships or a segment trigger. Never its members or its rule. Archived segments are left out.
|
|
8752
|
+
# @param storefront_oid [Integer]
|
|
8753
|
+
# @param [Hash] opts the optional parameters
|
|
8754
|
+
# @return [Array<(SfvbCommsSegmentsResponse, Integer, Hash)>] SfvbCommsSegmentsResponse data, response status code and response headers
|
|
8755
|
+
def list_sfvb_comms_segments_with_http_info(storefront_oid, opts = {})
|
|
8756
|
+
if @api_client.config.debugging
|
|
8757
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_comms_segments ...'
|
|
8758
|
+
end
|
|
8759
|
+
# verify the required parameter 'storefront_oid' is set
|
|
8760
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
8761
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_comms_segments"
|
|
8762
|
+
end
|
|
8763
|
+
# resource path
|
|
8764
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/segments'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
8765
|
+
|
|
8766
|
+
# query parameters
|
|
8767
|
+
query_params = opts[:query_params] || {}
|
|
8768
|
+
|
|
8769
|
+
# header parameters
|
|
8770
|
+
header_params = opts[:header_params] || {}
|
|
8771
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
8772
|
+
# HTTP header 'Accept' (if needed)
|
|
8773
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
8774
|
+
|
|
8775
|
+
# form parameters
|
|
8776
|
+
form_params = opts[:form_params] || {}
|
|
8777
|
+
|
|
8778
|
+
# http body (model)
|
|
8779
|
+
post_body = opts[:debug_body]
|
|
8780
|
+
|
|
8781
|
+
# return_type
|
|
8782
|
+
return_type = opts[:debug_return_type] || 'SfvbCommsSegmentsResponse'
|
|
8783
|
+
|
|
8784
|
+
# auth_names
|
|
8785
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
8786
|
+
|
|
8787
|
+
new_options = opts.merge(
|
|
8788
|
+
:operation => :"SfvbApi.list_sfvb_comms_segments",
|
|
8789
|
+
:header_params => header_params,
|
|
8790
|
+
:query_params => query_params,
|
|
8791
|
+
:form_params => form_params,
|
|
8792
|
+
:body => post_body,
|
|
8793
|
+
:auth_names => auth_names,
|
|
8794
|
+
:return_type => return_type
|
|
8795
|
+
)
|
|
8796
|
+
|
|
8797
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
8798
|
+
if @api_client.config.debugging
|
|
8799
|
+
@api_client.config.logger.debug "API called: SfvbApi#list_sfvb_comms_segments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
8800
|
+
end
|
|
8801
|
+
return data, status_code, headers
|
|
8802
|
+
end
|
|
8803
|
+
|
|
8210
8804
|
# Version history for a container stored outside the file system
|
|
8211
8805
|
# Addressed the same way as the container itself, so owner_type also says how owner_object_id is read and itemid lists the history of the item container that merchant item id names.
|
|
8212
8806
|
# @param storefront_oid [Integer]
|
|
@@ -12157,11 +12751,95 @@ module UltracartClient
|
|
|
12157
12751
|
fail ArgumentError, "Missing the required parameter 'container_revert_request' when calling SfvbApi.revert_sfvb_container"
|
|
12158
12752
|
end
|
|
12159
12753
|
# resource path
|
|
12160
|
-
local_var_path = '/sfvb/storefronts/{storefront_oid}/containers/{owner_type}/{owner_object_id}/revert'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'owner_type' + '}', CGI.escape(owner_type.to_s)).sub('{' + 'owner_object_id' + '}', CGI.escape(owner_object_id.to_s))
|
|
12754
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/containers/{owner_type}/{owner_object_id}/revert'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'owner_type' + '}', CGI.escape(owner_type.to_s)).sub('{' + 'owner_object_id' + '}', CGI.escape(owner_object_id.to_s))
|
|
12755
|
+
|
|
12756
|
+
# query parameters
|
|
12757
|
+
query_params = opts[:query_params] || {}
|
|
12758
|
+
query_params[:'container_name'] = opts[:'container_name'] if !opts[:'container_name'].nil?
|
|
12759
|
+
|
|
12760
|
+
# header parameters
|
|
12761
|
+
header_params = opts[:header_params] || {}
|
|
12762
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
12763
|
+
# HTTP header 'Accept' (if needed)
|
|
12764
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
12765
|
+
# HTTP header 'Content-Type'
|
|
12766
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
12767
|
+
if !content_type.nil?
|
|
12768
|
+
header_params['Content-Type'] = content_type
|
|
12769
|
+
end
|
|
12770
|
+
header_params[:'If-Match'] = if_match
|
|
12771
|
+
|
|
12772
|
+
# form parameters
|
|
12773
|
+
form_params = opts[:form_params] || {}
|
|
12774
|
+
|
|
12775
|
+
# http body (model)
|
|
12776
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(container_revert_request)
|
|
12777
|
+
|
|
12778
|
+
# return_type
|
|
12779
|
+
return_type = opts[:debug_return_type] || 'SfvbContainerResponse'
|
|
12780
|
+
|
|
12781
|
+
# auth_names
|
|
12782
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
12783
|
+
|
|
12784
|
+
new_options = opts.merge(
|
|
12785
|
+
:operation => :"SfvbApi.revert_sfvb_container",
|
|
12786
|
+
:header_params => header_params,
|
|
12787
|
+
:query_params => query_params,
|
|
12788
|
+
:form_params => form_params,
|
|
12789
|
+
:body => post_body,
|
|
12790
|
+
:auth_names => auth_names,
|
|
12791
|
+
:return_type => return_type
|
|
12792
|
+
)
|
|
12793
|
+
|
|
12794
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
12795
|
+
if @api_client.config.debugging
|
|
12796
|
+
@api_client.config.logger.debug "API called: SfvbApi#revert_sfvb_container\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
12797
|
+
end
|
|
12798
|
+
return data, status_code, headers
|
|
12799
|
+
end
|
|
12800
|
+
|
|
12801
|
+
# Revert a storefront file to an earlier version
|
|
12802
|
+
# The revert lands as a new version, so it is itself undoable.
|
|
12803
|
+
# @param storefront_oid [Integer]
|
|
12804
|
+
# @param if_match [String] Content hash of the file being reverted. Required; 428 when absent, 412 when stale.
|
|
12805
|
+
# @param file_revert_request [SfvbFileRevertRequest] Version to revert the file to
|
|
12806
|
+
# @param [Hash] opts the optional parameters
|
|
12807
|
+
# @option opts [String] :approval_id For a .js or .mjs file, the approval_id of an approved file.put_script request naming this version. Required for scripts. See POST /sfvb/approvals.
|
|
12808
|
+
# @return [SfvbFileWriteResponse]
|
|
12809
|
+
def revert_sfvb_file(storefront_oid, if_match, file_revert_request, opts = {})
|
|
12810
|
+
data, _status_code, _headers = revert_sfvb_file_with_http_info(storefront_oid, if_match, file_revert_request, opts)
|
|
12811
|
+
data
|
|
12812
|
+
end
|
|
12813
|
+
|
|
12814
|
+
# Revert a storefront file to an earlier version
|
|
12815
|
+
# The revert lands as a new version, so it is itself undoable.
|
|
12816
|
+
# @param storefront_oid [Integer]
|
|
12817
|
+
# @param if_match [String] Content hash of the file being reverted. Required; 428 when absent, 412 when stale.
|
|
12818
|
+
# @param file_revert_request [SfvbFileRevertRequest] Version to revert the file to
|
|
12819
|
+
# @param [Hash] opts the optional parameters
|
|
12820
|
+
# @option opts [String] :approval_id For a .js or .mjs file, the approval_id of an approved file.put_script request naming this version. Required for scripts. See POST /sfvb/approvals.
|
|
12821
|
+
# @return [Array<(SfvbFileWriteResponse, Integer, Hash)>] SfvbFileWriteResponse data, response status code and response headers
|
|
12822
|
+
def revert_sfvb_file_with_http_info(storefront_oid, if_match, file_revert_request, opts = {})
|
|
12823
|
+
if @api_client.config.debugging
|
|
12824
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.revert_sfvb_file ...'
|
|
12825
|
+
end
|
|
12826
|
+
# verify the required parameter 'storefront_oid' is set
|
|
12827
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
12828
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.revert_sfvb_file"
|
|
12829
|
+
end
|
|
12830
|
+
# verify the required parameter 'if_match' is set
|
|
12831
|
+
if @api_client.config.client_side_validation && if_match.nil?
|
|
12832
|
+
fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.revert_sfvb_file"
|
|
12833
|
+
end
|
|
12834
|
+
# verify the required parameter 'file_revert_request' is set
|
|
12835
|
+
if @api_client.config.client_side_validation && file_revert_request.nil?
|
|
12836
|
+
fail ArgumentError, "Missing the required parameter 'file_revert_request' when calling SfvbApi.revert_sfvb_file"
|
|
12837
|
+
end
|
|
12838
|
+
# resource path
|
|
12839
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/files/revert'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
12161
12840
|
|
|
12162
12841
|
# query parameters
|
|
12163
12842
|
query_params = opts[:query_params] || {}
|
|
12164
|
-
query_params[:'container_name'] = opts[:'container_name'] if !opts[:'container_name'].nil?
|
|
12165
12843
|
|
|
12166
12844
|
# header parameters
|
|
12167
12845
|
header_params = opts[:header_params] || {}
|
|
@@ -12174,21 +12852,22 @@ module UltracartClient
|
|
|
12174
12852
|
header_params['Content-Type'] = content_type
|
|
12175
12853
|
end
|
|
12176
12854
|
header_params[:'If-Match'] = if_match
|
|
12855
|
+
header_params[:'Approval-Id'] = opts[:'approval_id'] if !opts[:'approval_id'].nil?
|
|
12177
12856
|
|
|
12178
12857
|
# form parameters
|
|
12179
12858
|
form_params = opts[:form_params] || {}
|
|
12180
12859
|
|
|
12181
12860
|
# http body (model)
|
|
12182
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
12861
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(file_revert_request)
|
|
12183
12862
|
|
|
12184
12863
|
# return_type
|
|
12185
|
-
return_type = opts[:debug_return_type] || '
|
|
12864
|
+
return_type = opts[:debug_return_type] || 'SfvbFileWriteResponse'
|
|
12186
12865
|
|
|
12187
12866
|
# auth_names
|
|
12188
12867
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
12189
12868
|
|
|
12190
12869
|
new_options = opts.merge(
|
|
12191
|
-
:operation => :"SfvbApi.
|
|
12870
|
+
:operation => :"SfvbApi.revert_sfvb_file",
|
|
12192
12871
|
:header_params => header_params,
|
|
12193
12872
|
:query_params => query_params,
|
|
12194
12873
|
:form_params => form_params,
|
|
@@ -12199,50 +12878,48 @@ module UltracartClient
|
|
|
12199
12878
|
|
|
12200
12879
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
12201
12880
|
if @api_client.config.debugging
|
|
12202
|
-
@api_client.config.logger.debug "API called: SfvbApi#
|
|
12881
|
+
@api_client.config.logger.debug "API called: SfvbApi#revert_sfvb_file\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
12203
12882
|
end
|
|
12204
12883
|
return data, status_code, headers
|
|
12205
12884
|
end
|
|
12206
12885
|
|
|
12207
|
-
#
|
|
12208
|
-
#
|
|
12886
|
+
# Request a content review of a flow or campaign email
|
|
12887
|
+
# Starts a review the way the admin's Request Review does. One test copy of the email goes to the signed-in user, and to no one else, and the review runs in the background, so read the email again for pending_review and then the ruling. Refused with sfvb.review_not_needed when it doesn't need review, is already waiting for one, or was rejected and not changed since. An email in a flow triggered by an order or an auto order needs order_id, a test order. Needs a signed-in user, not an API key alone.
|
|
12209
12888
|
# @param storefront_oid [Integer]
|
|
12210
|
-
# @param
|
|
12211
|
-
# @param
|
|
12889
|
+
# @param email_uuid [String]
|
|
12890
|
+
# @param email_review_request [SfvbEmailReviewRequest] The test order, for an email in an order-triggered flow
|
|
12212
12891
|
# @param [Hash] opts the optional parameters
|
|
12213
|
-
# @
|
|
12214
|
-
|
|
12215
|
-
|
|
12216
|
-
data, _status_code, _headers = revert_sfvb_file_with_http_info(storefront_oid, if_match, file_revert_request, opts)
|
|
12892
|
+
# @return [SfvbEmail]
|
|
12893
|
+
def review_sfvb_email(storefront_oid, email_uuid, email_review_request, opts = {})
|
|
12894
|
+
data, _status_code, _headers = review_sfvb_email_with_http_info(storefront_oid, email_uuid, email_review_request, opts)
|
|
12217
12895
|
data
|
|
12218
12896
|
end
|
|
12219
12897
|
|
|
12220
|
-
#
|
|
12221
|
-
#
|
|
12898
|
+
# Request a content review of a flow or campaign email
|
|
12899
|
+
# Starts a review the way the admin's Request Review does. One test copy of the email goes to the signed-in user, and to no one else, and the review runs in the background, so read the email again for pending_review and then the ruling. Refused with sfvb.review_not_needed when it doesn't need review, is already waiting for one, or was rejected and not changed since. An email in a flow triggered by an order or an auto order needs order_id, a test order. Needs a signed-in user, not an API key alone.
|
|
12222
12900
|
# @param storefront_oid [Integer]
|
|
12223
|
-
# @param
|
|
12224
|
-
# @param
|
|
12901
|
+
# @param email_uuid [String]
|
|
12902
|
+
# @param email_review_request [SfvbEmailReviewRequest] The test order, for an email in an order-triggered flow
|
|
12225
12903
|
# @param [Hash] opts the optional parameters
|
|
12226
|
-
# @
|
|
12227
|
-
|
|
12228
|
-
def revert_sfvb_file_with_http_info(storefront_oid, if_match, file_revert_request, opts = {})
|
|
12904
|
+
# @return [Array<(SfvbEmail, Integer, Hash)>] SfvbEmail data, response status code and response headers
|
|
12905
|
+
def review_sfvb_email_with_http_info(storefront_oid, email_uuid, email_review_request, opts = {})
|
|
12229
12906
|
if @api_client.config.debugging
|
|
12230
|
-
@api_client.config.logger.debug 'Calling API: SfvbApi.
|
|
12907
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.review_sfvb_email ...'
|
|
12231
12908
|
end
|
|
12232
12909
|
# verify the required parameter 'storefront_oid' is set
|
|
12233
12910
|
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
12234
|
-
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.
|
|
12911
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.review_sfvb_email"
|
|
12235
12912
|
end
|
|
12236
|
-
# verify the required parameter '
|
|
12237
|
-
if @api_client.config.client_side_validation &&
|
|
12238
|
-
fail ArgumentError, "Missing the required parameter '
|
|
12913
|
+
# verify the required parameter 'email_uuid' is set
|
|
12914
|
+
if @api_client.config.client_side_validation && email_uuid.nil?
|
|
12915
|
+
fail ArgumentError, "Missing the required parameter 'email_uuid' when calling SfvbApi.review_sfvb_email"
|
|
12239
12916
|
end
|
|
12240
|
-
# verify the required parameter '
|
|
12241
|
-
if @api_client.config.client_side_validation &&
|
|
12242
|
-
fail ArgumentError, "Missing the required parameter '
|
|
12917
|
+
# verify the required parameter 'email_review_request' is set
|
|
12918
|
+
if @api_client.config.client_side_validation && email_review_request.nil?
|
|
12919
|
+
fail ArgumentError, "Missing the required parameter 'email_review_request' when calling SfvbApi.review_sfvb_email"
|
|
12243
12920
|
end
|
|
12244
12921
|
# resource path
|
|
12245
|
-
local_var_path = '/sfvb/storefronts/{storefront_oid}/
|
|
12922
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/emails/{email_uuid}/review'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'email_uuid' + '}', CGI.escape(email_uuid.to_s))
|
|
12246
12923
|
|
|
12247
12924
|
# query parameters
|
|
12248
12925
|
query_params = opts[:query_params] || {}
|
|
@@ -12257,23 +12934,21 @@ module UltracartClient
|
|
|
12257
12934
|
if !content_type.nil?
|
|
12258
12935
|
header_params['Content-Type'] = content_type
|
|
12259
12936
|
end
|
|
12260
|
-
header_params[:'If-Match'] = if_match
|
|
12261
|
-
header_params[:'Approval-Id'] = opts[:'approval_id'] if !opts[:'approval_id'].nil?
|
|
12262
12937
|
|
|
12263
12938
|
# form parameters
|
|
12264
12939
|
form_params = opts[:form_params] || {}
|
|
12265
12940
|
|
|
12266
12941
|
# http body (model)
|
|
12267
|
-
post_body = opts[:debug_body] || @api_client.object_to_http_body(
|
|
12942
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(email_review_request)
|
|
12268
12943
|
|
|
12269
12944
|
# return_type
|
|
12270
|
-
return_type = opts[:debug_return_type] || '
|
|
12945
|
+
return_type = opts[:debug_return_type] || 'SfvbEmail'
|
|
12271
12946
|
|
|
12272
12947
|
# auth_names
|
|
12273
12948
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
12274
12949
|
|
|
12275
12950
|
new_options = opts.merge(
|
|
12276
|
-
:operation => :"SfvbApi.
|
|
12951
|
+
:operation => :"SfvbApi.review_sfvb_email",
|
|
12277
12952
|
:header_params => header_params,
|
|
12278
12953
|
:query_params => query_params,
|
|
12279
12954
|
:form_params => form_params,
|
|
@@ -12284,7 +12959,7 @@ module UltracartClient
|
|
|
12284
12959
|
|
|
12285
12960
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
12286
12961
|
if @api_client.config.debugging
|
|
12287
|
-
@api_client.config.logger.debug "API called: SfvbApi#
|
|
12962
|
+
@api_client.config.logger.debug "API called: SfvbApi#review_sfvb_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
12288
12963
|
end
|
|
12289
12964
|
return data, status_code, headers
|
|
12290
12965
|
end
|
|
@@ -13199,6 +13874,94 @@ module UltracartClient
|
|
|
13199
13874
|
return data, status_code, headers
|
|
13200
13875
|
end
|
|
13201
13876
|
|
|
13877
|
+
# Change a campaign
|
|
13878
|
+
# A field left out keeps its value; memberships replaces the whole set. The status is never changed here. Send the hash_sha256 you read as If-Match. A scheduled, sending or sent campaign needs sfvb_publish, and a change to a scheduled one applies to the send that is coming. notes lists any emails a sending domain change put back to needing review.
|
|
13879
|
+
# @param storefront_oid [Integer]
|
|
13880
|
+
# @param campaign_uuid [String]
|
|
13881
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
13882
|
+
# @param campaign_write_request [SfvbCampaignWriteRequest] The fields to change
|
|
13883
|
+
# @param [Hash] opts the optional parameters
|
|
13884
|
+
# @return [SfvbCampaign]
|
|
13885
|
+
def update_sfvb_campaign(storefront_oid, campaign_uuid, if_match, campaign_write_request, opts = {})
|
|
13886
|
+
data, _status_code, _headers = update_sfvb_campaign_with_http_info(storefront_oid, campaign_uuid, if_match, campaign_write_request, opts)
|
|
13887
|
+
data
|
|
13888
|
+
end
|
|
13889
|
+
|
|
13890
|
+
# Change a campaign
|
|
13891
|
+
# A field left out keeps its value; memberships replaces the whole set. The status is never changed here. Send the hash_sha256 you read as If-Match. A scheduled, sending or sent campaign needs sfvb_publish, and a change to a scheduled one applies to the send that is coming. notes lists any emails a sending domain change put back to needing review.
|
|
13892
|
+
# @param storefront_oid [Integer]
|
|
13893
|
+
# @param campaign_uuid [String]
|
|
13894
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
13895
|
+
# @param campaign_write_request [SfvbCampaignWriteRequest] The fields to change
|
|
13896
|
+
# @param [Hash] opts the optional parameters
|
|
13897
|
+
# @return [Array<(SfvbCampaign, Integer, Hash)>] SfvbCampaign data, response status code and response headers
|
|
13898
|
+
def update_sfvb_campaign_with_http_info(storefront_oid, campaign_uuid, if_match, campaign_write_request, opts = {})
|
|
13899
|
+
if @api_client.config.debugging
|
|
13900
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.update_sfvb_campaign ...'
|
|
13901
|
+
end
|
|
13902
|
+
# verify the required parameter 'storefront_oid' is set
|
|
13903
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
13904
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.update_sfvb_campaign"
|
|
13905
|
+
end
|
|
13906
|
+
# verify the required parameter 'campaign_uuid' is set
|
|
13907
|
+
if @api_client.config.client_side_validation && campaign_uuid.nil?
|
|
13908
|
+
fail ArgumentError, "Missing the required parameter 'campaign_uuid' when calling SfvbApi.update_sfvb_campaign"
|
|
13909
|
+
end
|
|
13910
|
+
# verify the required parameter 'if_match' is set
|
|
13911
|
+
if @api_client.config.client_side_validation && if_match.nil?
|
|
13912
|
+
fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.update_sfvb_campaign"
|
|
13913
|
+
end
|
|
13914
|
+
# verify the required parameter 'campaign_write_request' is set
|
|
13915
|
+
if @api_client.config.client_side_validation && campaign_write_request.nil?
|
|
13916
|
+
fail ArgumentError, "Missing the required parameter 'campaign_write_request' when calling SfvbApi.update_sfvb_campaign"
|
|
13917
|
+
end
|
|
13918
|
+
# resource path
|
|
13919
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/campaigns/{campaign_uuid}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'campaign_uuid' + '}', CGI.escape(campaign_uuid.to_s))
|
|
13920
|
+
|
|
13921
|
+
# query parameters
|
|
13922
|
+
query_params = opts[:query_params] || {}
|
|
13923
|
+
|
|
13924
|
+
# header parameters
|
|
13925
|
+
header_params = opts[:header_params] || {}
|
|
13926
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
13927
|
+
# HTTP header 'Accept' (if needed)
|
|
13928
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
13929
|
+
# HTTP header 'Content-Type'
|
|
13930
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
13931
|
+
if !content_type.nil?
|
|
13932
|
+
header_params['Content-Type'] = content_type
|
|
13933
|
+
end
|
|
13934
|
+
header_params[:'If-Match'] = if_match
|
|
13935
|
+
|
|
13936
|
+
# form parameters
|
|
13937
|
+
form_params = opts[:form_params] || {}
|
|
13938
|
+
|
|
13939
|
+
# http body (model)
|
|
13940
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(campaign_write_request)
|
|
13941
|
+
|
|
13942
|
+
# return_type
|
|
13943
|
+
return_type = opts[:debug_return_type] || 'SfvbCampaign'
|
|
13944
|
+
|
|
13945
|
+
# auth_names
|
|
13946
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
13947
|
+
|
|
13948
|
+
new_options = opts.merge(
|
|
13949
|
+
:operation => :"SfvbApi.update_sfvb_campaign",
|
|
13950
|
+
:header_params => header_params,
|
|
13951
|
+
:query_params => query_params,
|
|
13952
|
+
:form_params => form_params,
|
|
13953
|
+
:body => post_body,
|
|
13954
|
+
:auth_names => auth_names,
|
|
13955
|
+
:return_type => return_type
|
|
13956
|
+
)
|
|
13957
|
+
|
|
13958
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
13959
|
+
if @api_client.config.debugging
|
|
13960
|
+
@api_client.config.logger.debug "API called: SfvbApi#update_sfvb_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
13961
|
+
end
|
|
13962
|
+
return data, status_code, headers
|
|
13963
|
+
end
|
|
13964
|
+
|
|
13202
13965
|
# Update a sending domain
|
|
13203
13966
|
# Only a mailgun domain's mailgun_api_key can change. Send it as a secret handle made for the domain to replace it, or as the mask it was read with to keep it. A new key sets up UltraCart's webhooks again with it; if Mailgun refuses, nothing is saved and the handle is given back unused.
|
|
13204
13967
|
# @param domain [String]
|
|
@@ -13431,6 +14194,182 @@ module UltracartClient
|
|
|
13431
14194
|
return data, status_code, headers
|
|
13432
14195
|
end
|
|
13433
14196
|
|
|
14197
|
+
# Change a flow
|
|
14198
|
+
# A field left out keeps its value. The trigger and the status are never changed here. Send the hash_sha256 you read as If-Match. A flow that is enrolling customers needs sfvb_publish.
|
|
14199
|
+
# @param storefront_oid [Integer]
|
|
14200
|
+
# @param flow_uuid [String]
|
|
14201
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
14202
|
+
# @param flow_write_request [SfvbFlowWriteRequest] The fields to change
|
|
14203
|
+
# @param [Hash] opts the optional parameters
|
|
14204
|
+
# @return [SfvbFlow]
|
|
14205
|
+
def update_sfvb_flow(storefront_oid, flow_uuid, if_match, flow_write_request, opts = {})
|
|
14206
|
+
data, _status_code, _headers = update_sfvb_flow_with_http_info(storefront_oid, flow_uuid, if_match, flow_write_request, opts)
|
|
14207
|
+
data
|
|
14208
|
+
end
|
|
14209
|
+
|
|
14210
|
+
# Change a flow
|
|
14211
|
+
# A field left out keeps its value. The trigger and the status are never changed here. Send the hash_sha256 you read as If-Match. A flow that is enrolling customers needs sfvb_publish.
|
|
14212
|
+
# @param storefront_oid [Integer]
|
|
14213
|
+
# @param flow_uuid [String]
|
|
14214
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
14215
|
+
# @param flow_write_request [SfvbFlowWriteRequest] The fields to change
|
|
14216
|
+
# @param [Hash] opts the optional parameters
|
|
14217
|
+
# @return [Array<(SfvbFlow, Integer, Hash)>] SfvbFlow data, response status code and response headers
|
|
14218
|
+
def update_sfvb_flow_with_http_info(storefront_oid, flow_uuid, if_match, flow_write_request, opts = {})
|
|
14219
|
+
if @api_client.config.debugging
|
|
14220
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.update_sfvb_flow ...'
|
|
14221
|
+
end
|
|
14222
|
+
# verify the required parameter 'storefront_oid' is set
|
|
14223
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
14224
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.update_sfvb_flow"
|
|
14225
|
+
end
|
|
14226
|
+
# verify the required parameter 'flow_uuid' is set
|
|
14227
|
+
if @api_client.config.client_side_validation && flow_uuid.nil?
|
|
14228
|
+
fail ArgumentError, "Missing the required parameter 'flow_uuid' when calling SfvbApi.update_sfvb_flow"
|
|
14229
|
+
end
|
|
14230
|
+
# verify the required parameter 'if_match' is set
|
|
14231
|
+
if @api_client.config.client_side_validation && if_match.nil?
|
|
14232
|
+
fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.update_sfvb_flow"
|
|
14233
|
+
end
|
|
14234
|
+
# verify the required parameter 'flow_write_request' is set
|
|
14235
|
+
if @api_client.config.client_side_validation && flow_write_request.nil?
|
|
14236
|
+
fail ArgumentError, "Missing the required parameter 'flow_write_request' when calling SfvbApi.update_sfvb_flow"
|
|
14237
|
+
end
|
|
14238
|
+
# resource path
|
|
14239
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/flows/{flow_uuid}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'flow_uuid' + '}', CGI.escape(flow_uuid.to_s))
|
|
14240
|
+
|
|
14241
|
+
# query parameters
|
|
14242
|
+
query_params = opts[:query_params] || {}
|
|
14243
|
+
|
|
14244
|
+
# header parameters
|
|
14245
|
+
header_params = opts[:header_params] || {}
|
|
14246
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
14247
|
+
# HTTP header 'Accept' (if needed)
|
|
14248
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
14249
|
+
# HTTP header 'Content-Type'
|
|
14250
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
14251
|
+
if !content_type.nil?
|
|
14252
|
+
header_params['Content-Type'] = content_type
|
|
14253
|
+
end
|
|
14254
|
+
header_params[:'If-Match'] = if_match
|
|
14255
|
+
|
|
14256
|
+
# form parameters
|
|
14257
|
+
form_params = opts[:form_params] || {}
|
|
14258
|
+
|
|
14259
|
+
# http body (model)
|
|
14260
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(flow_write_request)
|
|
14261
|
+
|
|
14262
|
+
# return_type
|
|
14263
|
+
return_type = opts[:debug_return_type] || 'SfvbFlow'
|
|
14264
|
+
|
|
14265
|
+
# auth_names
|
|
14266
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
14267
|
+
|
|
14268
|
+
new_options = opts.merge(
|
|
14269
|
+
:operation => :"SfvbApi.update_sfvb_flow",
|
|
14270
|
+
:header_params => header_params,
|
|
14271
|
+
:query_params => query_params,
|
|
14272
|
+
:form_params => form_params,
|
|
14273
|
+
:body => post_body,
|
|
14274
|
+
:auth_names => auth_names,
|
|
14275
|
+
:return_type => return_type
|
|
14276
|
+
)
|
|
14277
|
+
|
|
14278
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
14279
|
+
if @api_client.config.debugging
|
|
14280
|
+
@api_client.config.logger.debug "API called: SfvbApi#update_sfvb_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
14281
|
+
end
|
|
14282
|
+
return data, status_code, headers
|
|
14283
|
+
end
|
|
14284
|
+
|
|
14285
|
+
# Turn a flow on or off
|
|
14286
|
+
# active enrolls customers as they trigger the flow from now on, and they receive its emails. inactive stops new enrollments. Always needs sfvb_publish. Send the hash_sha256 you read as If-Match.
|
|
14287
|
+
# @param storefront_oid [Integer]
|
|
14288
|
+
# @param flow_uuid [String]
|
|
14289
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
14290
|
+
# @param flow_status_request [SfvbFlowStatusRequest] The status to set
|
|
14291
|
+
# @param [Hash] opts the optional parameters
|
|
14292
|
+
# @return [SfvbFlow]
|
|
14293
|
+
def update_sfvb_flow_status(storefront_oid, flow_uuid, if_match, flow_status_request, opts = {})
|
|
14294
|
+
data, _status_code, _headers = update_sfvb_flow_status_with_http_info(storefront_oid, flow_uuid, if_match, flow_status_request, opts)
|
|
14295
|
+
data
|
|
14296
|
+
end
|
|
14297
|
+
|
|
14298
|
+
# Turn a flow on or off
|
|
14299
|
+
# active enrolls customers as they trigger the flow from now on, and they receive its emails. inactive stops new enrollments. Always needs sfvb_publish. Send the hash_sha256 you read as If-Match.
|
|
14300
|
+
# @param storefront_oid [Integer]
|
|
14301
|
+
# @param flow_uuid [String]
|
|
14302
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
14303
|
+
# @param flow_status_request [SfvbFlowStatusRequest] The status to set
|
|
14304
|
+
# @param [Hash] opts the optional parameters
|
|
14305
|
+
# @return [Array<(SfvbFlow, Integer, Hash)>] SfvbFlow data, response status code and response headers
|
|
14306
|
+
def update_sfvb_flow_status_with_http_info(storefront_oid, flow_uuid, if_match, flow_status_request, opts = {})
|
|
14307
|
+
if @api_client.config.debugging
|
|
14308
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.update_sfvb_flow_status ...'
|
|
14309
|
+
end
|
|
14310
|
+
# verify the required parameter 'storefront_oid' is set
|
|
14311
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
14312
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.update_sfvb_flow_status"
|
|
14313
|
+
end
|
|
14314
|
+
# verify the required parameter 'flow_uuid' is set
|
|
14315
|
+
if @api_client.config.client_side_validation && flow_uuid.nil?
|
|
14316
|
+
fail ArgumentError, "Missing the required parameter 'flow_uuid' when calling SfvbApi.update_sfvb_flow_status"
|
|
14317
|
+
end
|
|
14318
|
+
# verify the required parameter 'if_match' is set
|
|
14319
|
+
if @api_client.config.client_side_validation && if_match.nil?
|
|
14320
|
+
fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.update_sfvb_flow_status"
|
|
14321
|
+
end
|
|
14322
|
+
# verify the required parameter 'flow_status_request' is set
|
|
14323
|
+
if @api_client.config.client_side_validation && flow_status_request.nil?
|
|
14324
|
+
fail ArgumentError, "Missing the required parameter 'flow_status_request' when calling SfvbApi.update_sfvb_flow_status"
|
|
14325
|
+
end
|
|
14326
|
+
# resource path
|
|
14327
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/flows/{flow_uuid}/status'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'flow_uuid' + '}', CGI.escape(flow_uuid.to_s))
|
|
14328
|
+
|
|
14329
|
+
# query parameters
|
|
14330
|
+
query_params = opts[:query_params] || {}
|
|
14331
|
+
|
|
14332
|
+
# header parameters
|
|
14333
|
+
header_params = opts[:header_params] || {}
|
|
14334
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
14335
|
+
# HTTP header 'Accept' (if needed)
|
|
14336
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
14337
|
+
# HTTP header 'Content-Type'
|
|
14338
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
14339
|
+
if !content_type.nil?
|
|
14340
|
+
header_params['Content-Type'] = content_type
|
|
14341
|
+
end
|
|
14342
|
+
header_params[:'If-Match'] = if_match
|
|
14343
|
+
|
|
14344
|
+
# form parameters
|
|
14345
|
+
form_params = opts[:form_params] || {}
|
|
14346
|
+
|
|
14347
|
+
# http body (model)
|
|
14348
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(flow_status_request)
|
|
14349
|
+
|
|
14350
|
+
# return_type
|
|
14351
|
+
return_type = opts[:debug_return_type] || 'SfvbFlow'
|
|
14352
|
+
|
|
14353
|
+
# auth_names
|
|
14354
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
14355
|
+
|
|
14356
|
+
new_options = opts.merge(
|
|
14357
|
+
:operation => :"SfvbApi.update_sfvb_flow_status",
|
|
14358
|
+
:header_params => header_params,
|
|
14359
|
+
:query_params => query_params,
|
|
14360
|
+
:form_params => form_params,
|
|
14361
|
+
:body => post_body,
|
|
14362
|
+
:auth_names => auth_names,
|
|
14363
|
+
:return_type => return_type
|
|
14364
|
+
)
|
|
14365
|
+
|
|
14366
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
14367
|
+
if @api_client.config.debugging
|
|
14368
|
+
@api_client.config.logger.debug "API called: SfvbApi#update_sfvb_flow_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
14369
|
+
end
|
|
14370
|
+
return data, status_code, headers
|
|
14371
|
+
end
|
|
14372
|
+
|
|
13434
14373
|
# Change attributes across many items in one call
|
|
13435
14374
|
# Applies exactly the change rows of a dry run, given its plan_hash, each with its merchant_item_oid and current_sha256. Each item is saved once with all of its rows; a row whose value changed since the dry run is skipped as stale and never overwritten, and an item that cannot be saved does not stop the others. Only the named attributes change. Needs sfvb_publish and the approval of the person who signed in the CLI, an approved item.attribute_batch request for exactly these rows in the Approval-Id header.
|
|
13436
14375
|
# @param storefront_oid [Integer]
|