ultracart_api 4.1.208 → 4.1.209
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 +23 -2
- data/docs/SfvbApi.md +613 -0
- 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/SfvbFlow.md +22 -0
- data/docs/SfvbFlowStatusRequest.md +18 -0
- data/docs/SfvbFlowWriteRequest.md +38 -0
- data/lib/ultracart_api/api/sfvb_api.rb +907 -49
- 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_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 +9 -0
- metadata +20 -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]
|
|
@@ -499,6 +675,146 @@ module UltracartClient
|
|
|
499
675
|
return data, status_code, headers
|
|
500
676
|
end
|
|
501
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
|
+
|
|
502
818
|
# Compile CJSON to Velocity
|
|
503
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.
|
|
504
820
|
# @param compile_request [SfvbCompileRequest] CJSON to compile
|
|
@@ -568,6 +884,156 @@ module UltracartClient
|
|
|
568
884
|
return data, status_code, headers
|
|
569
885
|
end
|
|
570
886
|
|
|
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.
|
|
889
|
+
# @param storefront_oid [Integer]
|
|
890
|
+
# @param campaign_write_request [SfvbCampaignWriteRequest] The campaign to create
|
|
891
|
+
# @param [Hash] opts the optional parameters
|
|
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)
|
|
895
|
+
data
|
|
896
|
+
end
|
|
897
|
+
|
|
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.
|
|
900
|
+
# @param storefront_oid [Integer]
|
|
901
|
+
# @param campaign_write_request [SfvbCampaignWriteRequest] The campaign to create
|
|
902
|
+
# @param [Hash] opts the optional parameters
|
|
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 = {})
|
|
905
|
+
if @api_client.config.debugging
|
|
906
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.create_sfvb_campaign ...'
|
|
907
|
+
end
|
|
908
|
+
# verify the required parameter 'storefront_oid' is set
|
|
909
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
910
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.create_sfvb_campaign"
|
|
911
|
+
end
|
|
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"
|
|
915
|
+
end
|
|
916
|
+
# resource path
|
|
917
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/campaigns'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
918
|
+
|
|
919
|
+
# query parameters
|
|
920
|
+
query_params = opts[:query_params] || {}
|
|
921
|
+
|
|
922
|
+
# header parameters
|
|
923
|
+
header_params = opts[:header_params] || {}
|
|
924
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
925
|
+
# HTTP header 'Accept' (if needed)
|
|
926
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
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
|
|
932
|
+
|
|
933
|
+
# form parameters
|
|
934
|
+
form_params = opts[:form_params] || {}
|
|
935
|
+
|
|
936
|
+
# http body (model)
|
|
937
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(campaign_write_request)
|
|
938
|
+
|
|
939
|
+
# return_type
|
|
940
|
+
return_type = opts[:debug_return_type] || 'SfvbCampaign'
|
|
941
|
+
|
|
942
|
+
# auth_names
|
|
943
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
944
|
+
|
|
945
|
+
new_options = opts.merge(
|
|
946
|
+
:operation => :"SfvbApi.create_sfvb_campaign",
|
|
947
|
+
:header_params => header_params,
|
|
948
|
+
:query_params => query_params,
|
|
949
|
+
:form_params => form_params,
|
|
950
|
+
:body => post_body,
|
|
951
|
+
:auth_names => auth_names,
|
|
952
|
+
:return_type => return_type
|
|
953
|
+
)
|
|
954
|
+
|
|
955
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
956
|
+
if @api_client.config.debugging
|
|
957
|
+
@api_client.config.logger.debug "API called: SfvbApi#create_sfvb_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
958
|
+
end
|
|
959
|
+
return data, status_code, headers
|
|
960
|
+
end
|
|
961
|
+
|
|
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
|
|
966
|
+
# @param [Hash] opts the optional parameters
|
|
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)
|
|
970
|
+
data
|
|
971
|
+
end
|
|
972
|
+
|
|
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
|
|
977
|
+
# @param [Hash] opts the optional parameters
|
|
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 = {})
|
|
980
|
+
if @api_client.config.debugging
|
|
981
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.create_sfvb_flow ...'
|
|
982
|
+
end
|
|
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"
|
|
990
|
+
end
|
|
991
|
+
# resource path
|
|
992
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/flows'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
993
|
+
|
|
994
|
+
# query parameters
|
|
995
|
+
query_params = opts[:query_params] || {}
|
|
996
|
+
|
|
997
|
+
# header parameters
|
|
998
|
+
header_params = opts[:header_params] || {}
|
|
999
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
1000
|
+
# HTTP header 'Accept' (if needed)
|
|
1001
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1002
|
+
# HTTP header 'Content-Type'
|
|
1003
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1004
|
+
if !content_type.nil?
|
|
1005
|
+
header_params['Content-Type'] = content_type
|
|
1006
|
+
end
|
|
1007
|
+
|
|
1008
|
+
# form parameters
|
|
1009
|
+
form_params = opts[:form_params] || {}
|
|
1010
|
+
|
|
1011
|
+
# http body (model)
|
|
1012
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(flow_write_request)
|
|
1013
|
+
|
|
1014
|
+
# return_type
|
|
1015
|
+
return_type = opts[:debug_return_type] || 'SfvbFlow'
|
|
1016
|
+
|
|
1017
|
+
# auth_names
|
|
1018
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
1019
|
+
|
|
1020
|
+
new_options = opts.merge(
|
|
1021
|
+
:operation => :"SfvbApi.create_sfvb_flow",
|
|
1022
|
+
:header_params => header_params,
|
|
1023
|
+
:query_params => query_params,
|
|
1024
|
+
:form_params => form_params,
|
|
1025
|
+
:body => post_body,
|
|
1026
|
+
:auth_names => auth_names,
|
|
1027
|
+
:return_type => return_type
|
|
1028
|
+
)
|
|
1029
|
+
|
|
1030
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1031
|
+
if @api_client.config.debugging
|
|
1032
|
+
@api_client.config.logger.debug "API called: SfvbApi#create_sfvb_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1033
|
+
end
|
|
1034
|
+
return data, status_code, headers
|
|
1035
|
+
end
|
|
1036
|
+
|
|
571
1037
|
# Save a fragment to the library
|
|
572
1038
|
# Creates a private draft owned by the calling user. The fragment is one widget and its children, and it must validate. Images it references on this storefront are copied into the entry before this returns, so it installs anywhere with its images. The fragment is scanned; card skimming or obfuscation signals are refused outright. Nothing other merchants or shoppers see changes, so sfvb_write is enough. Publish it to share it. An optional screenshot takes a staged PNG key, exactly as the library screenshot endpoint does; a refused screenshot refuses the whole create.
|
|
573
1039
|
# @param storefront_oid [Integer]
|
|
@@ -8062,39 +8528,179 @@ module UltracartClient
|
|
|
8062
8528
|
# One page of blog posts, newest first, without their bodies. search matches the title, body, excerpt, url part or author, or a tag exactly. unassigned marks posts no page shows yet. Use a post's blog_post_oid to assign it to a page.
|
|
8063
8529
|
# @param storefront_oid [Integer]
|
|
8064
8530
|
# @param [Hash] opts the optional parameters
|
|
8065
|
-
# @option opts [String] :search Text to search for
|
|
8066
|
-
# @option opts [Integer] :page Page number, starting at 1
|
|
8067
|
-
# @option opts [Integer] :page_size Posts per page, 1 to 100, default 50
|
|
8068
|
-
# @return [SfvbBlogPostsResponse]
|
|
8069
|
-
def list_sfvb_blog_posts(storefront_oid, opts = {})
|
|
8070
|
-
data, _status_code, _headers = list_sfvb_blog_posts_with_http_info(storefront_oid, opts)
|
|
8531
|
+
# @option opts [String] :search Text to search for
|
|
8532
|
+
# @option opts [Integer] :page Page number, starting at 1
|
|
8533
|
+
# @option opts [Integer] :page_size Posts per page, 1 to 100, default 50
|
|
8534
|
+
# @return [SfvbBlogPostsResponse]
|
|
8535
|
+
def list_sfvb_blog_posts(storefront_oid, opts = {})
|
|
8536
|
+
data, _status_code, _headers = list_sfvb_blog_posts_with_http_info(storefront_oid, opts)
|
|
8537
|
+
data
|
|
8538
|
+
end
|
|
8539
|
+
|
|
8540
|
+
# List the storefront's blog posts
|
|
8541
|
+
# One page of blog posts, newest first, without their bodies. search matches the title, body, excerpt, url part or author, or a tag exactly. unassigned marks posts no page shows yet. Use a post's blog_post_oid to assign it to a page.
|
|
8542
|
+
# @param storefront_oid [Integer]
|
|
8543
|
+
# @param [Hash] opts the optional parameters
|
|
8544
|
+
# @option opts [String] :search Text to search for
|
|
8545
|
+
# @option opts [Integer] :page Page number, starting at 1
|
|
8546
|
+
# @option opts [Integer] :page_size Posts per page, 1 to 100, default 50
|
|
8547
|
+
# @return [Array<(SfvbBlogPostsResponse, Integer, Hash)>] SfvbBlogPostsResponse data, response status code and response headers
|
|
8548
|
+
def list_sfvb_blog_posts_with_http_info(storefront_oid, opts = {})
|
|
8549
|
+
if @api_client.config.debugging
|
|
8550
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_blog_posts ...'
|
|
8551
|
+
end
|
|
8552
|
+
# verify the required parameter 'storefront_oid' is set
|
|
8553
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
8554
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_blog_posts"
|
|
8555
|
+
end
|
|
8556
|
+
# resource path
|
|
8557
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/blog_posts'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
8558
|
+
|
|
8559
|
+
# query parameters
|
|
8560
|
+
query_params = opts[:query_params] || {}
|
|
8561
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
8562
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
8563
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
8564
|
+
|
|
8565
|
+
# header parameters
|
|
8566
|
+
header_params = opts[:header_params] || {}
|
|
8567
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
8568
|
+
# HTTP header 'Accept' (if needed)
|
|
8569
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
8570
|
+
|
|
8571
|
+
# form parameters
|
|
8572
|
+
form_params = opts[:form_params] || {}
|
|
8573
|
+
|
|
8574
|
+
# http body (model)
|
|
8575
|
+
post_body = opts[:debug_body]
|
|
8576
|
+
|
|
8577
|
+
# return_type
|
|
8578
|
+
return_type = opts[:debug_return_type] || 'SfvbBlogPostsResponse'
|
|
8579
|
+
|
|
8580
|
+
# auth_names
|
|
8581
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
8582
|
+
|
|
8583
|
+
new_options = opts.merge(
|
|
8584
|
+
:operation => :"SfvbApi.list_sfvb_blog_posts",
|
|
8585
|
+
:header_params => header_params,
|
|
8586
|
+
:query_params => query_params,
|
|
8587
|
+
:form_params => form_params,
|
|
8588
|
+
:body => post_body,
|
|
8589
|
+
:auth_names => auth_names,
|
|
8590
|
+
:return_type => return_type
|
|
8591
|
+
)
|
|
8592
|
+
|
|
8593
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
8594
|
+
if @api_client.config.debugging
|
|
8595
|
+
@api_client.config.logger.debug "API called: SfvbApi#list_sfvb_blog_posts\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
8596
|
+
end
|
|
8597
|
+
return data, status_code, headers
|
|
8598
|
+
end
|
|
8599
|
+
|
|
8600
|
+
# List the storefront's campaigns
|
|
8601
|
+
# One page of campaigns, newest first, each with its emails and postcards in step order, without their container JSON. search matches the campaign name. Deleted campaigns are left out unless include_deleted is true. live is true unless the status sends nothing (draft or archived), so a change to one of its emails reaches customers at once.
|
|
8602
|
+
# @param storefront_oid [Integer]
|
|
8603
|
+
# @param [Hash] opts the optional parameters
|
|
8604
|
+
# @option opts [String] :search Text to search for in the name
|
|
8605
|
+
# @option opts [Integer] :page Page number, starting at 1
|
|
8606
|
+
# @option opts [Integer] :page_size Campaigns per page, 1 to 100, default 50
|
|
8607
|
+
# @option opts [Boolean] :include_deleted Include deleted campaigns
|
|
8608
|
+
# @return [SfvbCampaignsResponse]
|
|
8609
|
+
def list_sfvb_campaigns(storefront_oid, opts = {})
|
|
8610
|
+
data, _status_code, _headers = list_sfvb_campaigns_with_http_info(storefront_oid, opts)
|
|
8611
|
+
data
|
|
8612
|
+
end
|
|
8613
|
+
|
|
8614
|
+
# List the storefront's campaigns
|
|
8615
|
+
# One page of campaigns, newest first, each with its emails and postcards in step order, without their container JSON. search matches the campaign name. Deleted campaigns are left out unless include_deleted is true. live is true unless the status sends nothing (draft or archived), so a change to one of its emails reaches customers at once.
|
|
8616
|
+
# @param storefront_oid [Integer]
|
|
8617
|
+
# @param [Hash] opts the optional parameters
|
|
8618
|
+
# @option opts [String] :search Text to search for in the name
|
|
8619
|
+
# @option opts [Integer] :page Page number, starting at 1
|
|
8620
|
+
# @option opts [Integer] :page_size Campaigns per page, 1 to 100, default 50
|
|
8621
|
+
# @option opts [Boolean] :include_deleted Include deleted campaigns
|
|
8622
|
+
# @return [Array<(SfvbCampaignsResponse, Integer, Hash)>] SfvbCampaignsResponse data, response status code and response headers
|
|
8623
|
+
def list_sfvb_campaigns_with_http_info(storefront_oid, opts = {})
|
|
8624
|
+
if @api_client.config.debugging
|
|
8625
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_campaigns ...'
|
|
8626
|
+
end
|
|
8627
|
+
# verify the required parameter 'storefront_oid' is set
|
|
8628
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
8629
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_campaigns"
|
|
8630
|
+
end
|
|
8631
|
+
# resource path
|
|
8632
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/campaigns'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
8633
|
+
|
|
8634
|
+
# query parameters
|
|
8635
|
+
query_params = opts[:query_params] || {}
|
|
8636
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
8637
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
8638
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
8639
|
+
query_params[:'include_deleted'] = opts[:'include_deleted'] if !opts[:'include_deleted'].nil?
|
|
8640
|
+
|
|
8641
|
+
# header parameters
|
|
8642
|
+
header_params = opts[:header_params] || {}
|
|
8643
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
8644
|
+
# HTTP header 'Accept' (if needed)
|
|
8645
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
8646
|
+
|
|
8647
|
+
# form parameters
|
|
8648
|
+
form_params = opts[:form_params] || {}
|
|
8649
|
+
|
|
8650
|
+
# http body (model)
|
|
8651
|
+
post_body = opts[:debug_body]
|
|
8652
|
+
|
|
8653
|
+
# return_type
|
|
8654
|
+
return_type = opts[:debug_return_type] || 'SfvbCampaignsResponse'
|
|
8655
|
+
|
|
8656
|
+
# auth_names
|
|
8657
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
8658
|
+
|
|
8659
|
+
new_options = opts.merge(
|
|
8660
|
+
:operation => :"SfvbApi.list_sfvb_campaigns",
|
|
8661
|
+
:header_params => header_params,
|
|
8662
|
+
:query_params => query_params,
|
|
8663
|
+
:form_params => form_params,
|
|
8664
|
+
:body => post_body,
|
|
8665
|
+
:auth_names => auth_names,
|
|
8666
|
+
:return_type => return_type
|
|
8667
|
+
)
|
|
8668
|
+
|
|
8669
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
8670
|
+
if @api_client.config.debugging
|
|
8671
|
+
@api_client.config.logger.debug "API called: SfvbApi#list_sfvb_campaigns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
8672
|
+
end
|
|
8673
|
+
return data, status_code, headers
|
|
8674
|
+
end
|
|
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)
|
|
8071
8683
|
data
|
|
8072
8684
|
end
|
|
8073
8685
|
|
|
8074
|
-
# List the storefront's
|
|
8075
|
-
#
|
|
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.
|
|
8076
8688
|
# @param storefront_oid [Integer]
|
|
8077
8689
|
# @param [Hash] opts the optional parameters
|
|
8078
|
-
# @
|
|
8079
|
-
|
|
8080
|
-
# @option opts [Integer] :page_size Posts per page, 1 to 100, default 50
|
|
8081
|
-
# @return [Array<(SfvbBlogPostsResponse, Integer, Hash)>] SfvbBlogPostsResponse data, response status code and response headers
|
|
8082
|
-
def list_sfvb_blog_posts_with_http_info(storefront_oid, opts = {})
|
|
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 = {})
|
|
8083
8692
|
if @api_client.config.debugging
|
|
8084
|
-
@api_client.config.logger.debug 'Calling API: SfvbApi.
|
|
8693
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_comms_lists ...'
|
|
8085
8694
|
end
|
|
8086
8695
|
# verify the required parameter 'storefront_oid' is set
|
|
8087
8696
|
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
8088
|
-
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.
|
|
8697
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_comms_lists"
|
|
8089
8698
|
end
|
|
8090
8699
|
# resource path
|
|
8091
|
-
local_var_path = '/sfvb/storefronts/{storefront_oid}/
|
|
8700
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/lists'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
8092
8701
|
|
|
8093
8702
|
# query parameters
|
|
8094
8703
|
query_params = opts[:query_params] || {}
|
|
8095
|
-
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
8096
|
-
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
8097
|
-
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
8098
8704
|
|
|
8099
8705
|
# header parameters
|
|
8100
8706
|
header_params = opts[:header_params] || {}
|
|
@@ -8109,13 +8715,13 @@ module UltracartClient
|
|
|
8109
8715
|
post_body = opts[:debug_body]
|
|
8110
8716
|
|
|
8111
8717
|
# return_type
|
|
8112
|
-
return_type = opts[:debug_return_type] || '
|
|
8718
|
+
return_type = opts[:debug_return_type] || 'SfvbCommsListsResponse'
|
|
8113
8719
|
|
|
8114
8720
|
# auth_names
|
|
8115
8721
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
8116
8722
|
|
|
8117
8723
|
new_options = opts.merge(
|
|
8118
|
-
:operation => :"SfvbApi.
|
|
8724
|
+
:operation => :"SfvbApi.list_sfvb_comms_lists",
|
|
8119
8725
|
:header_params => header_params,
|
|
8120
8726
|
:query_params => query_params,
|
|
8121
8727
|
:form_params => form_params,
|
|
@@ -8126,51 +8732,39 @@ module UltracartClient
|
|
|
8126
8732
|
|
|
8127
8733
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
8128
8734
|
if @api_client.config.debugging
|
|
8129
|
-
@api_client.config.logger.debug "API called: SfvbApi#
|
|
8735
|
+
@api_client.config.logger.debug "API called: SfvbApi#list_sfvb_comms_lists\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
8130
8736
|
end
|
|
8131
8737
|
return data, status_code, headers
|
|
8132
8738
|
end
|
|
8133
8739
|
|
|
8134
|
-
# List the storefront's
|
|
8135
|
-
#
|
|
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.
|
|
8136
8742
|
# @param storefront_oid [Integer]
|
|
8137
8743
|
# @param [Hash] opts the optional parameters
|
|
8138
|
-
# @
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
# @option opts [Boolean] :include_deleted Include deleted campaigns
|
|
8142
|
-
# @return [SfvbCampaignsResponse]
|
|
8143
|
-
def list_sfvb_campaigns(storefront_oid, opts = {})
|
|
8144
|
-
data, _status_code, _headers = list_sfvb_campaigns_with_http_info(storefront_oid, opts)
|
|
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)
|
|
8145
8747
|
data
|
|
8146
8748
|
end
|
|
8147
8749
|
|
|
8148
|
-
# List the storefront's
|
|
8149
|
-
#
|
|
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.
|
|
8150
8752
|
# @param storefront_oid [Integer]
|
|
8151
8753
|
# @param [Hash] opts the optional parameters
|
|
8152
|
-
# @
|
|
8153
|
-
|
|
8154
|
-
# @option opts [Integer] :page_size Campaigns per page, 1 to 100, default 50
|
|
8155
|
-
# @option opts [Boolean] :include_deleted Include deleted campaigns
|
|
8156
|
-
# @return [Array<(SfvbCampaignsResponse, Integer, Hash)>] SfvbCampaignsResponse data, response status code and response headers
|
|
8157
|
-
def list_sfvb_campaigns_with_http_info(storefront_oid, opts = {})
|
|
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 = {})
|
|
8158
8756
|
if @api_client.config.debugging
|
|
8159
|
-
@api_client.config.logger.debug 'Calling API: SfvbApi.
|
|
8757
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_comms_segments ...'
|
|
8160
8758
|
end
|
|
8161
8759
|
# verify the required parameter 'storefront_oid' is set
|
|
8162
8760
|
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
8163
|
-
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.
|
|
8761
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_comms_segments"
|
|
8164
8762
|
end
|
|
8165
8763
|
# resource path
|
|
8166
|
-
local_var_path = '/sfvb/storefronts/{storefront_oid}/
|
|
8764
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/segments'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
8167
8765
|
|
|
8168
8766
|
# query parameters
|
|
8169
8767
|
query_params = opts[:query_params] || {}
|
|
8170
|
-
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
8171
|
-
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
8172
|
-
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
8173
|
-
query_params[:'include_deleted'] = opts[:'include_deleted'] if !opts[:'include_deleted'].nil?
|
|
8174
8768
|
|
|
8175
8769
|
# header parameters
|
|
8176
8770
|
header_params = opts[:header_params] || {}
|
|
@@ -8185,13 +8779,13 @@ module UltracartClient
|
|
|
8185
8779
|
post_body = opts[:debug_body]
|
|
8186
8780
|
|
|
8187
8781
|
# return_type
|
|
8188
|
-
return_type = opts[:debug_return_type] || '
|
|
8782
|
+
return_type = opts[:debug_return_type] || 'SfvbCommsSegmentsResponse'
|
|
8189
8783
|
|
|
8190
8784
|
# auth_names
|
|
8191
8785
|
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
8192
8786
|
|
|
8193
8787
|
new_options = opts.merge(
|
|
8194
|
-
:operation => :"SfvbApi.
|
|
8788
|
+
:operation => :"SfvbApi.list_sfvb_comms_segments",
|
|
8195
8789
|
:header_params => header_params,
|
|
8196
8790
|
:query_params => query_params,
|
|
8197
8791
|
:form_params => form_params,
|
|
@@ -8202,7 +8796,7 @@ module UltracartClient
|
|
|
8202
8796
|
|
|
8203
8797
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
8204
8798
|
if @api_client.config.debugging
|
|
8205
|
-
@api_client.config.logger.debug "API called: SfvbApi#
|
|
8799
|
+
@api_client.config.logger.debug "API called: SfvbApi#list_sfvb_comms_segments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
8206
8800
|
end
|
|
8207
8801
|
return data, status_code, headers
|
|
8208
8802
|
end
|
|
@@ -13199,6 +13793,94 @@ module UltracartClient
|
|
|
13199
13793
|
return data, status_code, headers
|
|
13200
13794
|
end
|
|
13201
13795
|
|
|
13796
|
+
# Change a campaign
|
|
13797
|
+
# 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.
|
|
13798
|
+
# @param storefront_oid [Integer]
|
|
13799
|
+
# @param campaign_uuid [String]
|
|
13800
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
13801
|
+
# @param campaign_write_request [SfvbCampaignWriteRequest] The fields to change
|
|
13802
|
+
# @param [Hash] opts the optional parameters
|
|
13803
|
+
# @return [SfvbCampaign]
|
|
13804
|
+
def update_sfvb_campaign(storefront_oid, campaign_uuid, if_match, campaign_write_request, opts = {})
|
|
13805
|
+
data, _status_code, _headers = update_sfvb_campaign_with_http_info(storefront_oid, campaign_uuid, if_match, campaign_write_request, opts)
|
|
13806
|
+
data
|
|
13807
|
+
end
|
|
13808
|
+
|
|
13809
|
+
# Change a campaign
|
|
13810
|
+
# 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.
|
|
13811
|
+
# @param storefront_oid [Integer]
|
|
13812
|
+
# @param campaign_uuid [String]
|
|
13813
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
13814
|
+
# @param campaign_write_request [SfvbCampaignWriteRequest] The fields to change
|
|
13815
|
+
# @param [Hash] opts the optional parameters
|
|
13816
|
+
# @return [Array<(SfvbCampaign, Integer, Hash)>] SfvbCampaign data, response status code and response headers
|
|
13817
|
+
def update_sfvb_campaign_with_http_info(storefront_oid, campaign_uuid, if_match, campaign_write_request, opts = {})
|
|
13818
|
+
if @api_client.config.debugging
|
|
13819
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.update_sfvb_campaign ...'
|
|
13820
|
+
end
|
|
13821
|
+
# verify the required parameter 'storefront_oid' is set
|
|
13822
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
13823
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.update_sfvb_campaign"
|
|
13824
|
+
end
|
|
13825
|
+
# verify the required parameter 'campaign_uuid' is set
|
|
13826
|
+
if @api_client.config.client_side_validation && campaign_uuid.nil?
|
|
13827
|
+
fail ArgumentError, "Missing the required parameter 'campaign_uuid' when calling SfvbApi.update_sfvb_campaign"
|
|
13828
|
+
end
|
|
13829
|
+
# verify the required parameter 'if_match' is set
|
|
13830
|
+
if @api_client.config.client_side_validation && if_match.nil?
|
|
13831
|
+
fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.update_sfvb_campaign"
|
|
13832
|
+
end
|
|
13833
|
+
# verify the required parameter 'campaign_write_request' is set
|
|
13834
|
+
if @api_client.config.client_side_validation && campaign_write_request.nil?
|
|
13835
|
+
fail ArgumentError, "Missing the required parameter 'campaign_write_request' when calling SfvbApi.update_sfvb_campaign"
|
|
13836
|
+
end
|
|
13837
|
+
# resource path
|
|
13838
|
+
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))
|
|
13839
|
+
|
|
13840
|
+
# query parameters
|
|
13841
|
+
query_params = opts[:query_params] || {}
|
|
13842
|
+
|
|
13843
|
+
# header parameters
|
|
13844
|
+
header_params = opts[:header_params] || {}
|
|
13845
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
13846
|
+
# HTTP header 'Accept' (if needed)
|
|
13847
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
13848
|
+
# HTTP header 'Content-Type'
|
|
13849
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
13850
|
+
if !content_type.nil?
|
|
13851
|
+
header_params['Content-Type'] = content_type
|
|
13852
|
+
end
|
|
13853
|
+
header_params[:'If-Match'] = if_match
|
|
13854
|
+
|
|
13855
|
+
# form parameters
|
|
13856
|
+
form_params = opts[:form_params] || {}
|
|
13857
|
+
|
|
13858
|
+
# http body (model)
|
|
13859
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(campaign_write_request)
|
|
13860
|
+
|
|
13861
|
+
# return_type
|
|
13862
|
+
return_type = opts[:debug_return_type] || 'SfvbCampaign'
|
|
13863
|
+
|
|
13864
|
+
# auth_names
|
|
13865
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
13866
|
+
|
|
13867
|
+
new_options = opts.merge(
|
|
13868
|
+
:operation => :"SfvbApi.update_sfvb_campaign",
|
|
13869
|
+
:header_params => header_params,
|
|
13870
|
+
:query_params => query_params,
|
|
13871
|
+
:form_params => form_params,
|
|
13872
|
+
:body => post_body,
|
|
13873
|
+
:auth_names => auth_names,
|
|
13874
|
+
:return_type => return_type
|
|
13875
|
+
)
|
|
13876
|
+
|
|
13877
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
13878
|
+
if @api_client.config.debugging
|
|
13879
|
+
@api_client.config.logger.debug "API called: SfvbApi#update_sfvb_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
13880
|
+
end
|
|
13881
|
+
return data, status_code, headers
|
|
13882
|
+
end
|
|
13883
|
+
|
|
13202
13884
|
# Update a sending domain
|
|
13203
13885
|
# 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
13886
|
# @param domain [String]
|
|
@@ -13431,6 +14113,182 @@ module UltracartClient
|
|
|
13431
14113
|
return data, status_code, headers
|
|
13432
14114
|
end
|
|
13433
14115
|
|
|
14116
|
+
# Change a flow
|
|
14117
|
+
# 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.
|
|
14118
|
+
# @param storefront_oid [Integer]
|
|
14119
|
+
# @param flow_uuid [String]
|
|
14120
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
14121
|
+
# @param flow_write_request [SfvbFlowWriteRequest] The fields to change
|
|
14122
|
+
# @param [Hash] opts the optional parameters
|
|
14123
|
+
# @return [SfvbFlow]
|
|
14124
|
+
def update_sfvb_flow(storefront_oid, flow_uuid, if_match, flow_write_request, opts = {})
|
|
14125
|
+
data, _status_code, _headers = update_sfvb_flow_with_http_info(storefront_oid, flow_uuid, if_match, flow_write_request, opts)
|
|
14126
|
+
data
|
|
14127
|
+
end
|
|
14128
|
+
|
|
14129
|
+
# Change a flow
|
|
14130
|
+
# 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.
|
|
14131
|
+
# @param storefront_oid [Integer]
|
|
14132
|
+
# @param flow_uuid [String]
|
|
14133
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
14134
|
+
# @param flow_write_request [SfvbFlowWriteRequest] The fields to change
|
|
14135
|
+
# @param [Hash] opts the optional parameters
|
|
14136
|
+
# @return [Array<(SfvbFlow, Integer, Hash)>] SfvbFlow data, response status code and response headers
|
|
14137
|
+
def update_sfvb_flow_with_http_info(storefront_oid, flow_uuid, if_match, flow_write_request, opts = {})
|
|
14138
|
+
if @api_client.config.debugging
|
|
14139
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.update_sfvb_flow ...'
|
|
14140
|
+
end
|
|
14141
|
+
# verify the required parameter 'storefront_oid' is set
|
|
14142
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
14143
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.update_sfvb_flow"
|
|
14144
|
+
end
|
|
14145
|
+
# verify the required parameter 'flow_uuid' is set
|
|
14146
|
+
if @api_client.config.client_side_validation && flow_uuid.nil?
|
|
14147
|
+
fail ArgumentError, "Missing the required parameter 'flow_uuid' when calling SfvbApi.update_sfvb_flow"
|
|
14148
|
+
end
|
|
14149
|
+
# verify the required parameter 'if_match' is set
|
|
14150
|
+
if @api_client.config.client_side_validation && if_match.nil?
|
|
14151
|
+
fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.update_sfvb_flow"
|
|
14152
|
+
end
|
|
14153
|
+
# verify the required parameter 'flow_write_request' is set
|
|
14154
|
+
if @api_client.config.client_side_validation && flow_write_request.nil?
|
|
14155
|
+
fail ArgumentError, "Missing the required parameter 'flow_write_request' when calling SfvbApi.update_sfvb_flow"
|
|
14156
|
+
end
|
|
14157
|
+
# resource path
|
|
14158
|
+
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))
|
|
14159
|
+
|
|
14160
|
+
# query parameters
|
|
14161
|
+
query_params = opts[:query_params] || {}
|
|
14162
|
+
|
|
14163
|
+
# header parameters
|
|
14164
|
+
header_params = opts[:header_params] || {}
|
|
14165
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
14166
|
+
# HTTP header 'Accept' (if needed)
|
|
14167
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
14168
|
+
# HTTP header 'Content-Type'
|
|
14169
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
14170
|
+
if !content_type.nil?
|
|
14171
|
+
header_params['Content-Type'] = content_type
|
|
14172
|
+
end
|
|
14173
|
+
header_params[:'If-Match'] = if_match
|
|
14174
|
+
|
|
14175
|
+
# form parameters
|
|
14176
|
+
form_params = opts[:form_params] || {}
|
|
14177
|
+
|
|
14178
|
+
# http body (model)
|
|
14179
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(flow_write_request)
|
|
14180
|
+
|
|
14181
|
+
# return_type
|
|
14182
|
+
return_type = opts[:debug_return_type] || 'SfvbFlow'
|
|
14183
|
+
|
|
14184
|
+
# auth_names
|
|
14185
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
14186
|
+
|
|
14187
|
+
new_options = opts.merge(
|
|
14188
|
+
:operation => :"SfvbApi.update_sfvb_flow",
|
|
14189
|
+
:header_params => header_params,
|
|
14190
|
+
:query_params => query_params,
|
|
14191
|
+
:form_params => form_params,
|
|
14192
|
+
:body => post_body,
|
|
14193
|
+
:auth_names => auth_names,
|
|
14194
|
+
:return_type => return_type
|
|
14195
|
+
)
|
|
14196
|
+
|
|
14197
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
14198
|
+
if @api_client.config.debugging
|
|
14199
|
+
@api_client.config.logger.debug "API called: SfvbApi#update_sfvb_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
14200
|
+
end
|
|
14201
|
+
return data, status_code, headers
|
|
14202
|
+
end
|
|
14203
|
+
|
|
14204
|
+
# Turn a flow on or off
|
|
14205
|
+
# 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.
|
|
14206
|
+
# @param storefront_oid [Integer]
|
|
14207
|
+
# @param flow_uuid [String]
|
|
14208
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
14209
|
+
# @param flow_status_request [SfvbFlowStatusRequest] The status to set
|
|
14210
|
+
# @param [Hash] opts the optional parameters
|
|
14211
|
+
# @return [SfvbFlow]
|
|
14212
|
+
def update_sfvb_flow_status(storefront_oid, flow_uuid, if_match, flow_status_request, opts = {})
|
|
14213
|
+
data, _status_code, _headers = update_sfvb_flow_status_with_http_info(storefront_oid, flow_uuid, if_match, flow_status_request, opts)
|
|
14214
|
+
data
|
|
14215
|
+
end
|
|
14216
|
+
|
|
14217
|
+
# Turn a flow on or off
|
|
14218
|
+
# 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.
|
|
14219
|
+
# @param storefront_oid [Integer]
|
|
14220
|
+
# @param flow_uuid [String]
|
|
14221
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
14222
|
+
# @param flow_status_request [SfvbFlowStatusRequest] The status to set
|
|
14223
|
+
# @param [Hash] opts the optional parameters
|
|
14224
|
+
# @return [Array<(SfvbFlow, Integer, Hash)>] SfvbFlow data, response status code and response headers
|
|
14225
|
+
def update_sfvb_flow_status_with_http_info(storefront_oid, flow_uuid, if_match, flow_status_request, opts = {})
|
|
14226
|
+
if @api_client.config.debugging
|
|
14227
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.update_sfvb_flow_status ...'
|
|
14228
|
+
end
|
|
14229
|
+
# verify the required parameter 'storefront_oid' is set
|
|
14230
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
14231
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.update_sfvb_flow_status"
|
|
14232
|
+
end
|
|
14233
|
+
# verify the required parameter 'flow_uuid' is set
|
|
14234
|
+
if @api_client.config.client_side_validation && flow_uuid.nil?
|
|
14235
|
+
fail ArgumentError, "Missing the required parameter 'flow_uuid' when calling SfvbApi.update_sfvb_flow_status"
|
|
14236
|
+
end
|
|
14237
|
+
# verify the required parameter 'if_match' is set
|
|
14238
|
+
if @api_client.config.client_side_validation && if_match.nil?
|
|
14239
|
+
fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.update_sfvb_flow_status"
|
|
14240
|
+
end
|
|
14241
|
+
# verify the required parameter 'flow_status_request' is set
|
|
14242
|
+
if @api_client.config.client_side_validation && flow_status_request.nil?
|
|
14243
|
+
fail ArgumentError, "Missing the required parameter 'flow_status_request' when calling SfvbApi.update_sfvb_flow_status"
|
|
14244
|
+
end
|
|
14245
|
+
# resource path
|
|
14246
|
+
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))
|
|
14247
|
+
|
|
14248
|
+
# query parameters
|
|
14249
|
+
query_params = opts[:query_params] || {}
|
|
14250
|
+
|
|
14251
|
+
# header parameters
|
|
14252
|
+
header_params = opts[:header_params] || {}
|
|
14253
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
14254
|
+
# HTTP header 'Accept' (if needed)
|
|
14255
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
14256
|
+
# HTTP header 'Content-Type'
|
|
14257
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
14258
|
+
if !content_type.nil?
|
|
14259
|
+
header_params['Content-Type'] = content_type
|
|
14260
|
+
end
|
|
14261
|
+
header_params[:'If-Match'] = if_match
|
|
14262
|
+
|
|
14263
|
+
# form parameters
|
|
14264
|
+
form_params = opts[:form_params] || {}
|
|
14265
|
+
|
|
14266
|
+
# http body (model)
|
|
14267
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(flow_status_request)
|
|
14268
|
+
|
|
14269
|
+
# return_type
|
|
14270
|
+
return_type = opts[:debug_return_type] || 'SfvbFlow'
|
|
14271
|
+
|
|
14272
|
+
# auth_names
|
|
14273
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
14274
|
+
|
|
14275
|
+
new_options = opts.merge(
|
|
14276
|
+
:operation => :"SfvbApi.update_sfvb_flow_status",
|
|
14277
|
+
:header_params => header_params,
|
|
14278
|
+
:query_params => query_params,
|
|
14279
|
+
:form_params => form_params,
|
|
14280
|
+
:body => post_body,
|
|
14281
|
+
:auth_names => auth_names,
|
|
14282
|
+
:return_type => return_type
|
|
14283
|
+
)
|
|
14284
|
+
|
|
14285
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
14286
|
+
if @api_client.config.debugging
|
|
14287
|
+
@api_client.config.logger.debug "API called: SfvbApi#update_sfvb_flow_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
14288
|
+
end
|
|
14289
|
+
return data, status_code, headers
|
|
14290
|
+
end
|
|
14291
|
+
|
|
13434
14292
|
# Change attributes across many items in one call
|
|
13435
14293
|
# 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
14294
|
# @param storefront_oid [Integer]
|