ultracart_api 4.1.206 → 4.1.208
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +18 -2
- data/docs/SfvbApi.md +338 -0
- data/docs/SfvbCampaign.md +38 -0
- data/docs/SfvbCampaignsResponse.md +24 -0
- data/docs/SfvbCommsEmail.md +38 -0
- data/docs/SfvbCommsPostcard.md +28 -0
- data/docs/SfvbEmail.md +40 -0
- data/docs/SfvbEmailUpdateRequest.md +20 -0
- data/docs/SfvbFlow.md +40 -0
- data/docs/SfvbFlowsResponse.md +24 -0
- data/lib/ultracart_api/api/sfvb_api.rb +450 -0
- data/lib/ultracart_api/models/item_third_party_email_marketing.rb +2 -2
- data/lib/ultracart_api/models/sfvb_campaign.rb +324 -0
- data/lib/ultracart_api/models/sfvb_campaigns_response.rb +252 -0
- data/lib/ultracart_api/models/sfvb_comms_email.rb +320 -0
- data/lib/ultracart_api/models/sfvb_comms_postcard.rb +270 -0
- data/lib/ultracart_api/models/sfvb_email.rb +330 -0
- data/lib/ultracart_api/models/sfvb_email_update_request.rb +230 -0
- data/lib/ultracart_api/models/sfvb_flow.rb +334 -0
- data/lib/ultracart_api/models/sfvb_flows_response.rb +252 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +8 -0
- metadata +18 -2
data/docs/SfvbEmail.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# UltracartClient::SfvbEmail
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **container_last_modified_dts** | **String** | When the email container was last changed (ISO 8601, UTC). | [optional] |
|
|
8
|
+
| **email_uuid** | **String** | The email uuid. The same uuid the email container (owner type email) and the email render take. | [optional] |
|
|
9
|
+
| **hash_sha256** | **String** | Hash of the subject and preview text. Send it as If-Match when updating. A change to the email body does not change it. | [optional] |
|
|
10
|
+
| **live** | **Boolean** | True when the email is in a flow or campaign that is sending, so a change reaches customers and needs sfvb_publish. An email in neither is reported live. | [optional] |
|
|
11
|
+
| **pending_review** | **Boolean** | True while a change waits for review. An edit puts it back to needing review. | [optional] |
|
|
12
|
+
| **preview_text** | **String** | The preview text an inbox shows after the subject. | [optional] |
|
|
13
|
+
| **rejected** | **Boolean** | True when review rejected the email. An edit puts it back to needing review. | [optional] |
|
|
14
|
+
| **requires_review** | **Boolean** | True when a change to this email must be reviewed before it sends. | [optional] |
|
|
15
|
+
| **subject** | **String** | The subject line. Merge tokens such as firstName are filled in at send. | [optional] |
|
|
16
|
+
| **suspended_for_spam** | **Boolean** | True when UltraCart suspended the email for spam. Edits are refused until the merchant resolves it with UltraCart support. | [optional] |
|
|
17
|
+
| **transactional** | **Boolean** | True for a transactional email, which skips the marketing footer rules. | [optional] |
|
|
18
|
+
| **version** | **Integer** | The email version. Every save adds one. | [optional] |
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
require 'ultracart_api'
|
|
24
|
+
|
|
25
|
+
instance = UltracartClient::SfvbEmail.new(
|
|
26
|
+
container_last_modified_dts: null,
|
|
27
|
+
email_uuid: null,
|
|
28
|
+
hash_sha256: null,
|
|
29
|
+
live: null,
|
|
30
|
+
pending_review: null,
|
|
31
|
+
preview_text: null,
|
|
32
|
+
rejected: null,
|
|
33
|
+
requires_review: null,
|
|
34
|
+
subject: null,
|
|
35
|
+
suspended_for_spam: null,
|
|
36
|
+
transactional: null,
|
|
37
|
+
version: null
|
|
38
|
+
)
|
|
39
|
+
```
|
|
40
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# UltracartClient::SfvbEmailUpdateRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **preview_text** | **String** | The new preview text, 5 to 150 characters on one line. | [optional] |
|
|
8
|
+
| **subject** | **String** | The new subject line, 5 to 150 characters on one line. Merge tokens such as firstName are filled in at send. | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'ultracart_api'
|
|
14
|
+
|
|
15
|
+
instance = UltracartClient::SfvbEmailUpdateRequest.new(
|
|
16
|
+
preview_text: null,
|
|
17
|
+
subject: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
data/docs/SfvbFlow.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# UltracartClient::SfvbFlow
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **communication_sequence_uuid** | **String** | The communication sequence the steps belong to. | [optional] |
|
|
8
|
+
| **created_dts** | **String** | When the flow was created (ISO 8601, UTC). | [optional] |
|
|
9
|
+
| **deleted** | **Boolean** | True when the flow was deleted. | [optional] |
|
|
10
|
+
| **emails** | [**Array<SfvbCommsEmail>**](SfvbCommsEmail.md) | Its emails, in step order. | [optional] |
|
|
11
|
+
| **flow_uuid** | **String** | The flow uuid. | [optional] |
|
|
12
|
+
| **live** | **Boolean** | True when the emails and postcards reach customers now, so a change to one shows at once. False only in a status that sends nothing. | [optional] |
|
|
13
|
+
| **name** | **String** | The flow name. | [optional] |
|
|
14
|
+
| **postcards** | [**Array<SfvbCommsPostcard>**](SfvbCommsPostcard.md) | Its postcards, in step order. | [optional] |
|
|
15
|
+
| **status** | **String** | The status, such as draft, active, paused, draining or inactive. | [optional] |
|
|
16
|
+
| **status_dts** | **String** | When the status last changed (ISO 8601, UTC). | [optional] |
|
|
17
|
+
| **trigger_parameter_name** | **String** | The name of the trigger parameter, when the trigger takes one. | [optional] |
|
|
18
|
+
| **trigger_type** | **String** | What starts the flow, such as cart abandon or an order. | [optional] |
|
|
19
|
+
|
|
20
|
+
## Example
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
require 'ultracart_api'
|
|
24
|
+
|
|
25
|
+
instance = UltracartClient::SfvbFlow.new(
|
|
26
|
+
communication_sequence_uuid: null,
|
|
27
|
+
created_dts: null,
|
|
28
|
+
deleted: null,
|
|
29
|
+
emails: null,
|
|
30
|
+
flow_uuid: null,
|
|
31
|
+
live: null,
|
|
32
|
+
name: null,
|
|
33
|
+
postcards: null,
|
|
34
|
+
status: null,
|
|
35
|
+
status_dts: null,
|
|
36
|
+
trigger_parameter_name: null,
|
|
37
|
+
trigger_type: null
|
|
38
|
+
)
|
|
39
|
+
```
|
|
40
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# UltracartClient::SfvbFlowsResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **flows** | [**Array<SfvbFlow>**](SfvbFlow.md) | The flows on this page, newest first. | [optional] |
|
|
8
|
+
| **page** | **Integer** | This page number, starting at 1. | [optional] |
|
|
9
|
+
| **page_size** | **Integer** | The page size. | [optional] |
|
|
10
|
+
| **total** | **Integer** | How many match, across every page. | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'ultracart_api'
|
|
16
|
+
|
|
17
|
+
instance = UltracartClient::SfvbFlowsResponse.new(
|
|
18
|
+
flows: null,
|
|
19
|
+
page: null,
|
|
20
|
+
page_size: null,
|
|
21
|
+
total: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -3258,6 +3258,76 @@ module UltracartClient
|
|
|
3258
3258
|
return data, status_code, headers
|
|
3259
3259
|
end
|
|
3260
3260
|
|
|
3261
|
+
# Get a campaign
|
|
3262
|
+
# One campaign, the same object as its list entry, with its emails and postcards in step order. A deleted campaign is returned with deleted true.
|
|
3263
|
+
# @param storefront_oid [Integer]
|
|
3264
|
+
# @param campaign_uuid [String]
|
|
3265
|
+
# @param [Hash] opts the optional parameters
|
|
3266
|
+
# @return [SfvbCampaign]
|
|
3267
|
+
def get_sfvb_campaign(storefront_oid, campaign_uuid, opts = {})
|
|
3268
|
+
data, _status_code, _headers = get_sfvb_campaign_with_http_info(storefront_oid, campaign_uuid, opts)
|
|
3269
|
+
data
|
|
3270
|
+
end
|
|
3271
|
+
|
|
3272
|
+
# Get a campaign
|
|
3273
|
+
# One campaign, the same object as its list entry, with its emails and postcards in step order. A deleted campaign is returned with deleted true.
|
|
3274
|
+
# @param storefront_oid [Integer]
|
|
3275
|
+
# @param campaign_uuid [String]
|
|
3276
|
+
# @param [Hash] opts the optional parameters
|
|
3277
|
+
# @return [Array<(SfvbCampaign, Integer, Hash)>] SfvbCampaign data, response status code and response headers
|
|
3278
|
+
def get_sfvb_campaign_with_http_info(storefront_oid, campaign_uuid, opts = {})
|
|
3279
|
+
if @api_client.config.debugging
|
|
3280
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_campaign ...'
|
|
3281
|
+
end
|
|
3282
|
+
# verify the required parameter 'storefront_oid' is set
|
|
3283
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
3284
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_campaign"
|
|
3285
|
+
end
|
|
3286
|
+
# verify the required parameter 'campaign_uuid' is set
|
|
3287
|
+
if @api_client.config.client_side_validation && campaign_uuid.nil?
|
|
3288
|
+
fail ArgumentError, "Missing the required parameter 'campaign_uuid' when calling SfvbApi.get_sfvb_campaign"
|
|
3289
|
+
end
|
|
3290
|
+
# resource path
|
|
3291
|
+
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))
|
|
3292
|
+
|
|
3293
|
+
# query parameters
|
|
3294
|
+
query_params = opts[:query_params] || {}
|
|
3295
|
+
|
|
3296
|
+
# header parameters
|
|
3297
|
+
header_params = opts[:header_params] || {}
|
|
3298
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
3299
|
+
# HTTP header 'Accept' (if needed)
|
|
3300
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
3301
|
+
|
|
3302
|
+
# form parameters
|
|
3303
|
+
form_params = opts[:form_params] || {}
|
|
3304
|
+
|
|
3305
|
+
# http body (model)
|
|
3306
|
+
post_body = opts[:debug_body]
|
|
3307
|
+
|
|
3308
|
+
# return_type
|
|
3309
|
+
return_type = opts[:debug_return_type] || 'SfvbCampaign'
|
|
3310
|
+
|
|
3311
|
+
# auth_names
|
|
3312
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
3313
|
+
|
|
3314
|
+
new_options = opts.merge(
|
|
3315
|
+
:operation => :"SfvbApi.get_sfvb_campaign",
|
|
3316
|
+
:header_params => header_params,
|
|
3317
|
+
:query_params => query_params,
|
|
3318
|
+
:form_params => form_params,
|
|
3319
|
+
:body => post_body,
|
|
3320
|
+
:auth_names => auth_names,
|
|
3321
|
+
:return_type => return_type
|
|
3322
|
+
)
|
|
3323
|
+
|
|
3324
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3325
|
+
if @api_client.config.debugging
|
|
3326
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_campaign\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3327
|
+
end
|
|
3328
|
+
return data, status_code, headers
|
|
3329
|
+
end
|
|
3330
|
+
|
|
3261
3331
|
# Element types used by a container
|
|
3262
3332
|
# @param compile_request [SfvbCompileRequest] CJSON to inspect
|
|
3263
3333
|
# @param [Hash] opts the optional parameters
|
|
@@ -3727,6 +3797,76 @@ module UltracartClient
|
|
|
3727
3797
|
return data, status_code, headers
|
|
3728
3798
|
end
|
|
3729
3799
|
|
|
3800
|
+
# Get a flow or campaign email's subject and preview text
|
|
3801
|
+
# The subject, preview text and hash_sha256 to send as If-Match when updating them, with whether the email is live and its review state. The body is the email container (owner type email). Find the uuid in the storefront's campaigns and flows.
|
|
3802
|
+
# @param storefront_oid [Integer]
|
|
3803
|
+
# @param email_uuid [String]
|
|
3804
|
+
# @param [Hash] opts the optional parameters
|
|
3805
|
+
# @return [SfvbEmail]
|
|
3806
|
+
def get_sfvb_email(storefront_oid, email_uuid, opts = {})
|
|
3807
|
+
data, _status_code, _headers = get_sfvb_email_with_http_info(storefront_oid, email_uuid, opts)
|
|
3808
|
+
data
|
|
3809
|
+
end
|
|
3810
|
+
|
|
3811
|
+
# Get a flow or campaign email's subject and preview text
|
|
3812
|
+
# The subject, preview text and hash_sha256 to send as If-Match when updating them, with whether the email is live and its review state. The body is the email container (owner type email). Find the uuid in the storefront's campaigns and flows.
|
|
3813
|
+
# @param storefront_oid [Integer]
|
|
3814
|
+
# @param email_uuid [String]
|
|
3815
|
+
# @param [Hash] opts the optional parameters
|
|
3816
|
+
# @return [Array<(SfvbEmail, Integer, Hash)>] SfvbEmail data, response status code and response headers
|
|
3817
|
+
def get_sfvb_email_with_http_info(storefront_oid, email_uuid, opts = {})
|
|
3818
|
+
if @api_client.config.debugging
|
|
3819
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_email ...'
|
|
3820
|
+
end
|
|
3821
|
+
# verify the required parameter 'storefront_oid' is set
|
|
3822
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
3823
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_email"
|
|
3824
|
+
end
|
|
3825
|
+
# verify the required parameter 'email_uuid' is set
|
|
3826
|
+
if @api_client.config.client_side_validation && email_uuid.nil?
|
|
3827
|
+
fail ArgumentError, "Missing the required parameter 'email_uuid' when calling SfvbApi.get_sfvb_email"
|
|
3828
|
+
end
|
|
3829
|
+
# resource path
|
|
3830
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/emails/{email_uuid}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'email_uuid' + '}', CGI.escape(email_uuid.to_s))
|
|
3831
|
+
|
|
3832
|
+
# query parameters
|
|
3833
|
+
query_params = opts[:query_params] || {}
|
|
3834
|
+
|
|
3835
|
+
# header parameters
|
|
3836
|
+
header_params = opts[:header_params] || {}
|
|
3837
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
3838
|
+
# HTTP header 'Accept' (if needed)
|
|
3839
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
3840
|
+
|
|
3841
|
+
# form parameters
|
|
3842
|
+
form_params = opts[:form_params] || {}
|
|
3843
|
+
|
|
3844
|
+
# http body (model)
|
|
3845
|
+
post_body = opts[:debug_body]
|
|
3846
|
+
|
|
3847
|
+
# return_type
|
|
3848
|
+
return_type = opts[:debug_return_type] || 'SfvbEmail'
|
|
3849
|
+
|
|
3850
|
+
# auth_names
|
|
3851
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
3852
|
+
|
|
3853
|
+
new_options = opts.merge(
|
|
3854
|
+
:operation => :"SfvbApi.get_sfvb_email",
|
|
3855
|
+
:header_params => header_params,
|
|
3856
|
+
:query_params => query_params,
|
|
3857
|
+
:form_params => form_params,
|
|
3858
|
+
:body => post_body,
|
|
3859
|
+
:auth_names => auth_names,
|
|
3860
|
+
:return_type => return_type
|
|
3861
|
+
)
|
|
3862
|
+
|
|
3863
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
3864
|
+
if @api_client.config.debugging
|
|
3865
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
3866
|
+
end
|
|
3867
|
+
return data, status_code, headers
|
|
3868
|
+
end
|
|
3869
|
+
|
|
3730
3870
|
# Replay events
|
|
3731
3871
|
# The signed-in person's events after the cursor, oldest first. Events are kept 72 hours; an older cursor returns resync_required, and then the caller re-lists what it was waiting on. Events about one sign-in's requests, such as approvals, are only returned to that sign-in. limit is 1 to 500, default 100.
|
|
3732
3872
|
# @param [Hash] opts the optional parameters
|
|
@@ -4136,6 +4276,76 @@ module UltracartClient
|
|
|
4136
4276
|
return data, status_code, headers
|
|
4137
4277
|
end
|
|
4138
4278
|
|
|
4279
|
+
# Get a flow
|
|
4280
|
+
# One flow, the same object as its list entry, with its emails and postcards in step order. A deleted flow is returned with deleted true.
|
|
4281
|
+
# @param storefront_oid [Integer]
|
|
4282
|
+
# @param flow_uuid [String]
|
|
4283
|
+
# @param [Hash] opts the optional parameters
|
|
4284
|
+
# @return [SfvbFlow]
|
|
4285
|
+
def get_sfvb_flow(storefront_oid, flow_uuid, opts = {})
|
|
4286
|
+
data, _status_code, _headers = get_sfvb_flow_with_http_info(storefront_oid, flow_uuid, opts)
|
|
4287
|
+
data
|
|
4288
|
+
end
|
|
4289
|
+
|
|
4290
|
+
# Get a flow
|
|
4291
|
+
# One flow, the same object as its list entry, with its emails and postcards in step order. A deleted flow is returned with deleted true.
|
|
4292
|
+
# @param storefront_oid [Integer]
|
|
4293
|
+
# @param flow_uuid [String]
|
|
4294
|
+
# @param [Hash] opts the optional parameters
|
|
4295
|
+
# @return [Array<(SfvbFlow, Integer, Hash)>] SfvbFlow data, response status code and response headers
|
|
4296
|
+
def get_sfvb_flow_with_http_info(storefront_oid, flow_uuid, opts = {})
|
|
4297
|
+
if @api_client.config.debugging
|
|
4298
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.get_sfvb_flow ...'
|
|
4299
|
+
end
|
|
4300
|
+
# verify the required parameter 'storefront_oid' is set
|
|
4301
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
4302
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.get_sfvb_flow"
|
|
4303
|
+
end
|
|
4304
|
+
# verify the required parameter 'flow_uuid' is set
|
|
4305
|
+
if @api_client.config.client_side_validation && flow_uuid.nil?
|
|
4306
|
+
fail ArgumentError, "Missing the required parameter 'flow_uuid' when calling SfvbApi.get_sfvb_flow"
|
|
4307
|
+
end
|
|
4308
|
+
# resource path
|
|
4309
|
+
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))
|
|
4310
|
+
|
|
4311
|
+
# query parameters
|
|
4312
|
+
query_params = opts[:query_params] || {}
|
|
4313
|
+
|
|
4314
|
+
# header parameters
|
|
4315
|
+
header_params = opts[:header_params] || {}
|
|
4316
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
4317
|
+
# HTTP header 'Accept' (if needed)
|
|
4318
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
4319
|
+
|
|
4320
|
+
# form parameters
|
|
4321
|
+
form_params = opts[:form_params] || {}
|
|
4322
|
+
|
|
4323
|
+
# http body (model)
|
|
4324
|
+
post_body = opts[:debug_body]
|
|
4325
|
+
|
|
4326
|
+
# return_type
|
|
4327
|
+
return_type = opts[:debug_return_type] || 'SfvbFlow'
|
|
4328
|
+
|
|
4329
|
+
# auth_names
|
|
4330
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
4331
|
+
|
|
4332
|
+
new_options = opts.merge(
|
|
4333
|
+
:operation => :"SfvbApi.get_sfvb_flow",
|
|
4334
|
+
:header_params => header_params,
|
|
4335
|
+
:query_params => query_params,
|
|
4336
|
+
:form_params => form_params,
|
|
4337
|
+
:body => post_body,
|
|
4338
|
+
:auth_names => auth_names,
|
|
4339
|
+
:return_type => return_type
|
|
4340
|
+
)
|
|
4341
|
+
|
|
4342
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
4343
|
+
if @api_client.config.debugging
|
|
4344
|
+
@api_client.config.logger.debug "API called: SfvbApi#get_sfvb_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
4345
|
+
end
|
|
4346
|
+
return data, status_code, headers
|
|
4347
|
+
end
|
|
4348
|
+
|
|
4139
4349
|
# Read the storefront's translation glossary
|
|
4140
4350
|
# The storefront's glossary, plain markdown with terms not to translate, required translations, tone and words to avoid. Read it before translating anything. Empty when none has been saved. Each storefront has its own, because a storefront is often its own brand.
|
|
4141
4351
|
# @param storefront_oid [Integer]
|
|
@@ -7921,6 +8131,82 @@ module UltracartClient
|
|
|
7921
8131
|
return data, status_code, headers
|
|
7922
8132
|
end
|
|
7923
8133
|
|
|
8134
|
+
# List the storefront's campaigns
|
|
8135
|
+
# 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.
|
|
8136
|
+
# @param storefront_oid [Integer]
|
|
8137
|
+
# @param [Hash] opts the optional parameters
|
|
8138
|
+
# @option opts [String] :search Text to search for in the name
|
|
8139
|
+
# @option opts [Integer] :page Page number, starting at 1
|
|
8140
|
+
# @option opts [Integer] :page_size Campaigns per page, 1 to 100, default 50
|
|
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)
|
|
8145
|
+
data
|
|
8146
|
+
end
|
|
8147
|
+
|
|
8148
|
+
# List the storefront's campaigns
|
|
8149
|
+
# 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.
|
|
8150
|
+
# @param storefront_oid [Integer]
|
|
8151
|
+
# @param [Hash] opts the optional parameters
|
|
8152
|
+
# @option opts [String] :search Text to search for in the name
|
|
8153
|
+
# @option opts [Integer] :page Page number, starting at 1
|
|
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 = {})
|
|
8158
|
+
if @api_client.config.debugging
|
|
8159
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_campaigns ...'
|
|
8160
|
+
end
|
|
8161
|
+
# verify the required parameter 'storefront_oid' is set
|
|
8162
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
8163
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_campaigns"
|
|
8164
|
+
end
|
|
8165
|
+
# resource path
|
|
8166
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/campaigns'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
8167
|
+
|
|
8168
|
+
# query parameters
|
|
8169
|
+
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
|
+
|
|
8175
|
+
# header parameters
|
|
8176
|
+
header_params = opts[:header_params] || {}
|
|
8177
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
8178
|
+
# HTTP header 'Accept' (if needed)
|
|
8179
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
8180
|
+
|
|
8181
|
+
# form parameters
|
|
8182
|
+
form_params = opts[:form_params] || {}
|
|
8183
|
+
|
|
8184
|
+
# http body (model)
|
|
8185
|
+
post_body = opts[:debug_body]
|
|
8186
|
+
|
|
8187
|
+
# return_type
|
|
8188
|
+
return_type = opts[:debug_return_type] || 'SfvbCampaignsResponse'
|
|
8189
|
+
|
|
8190
|
+
# auth_names
|
|
8191
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
8192
|
+
|
|
8193
|
+
new_options = opts.merge(
|
|
8194
|
+
:operation => :"SfvbApi.list_sfvb_campaigns",
|
|
8195
|
+
:header_params => header_params,
|
|
8196
|
+
:query_params => query_params,
|
|
8197
|
+
:form_params => form_params,
|
|
8198
|
+
:body => post_body,
|
|
8199
|
+
:auth_names => auth_names,
|
|
8200
|
+
:return_type => return_type
|
|
8201
|
+
)
|
|
8202
|
+
|
|
8203
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
8204
|
+
if @api_client.config.debugging
|
|
8205
|
+
@api_client.config.logger.debug "API called: SfvbApi#list_sfvb_campaigns\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
8206
|
+
end
|
|
8207
|
+
return data, status_code, headers
|
|
8208
|
+
end
|
|
8209
|
+
|
|
7924
8210
|
# Version history for a container stored outside the file system
|
|
7925
8211
|
# 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.
|
|
7926
8212
|
# @param storefront_oid [Integer]
|
|
@@ -8268,6 +8554,82 @@ module UltracartClient
|
|
|
8268
8554
|
return data, status_code, headers
|
|
8269
8555
|
end
|
|
8270
8556
|
|
|
8557
|
+
# List the storefront's flows
|
|
8558
|
+
# One page of flows, newest first, each with its trigger and its emails and postcards in step order, without their container JSON. search matches the flow name. Deleted flows are left out unless include_deleted is true. live is true unless the status sends nothing (draft or inactive); a paused flow still holds enrolled customers, so it counts as live.
|
|
8559
|
+
# @param storefront_oid [Integer]
|
|
8560
|
+
# @param [Hash] opts the optional parameters
|
|
8561
|
+
# @option opts [String] :search Text to search for in the name
|
|
8562
|
+
# @option opts [Integer] :page Page number, starting at 1
|
|
8563
|
+
# @option opts [Integer] :page_size Flows per page, 1 to 100, default 50
|
|
8564
|
+
# @option opts [Boolean] :include_deleted Include deleted flows
|
|
8565
|
+
# @return [SfvbFlowsResponse]
|
|
8566
|
+
def list_sfvb_flows(storefront_oid, opts = {})
|
|
8567
|
+
data, _status_code, _headers = list_sfvb_flows_with_http_info(storefront_oid, opts)
|
|
8568
|
+
data
|
|
8569
|
+
end
|
|
8570
|
+
|
|
8571
|
+
# List the storefront's flows
|
|
8572
|
+
# One page of flows, newest first, each with its trigger and its emails and postcards in step order, without their container JSON. search matches the flow name. Deleted flows are left out unless include_deleted is true. live is true unless the status sends nothing (draft or inactive); a paused flow still holds enrolled customers, so it counts as live.
|
|
8573
|
+
# @param storefront_oid [Integer]
|
|
8574
|
+
# @param [Hash] opts the optional parameters
|
|
8575
|
+
# @option opts [String] :search Text to search for in the name
|
|
8576
|
+
# @option opts [Integer] :page Page number, starting at 1
|
|
8577
|
+
# @option opts [Integer] :page_size Flows per page, 1 to 100, default 50
|
|
8578
|
+
# @option opts [Boolean] :include_deleted Include deleted flows
|
|
8579
|
+
# @return [Array<(SfvbFlowsResponse, Integer, Hash)>] SfvbFlowsResponse data, response status code and response headers
|
|
8580
|
+
def list_sfvb_flows_with_http_info(storefront_oid, opts = {})
|
|
8581
|
+
if @api_client.config.debugging
|
|
8582
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.list_sfvb_flows ...'
|
|
8583
|
+
end
|
|
8584
|
+
# verify the required parameter 'storefront_oid' is set
|
|
8585
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
8586
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.list_sfvb_flows"
|
|
8587
|
+
end
|
|
8588
|
+
# resource path
|
|
8589
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/flows'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s))
|
|
8590
|
+
|
|
8591
|
+
# query parameters
|
|
8592
|
+
query_params = opts[:query_params] || {}
|
|
8593
|
+
query_params[:'search'] = opts[:'search'] if !opts[:'search'].nil?
|
|
8594
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
|
8595
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
|
8596
|
+
query_params[:'include_deleted'] = opts[:'include_deleted'] if !opts[:'include_deleted'].nil?
|
|
8597
|
+
|
|
8598
|
+
# header parameters
|
|
8599
|
+
header_params = opts[:header_params] || {}
|
|
8600
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
8601
|
+
# HTTP header 'Accept' (if needed)
|
|
8602
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
8603
|
+
|
|
8604
|
+
# form parameters
|
|
8605
|
+
form_params = opts[:form_params] || {}
|
|
8606
|
+
|
|
8607
|
+
# http body (model)
|
|
8608
|
+
post_body = opts[:debug_body]
|
|
8609
|
+
|
|
8610
|
+
# return_type
|
|
8611
|
+
return_type = opts[:debug_return_type] || 'SfvbFlowsResponse'
|
|
8612
|
+
|
|
8613
|
+
# auth_names
|
|
8614
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
8615
|
+
|
|
8616
|
+
new_options = opts.merge(
|
|
8617
|
+
:operation => :"SfvbApi.list_sfvb_flows",
|
|
8618
|
+
:header_params => header_params,
|
|
8619
|
+
:query_params => query_params,
|
|
8620
|
+
:form_params => form_params,
|
|
8621
|
+
:body => post_body,
|
|
8622
|
+
:auth_names => auth_names,
|
|
8623
|
+
:return_type => return_type
|
|
8624
|
+
)
|
|
8625
|
+
|
|
8626
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
8627
|
+
if @api_client.config.debugging
|
|
8628
|
+
@api_client.config.logger.debug "API called: SfvbApi#list_sfvb_flows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
8629
|
+
end
|
|
8630
|
+
return data, status_code, headers
|
|
8631
|
+
end
|
|
8632
|
+
|
|
8271
8633
|
# List built-in messages
|
|
8272
8634
|
# The system text templates render by key, such as checkout labels, for one theme (the active theme unless theme_oid is given). Each message has its English, whether it was edited, and each enabled language's text with its source (hand, machine, pending or none). A message appears the first time a page renders it. q matches the key or the English. overridden keeps messages with an edited English or a hand translation. Paged by offset and limit (default 200, at most 500).
|
|
8273
8635
|
# @param storefront_oid [Integer]
|
|
@@ -12981,6 +13343,94 @@ module UltracartClient
|
|
|
12981
13343
|
return data, status_code, headers
|
|
12982
13344
|
end
|
|
12983
13345
|
|
|
13346
|
+
# Change a flow or campaign email's subject or preview text
|
|
13347
|
+
# A field left out keeps its value. Each is 5 to 150 characters on one line. Send the hash_sha256 you read as If-Match. An email in a sending flow or campaign needs sfvb_publish, as a body push does. The merchant's content review rule applies, so an email waiting for review or rejected goes back to needing review. An email suspended for spam is refused with sfvb.email_suspended.
|
|
13348
|
+
# @param storefront_oid [Integer]
|
|
13349
|
+
# @param email_uuid [String]
|
|
13350
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
13351
|
+
# @param email_update_request [SfvbEmailUpdateRequest] The subject or preview text to change
|
|
13352
|
+
# @param [Hash] opts the optional parameters
|
|
13353
|
+
# @return [SfvbEmail]
|
|
13354
|
+
def update_sfvb_email(storefront_oid, email_uuid, if_match, email_update_request, opts = {})
|
|
13355
|
+
data, _status_code, _headers = update_sfvb_email_with_http_info(storefront_oid, email_uuid, if_match, email_update_request, opts)
|
|
13356
|
+
data
|
|
13357
|
+
end
|
|
13358
|
+
|
|
13359
|
+
# Change a flow or campaign email's subject or preview text
|
|
13360
|
+
# A field left out keeps its value. Each is 5 to 150 characters on one line. Send the hash_sha256 you read as If-Match. An email in a sending flow or campaign needs sfvb_publish, as a body push does. The merchant's content review rule applies, so an email waiting for review or rejected goes back to needing review. An email suspended for spam is refused with sfvb.email_suspended.
|
|
13361
|
+
# @param storefront_oid [Integer]
|
|
13362
|
+
# @param email_uuid [String]
|
|
13363
|
+
# @param if_match [String] hash_sha256 from the last read. Required; 428 when absent, 412 when stale.
|
|
13364
|
+
# @param email_update_request [SfvbEmailUpdateRequest] The subject or preview text to change
|
|
13365
|
+
# @param [Hash] opts the optional parameters
|
|
13366
|
+
# @return [Array<(SfvbEmail, Integer, Hash)>] SfvbEmail data, response status code and response headers
|
|
13367
|
+
def update_sfvb_email_with_http_info(storefront_oid, email_uuid, if_match, email_update_request, opts = {})
|
|
13368
|
+
if @api_client.config.debugging
|
|
13369
|
+
@api_client.config.logger.debug 'Calling API: SfvbApi.update_sfvb_email ...'
|
|
13370
|
+
end
|
|
13371
|
+
# verify the required parameter 'storefront_oid' is set
|
|
13372
|
+
if @api_client.config.client_side_validation && storefront_oid.nil?
|
|
13373
|
+
fail ArgumentError, "Missing the required parameter 'storefront_oid' when calling SfvbApi.update_sfvb_email"
|
|
13374
|
+
end
|
|
13375
|
+
# verify the required parameter 'email_uuid' is set
|
|
13376
|
+
if @api_client.config.client_side_validation && email_uuid.nil?
|
|
13377
|
+
fail ArgumentError, "Missing the required parameter 'email_uuid' when calling SfvbApi.update_sfvb_email"
|
|
13378
|
+
end
|
|
13379
|
+
# verify the required parameter 'if_match' is set
|
|
13380
|
+
if @api_client.config.client_side_validation && if_match.nil?
|
|
13381
|
+
fail ArgumentError, "Missing the required parameter 'if_match' when calling SfvbApi.update_sfvb_email"
|
|
13382
|
+
end
|
|
13383
|
+
# verify the required parameter 'email_update_request' is set
|
|
13384
|
+
if @api_client.config.client_side_validation && email_update_request.nil?
|
|
13385
|
+
fail ArgumentError, "Missing the required parameter 'email_update_request' when calling SfvbApi.update_sfvb_email"
|
|
13386
|
+
end
|
|
13387
|
+
# resource path
|
|
13388
|
+
local_var_path = '/sfvb/storefronts/{storefront_oid}/emails/{email_uuid}'.sub('{' + 'storefront_oid' + '}', CGI.escape(storefront_oid.to_s)).sub('{' + 'email_uuid' + '}', CGI.escape(email_uuid.to_s))
|
|
13389
|
+
|
|
13390
|
+
# query parameters
|
|
13391
|
+
query_params = opts[:query_params] || {}
|
|
13392
|
+
|
|
13393
|
+
# header parameters
|
|
13394
|
+
header_params = opts[:header_params] || {}
|
|
13395
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
|
13396
|
+
# HTTP header 'Accept' (if needed)
|
|
13397
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
13398
|
+
# HTTP header 'Content-Type'
|
|
13399
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
13400
|
+
if !content_type.nil?
|
|
13401
|
+
header_params['Content-Type'] = content_type
|
|
13402
|
+
end
|
|
13403
|
+
header_params[:'If-Match'] = if_match
|
|
13404
|
+
|
|
13405
|
+
# form parameters
|
|
13406
|
+
form_params = opts[:form_params] || {}
|
|
13407
|
+
|
|
13408
|
+
# http body (model)
|
|
13409
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(email_update_request)
|
|
13410
|
+
|
|
13411
|
+
# return_type
|
|
13412
|
+
return_type = opts[:debug_return_type] || 'SfvbEmail'
|
|
13413
|
+
|
|
13414
|
+
# auth_names
|
|
13415
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
|
13416
|
+
|
|
13417
|
+
new_options = opts.merge(
|
|
13418
|
+
:operation => :"SfvbApi.update_sfvb_email",
|
|
13419
|
+
:header_params => header_params,
|
|
13420
|
+
:query_params => query_params,
|
|
13421
|
+
:form_params => form_params,
|
|
13422
|
+
:body => post_body,
|
|
13423
|
+
:auth_names => auth_names,
|
|
13424
|
+
:return_type => return_type
|
|
13425
|
+
)
|
|
13426
|
+
|
|
13427
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
13428
|
+
if @api_client.config.debugging
|
|
13429
|
+
@api_client.config.logger.debug "API called: SfvbApi#update_sfvb_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
13430
|
+
end
|
|
13431
|
+
return data, status_code, headers
|
|
13432
|
+
end
|
|
13433
|
+
|
|
12984
13434
|
# Change attributes across many items in one call
|
|
12985
13435
|
# 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.
|
|
12986
13436
|
# @param storefront_oid [Integer]
|
|
@@ -139,7 +139,7 @@ module UltracartClient
|
|
|
139
139
|
# Check to see if the all the properties in the model are valid
|
|
140
140
|
# @return true if the model is valid
|
|
141
141
|
def valid?
|
|
142
|
-
provider_name_validator = EnumAttributeValidator.new('String', ["ActiveCampaign", "AWeber", "Campaign Monitor", "ConstantContact", "Emma", "GetResponse", "iContact", "Klaviyo", "
|
|
142
|
+
provider_name_validator = EnumAttributeValidator.new('String', ["ActiveCampaign", "AWeber", "Campaign Monitor", "ConstantContact", "Emma", "GetResponse", "iContact", "Klaviyo", "MailChimp"])
|
|
143
143
|
return false unless provider_name_validator.valid?(@provider_name)
|
|
144
144
|
true
|
|
145
145
|
end
|
|
@@ -147,7 +147,7 @@ module UltracartClient
|
|
|
147
147
|
# Custom attribute writer method checking allowed values (enum).
|
|
148
148
|
# @param [Object] provider_name Object to be assigned
|
|
149
149
|
def provider_name=(provider_name)
|
|
150
|
-
validator = EnumAttributeValidator.new('String', ["ActiveCampaign", "AWeber", "Campaign Monitor", "ConstantContact", "Emma", "GetResponse", "iContact", "Klaviyo", "
|
|
150
|
+
validator = EnumAttributeValidator.new('String', ["ActiveCampaign", "AWeber", "Campaign Monitor", "ConstantContact", "Emma", "GetResponse", "iContact", "Klaviyo", "MailChimp"])
|
|
151
151
|
unless validator.valid?(provider_name)
|
|
152
152
|
fail ArgumentError, "invalid value for \"provider_name\", must be one of #{validator.allowable_values}."
|
|
153
153
|
end
|