MailchimpMarketing 3.0.5 → 3.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MailchimpMarketing.gemspec +1 -1
- data/README.md +22 -26
- data/lib/MailchimpMarketing.rb +1 -1
- data/lib/MailchimpMarketing/api/activity_feed_api.rb +11 -67
- data/lib/MailchimpMarketing/api/authorized_apps_api.rb +17 -110
- data/lib/MailchimpMarketing/api/automations_api.rb +111 -666
- data/lib/MailchimpMarketing/api/batch_webhooks_api.rb +28 -177
- data/lib/MailchimpMarketing/api/batches_api.rb +22 -142
- data/lib/MailchimpMarketing/api/campaign_folders_api.rb +28 -177
- data/lib/MailchimpMarketing/api/campaigns_api.rb +125 -784
- data/lib/MailchimpMarketing/api/connected_sites_api.rb +27 -174
- data/lib/MailchimpMarketing/api/conversations_api.rb +31 -200
- data/lib/MailchimpMarketing/api/dashboard_api.rb +26 -215
- data/lib/MailchimpMarketing/api/ecommerce_api.rb +388 -2253
- data/lib/MailchimpMarketing/api/external_auths_api.rb +17 -110
- data/lib/MailchimpMarketing/api/facebook_ads_api.rb +14 -81
- data/lib/MailchimpMarketing/api/file_manager_api.rb +60 -402
- data/lib/MailchimpMarketing/api/landing_pages_api.rb +45 -280
- data/lib/MailchimpMarketing/api/lists_api.rb +420 -2575
- data/lib/MailchimpMarketing/api/ping_api.rb +6 -32
- data/lib/MailchimpMarketing/api/postcards_api.rb +8 -40
- data/lib/MailchimpMarketing/api/reporting_api.rb +35 -231
- data/lib/MailchimpMarketing/api/reports_api.rb +131 -881
- data/lib/MailchimpMarketing/api/root_api.rb +6 -36
- data/lib/MailchimpMarketing/api/search_campaigns_api.rb +7 -38
- data/lib/MailchimpMarketing/api/search_members_api.rb +7 -40
- data/lib/MailchimpMarketing/api/template_folders_api.rb +28 -177
- data/lib/MailchimpMarketing/api/templates_api.rb +34 -228
- data/lib/MailchimpMarketing/api/verified_domains_api.rb +27 -165
- data/lib/MailchimpMarketing/api_client.rb +11 -55
- data/lib/MailchimpMarketing/api_error.rb +1 -1
- data/lib/MailchimpMarketing/configuration.rb +1 -1
- data/lib/MailchimpMarketing/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a1391c7f8d25dcb3b671b2c6dd57935216466ecea3593d94c30659c854ba8d0
|
4
|
+
data.tar.gz: b0af15f0411f03b95329b3dfeb903aa39bda9e469ba8164108f5400a973e16c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6be6bc6c718c4a83dfd7b048c5092f9de44d457e1959049400f4820cd0093e0bdf42c4a12378a1fedbc0da3114d239cb60a225a8596179860e6177e855275d86
|
7
|
+
data.tar.gz: 7db2baa9d74d507621428d2a8cfb0d9d27bab5b3d0c3c83aa839451a5d5d00bcf829e282c93c96fecb3d574bb4a7a6986919d1297f8c70e50bae33486e841694
|
data/MailchimpMarketing.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
7
7
|
|
8
|
-
OpenAPI spec version: 3.0.
|
8
|
+
OpenAPI spec version: 3.0.6
|
9
9
|
Contact: apihelp@mailchimp.com
|
10
10
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
11
11
|
Swagger Codegen version: 2.4.12
|
data/README.md
CHANGED
@@ -4,39 +4,24 @@ The official Ruby client library for the Mailchimp Marketing API (v1)
|
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
###
|
8
|
-
|
9
|
-
To build the Ruby code into a gem:
|
7
|
+
### via RubyGems
|
10
8
|
|
11
9
|
```shell
|
12
|
-
gem
|
10
|
+
gem install MailchimpMarketing
|
13
11
|
```
|
14
12
|
|
15
|
-
|
13
|
+
### via Git
|
16
14
|
|
17
15
|
```shell
|
18
|
-
gem
|
16
|
+
gem 'MailchimpMarketing', :git => 'https://github.com/mailchimp/mailchimp-marketing-ruby.git'
|
19
17
|
```
|
20
|
-
(for development, run `gem install --dev ./MailchimpMarketing-3.0.5.gem` to install the development dependencies)
|
21
|
-
|
22
|
-
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
23
|
-
|
24
|
-
Finally add this to the Gemfile:
|
25
|
-
|
26
|
-
gem 'MailchimpMarketing', '~> 3.0.5'
|
27
|
-
|
28
|
-
### Install from Git
|
29
18
|
|
30
|
-
|
31
|
-
|
32
|
-
gem 'MailchimpMarketing', :git => 'https://github.com/mailchimp/mailchimp-marketing-ruby.git'
|
33
|
-
|
34
|
-
### Include the Ruby code directly
|
35
|
-
|
36
|
-
Include the Ruby code directly using `-I` as follows:
|
19
|
+
### via Local Installation
|
37
20
|
|
38
21
|
```shell
|
39
|
-
|
22
|
+
gem build MailchimpMarketing.gemspec
|
23
|
+
gem install ./MailchimpMarketing-3.0.6.gem
|
24
|
+
gem 'MailchimpMarketing', '~> 3.0.6'
|
40
25
|
```
|
41
26
|
|
42
27
|
## Quick Start
|
@@ -59,11 +44,10 @@ end
|
|
59
44
|
|
60
45
|
## Authentication Methods
|
61
46
|
|
62
|
-
The client library can be configured to use either **Basic Auth** or **OAuth2**.
|
63
|
-
|
64
|
-
For either method, a server prefix should be passed in i.e. `us19`, in order for the client to determine to appropriate host url.
|
47
|
+
The client library can be configured to use either **Basic Auth** or **OAuth2**. A server prefix should be provided i.e. `us19`, in order for the client to determine to appropriate host url.
|
65
48
|
|
66
49
|
### Basic Auth
|
50
|
+
|
67
51
|
```ruby
|
68
52
|
client.set_config({
|
69
53
|
:api_key => 'YOUR_API_KEY',
|
@@ -72,6 +56,7 @@ client.set_config({
|
|
72
56
|
```
|
73
57
|
|
74
58
|
### OAuth2
|
59
|
+
|
75
60
|
```ruby
|
76
61
|
client.set_config({
|
77
62
|
:access_token => 'YOUR_ACCESS_TOKEN',
|
@@ -79,6 +64,17 @@ client.set_config({
|
|
79
64
|
})
|
80
65
|
```
|
81
66
|
|
67
|
+
### Shorthand
|
68
|
+
|
69
|
+
As a shortcut, the configuration object can be passed in directly when creating the client.
|
70
|
+
|
71
|
+
```ruby
|
72
|
+
client = MailchimpMarketing::Client.new({
|
73
|
+
:api_key => 'YOUR_API_KEY',
|
74
|
+
:server => 'YOUR_SERVER_PREFIX'
|
75
|
+
})
|
76
|
+
```
|
77
|
+
|
82
78
|
## API Endpoints
|
83
79
|
|
84
80
|
All URIs are relative to *https://server.api.mailchimp.com/3.0*
|
data/lib/MailchimpMarketing.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
OpenAPI spec version: 3.0.
|
6
|
+
OpenAPI spec version: 3.0.6
|
7
7
|
Contact: apihelp@mailchimp.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.4.12
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
OpenAPI spec version: 3.0.
|
6
|
+
OpenAPI spec version: 3.0.6
|
7
7
|
Contact: apihelp@mailchimp.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.4.12
|
@@ -11,6 +11,7 @@ Swagger Codegen version: 2.4.12
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'uri'
|
14
|
+
require 'json'
|
14
15
|
|
15
16
|
module MailchimpMarketing
|
16
17
|
class ActivityFeedApi
|
@@ -19,94 +20,37 @@ module MailchimpMarketing
|
|
19
20
|
def initialize(api_client)
|
20
21
|
@api_client = api_client
|
21
22
|
end
|
22
|
-
# List activity feed resources
|
23
|
-
# Get information about the activity feed endpoint's resources.
|
24
|
-
# @param [Hash] opts the optional parameters
|
25
|
-
# @return [ActivityFeedRoot]
|
26
|
-
def get(opts = {})
|
27
|
-
data, _status_code, _headers = get_with_http_info(opts)
|
28
|
-
data
|
29
|
-
end
|
30
23
|
|
31
24
|
# List activity feed resources
|
32
|
-
|
33
|
-
# @param [Hash] opts the optional parameters
|
34
|
-
# @return [Array<(ActivityFeedRoot, Fixnum, Hash)>] ActivityFeedRoot data, response status code and response headers
|
35
|
-
def get_with_http_info(opts = {})
|
36
|
-
# resource path
|
37
|
-
local_var_path = '/activity-feed'
|
25
|
+
def get(opts = {})
|
38
26
|
|
39
|
-
# query parameters
|
40
27
|
query_params = {}
|
41
|
-
|
42
|
-
# header parameters
|
43
|
-
header_params = {}
|
44
|
-
# HTTP header 'Accept' (if needed)
|
45
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
46
|
-
# HTTP header 'Content-Type'
|
47
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
48
|
-
|
49
|
-
# form parameters
|
50
28
|
form_params = {}
|
51
|
-
|
52
|
-
# http body (model)
|
53
29
|
post_body = nil
|
54
|
-
|
30
|
+
|
31
|
+
local_var_path = '/activity-feed'
|
55
32
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
56
|
-
:header_params => header_params,
|
57
33
|
:query_params => query_params,
|
58
34
|
:form_params => form_params,
|
59
|
-
:body => post_body
|
60
|
-
:auth_names => auth_names,
|
61
|
-
:return_type => 'ActivityFeedRoot')
|
35
|
+
:body => post_body)
|
62
36
|
return data, status_code, headers
|
63
37
|
end
|
64
|
-
# Get latest chimp chatter
|
65
|
-
# Return the Chimp Chatter for this account ordered by most recent.
|
66
|
-
# @param [Hash] opts the optional parameters
|
67
|
-
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
|
68
|
-
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
|
69
|
-
# @return [InlineResponse200]
|
70
|
-
def get_chimp_chatter(opts = {})
|
71
|
-
data, _status_code, _headers = get_chimp_chatter_with_http_info(opts)
|
72
|
-
data
|
73
|
-
end
|
74
38
|
|
75
39
|
# Get latest chimp chatter
|
76
|
-
|
77
|
-
|
78
|
-
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
|
79
|
-
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
|
80
|
-
# @return [Array<(InlineResponse200, Fixnum, Hash)>] InlineResponse200 data, response status code and response headers
|
81
|
-
def get_chimp_chatter_with_http_info(opts = {})
|
82
|
-
# resource path
|
83
|
-
local_var_path = '/activity-feed/chimp-chatter'
|
40
|
+
def get_chimp_chatter(opts = {})
|
41
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
84
42
|
|
85
|
-
# query parameters
|
86
43
|
query_params = {}
|
87
44
|
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
88
45
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
89
|
-
|
90
|
-
# header parameters
|
91
|
-
header_params = {}
|
92
|
-
# HTTP header 'Accept' (if needed)
|
93
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
94
|
-
# HTTP header 'Content-Type'
|
95
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
96
|
-
|
97
|
-
# form parameters
|
98
46
|
form_params = {}
|
99
|
-
|
100
|
-
# http body (model)
|
101
47
|
post_body = nil
|
102
|
-
|
48
|
+
|
49
|
+
local_var_path = '/activity-feed/chimp-chatter'
|
103
50
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
104
|
-
:header_params => header_params,
|
105
51
|
:query_params => query_params,
|
106
52
|
:form_params => form_params,
|
107
|
-
:body => post_body
|
108
|
-
:auth_names => auth_names,
|
109
|
-
:return_type => 'InlineResponse200')
|
53
|
+
:body => post_body)
|
110
54
|
return data, status_code, headers
|
111
55
|
end
|
112
56
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
OpenAPI spec version: 3.0.
|
6
|
+
OpenAPI spec version: 3.0.6
|
7
7
|
Contact: apihelp@mailchimp.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.4.12
|
@@ -11,6 +11,7 @@ Swagger Codegen version: 2.4.12
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'uri'
|
14
|
+
require 'json'
|
14
15
|
|
15
16
|
module MailchimpMarketing
|
16
17
|
class AuthorizedAppsApi
|
@@ -19,152 +20,58 @@ module MailchimpMarketing
|
|
19
20
|
def initialize(api_client)
|
20
21
|
@api_client = api_client
|
21
22
|
end
|
22
|
-
# List authorized apps
|
23
|
-
# Get a list of an account's registered, connected applications.
|
24
|
-
# @param [Hash] opts the optional parameters
|
25
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
26
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
27
|
-
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000** (default to 10)
|
28
|
-
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**. (default to 0)
|
29
|
-
# @return [InlineResponse2001]
|
30
|
-
def list(opts = {})
|
31
|
-
data, _status_code, _headers = list_with_http_info(opts)
|
32
|
-
data
|
33
|
-
end
|
34
23
|
|
35
24
|
# List authorized apps
|
36
|
-
|
37
|
-
|
38
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
39
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
40
|
-
# @option opts [Integer] :count The number of records to return. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **10**. [Maximum value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **1000**
|
41
|
-
# @option opts [Integer] :offset The number of records from a collection to skip. Iterating over large collections with this parameter can be slow. [Default value](/developer/guides/get-started-with-mailchimp-api-3/#Parameters) is **0**.
|
42
|
-
# @return [Array<(InlineResponse2001, Fixnum, Hash)>] InlineResponse2001 data, response status code and response headers
|
43
|
-
def list_with_http_info(opts = {})
|
44
|
-
# resource path
|
45
|
-
local_var_path = '/authorized-apps'
|
25
|
+
def list(opts = {})
|
26
|
+
fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000
|
46
27
|
|
47
|
-
# query parameters
|
48
28
|
query_params = {}
|
49
29
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
50
30
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
51
31
|
query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
|
52
32
|
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
53
|
-
|
54
|
-
# header parameters
|
55
|
-
header_params = {}
|
56
|
-
# HTTP header 'Accept' (if needed)
|
57
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
58
|
-
# HTTP header 'Content-Type'
|
59
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
60
|
-
|
61
|
-
# form parameters
|
62
33
|
form_params = {}
|
63
|
-
|
64
|
-
# http body (model)
|
65
34
|
post_body = nil
|
66
|
-
|
35
|
+
|
36
|
+
local_var_path = '/authorized-apps'
|
67
37
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
68
|
-
:header_params => header_params,
|
69
38
|
:query_params => query_params,
|
70
39
|
:form_params => form_params,
|
71
|
-
:body => post_body
|
72
|
-
:auth_names => auth_names,
|
73
|
-
:return_type => 'InlineResponse2001')
|
40
|
+
:body => post_body)
|
74
41
|
return data, status_code, headers
|
75
42
|
end
|
76
|
-
# Get authorized app info
|
77
|
-
# Get information about a specific authorized application.
|
78
|
-
# @param app_id The unique id for the connected authorized application.
|
79
|
-
# @param [Hash] opts the optional parameters
|
80
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
81
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
82
|
-
# @return [InlineResponse2001Apps]
|
83
|
-
def get(app_id = {}, opts = {})
|
84
|
-
data, _status_code, _headers = get_with_http_info(app_id, opts)
|
85
|
-
data
|
86
|
-
end
|
87
43
|
|
88
44
|
# Get authorized app info
|
89
|
-
|
90
|
-
|
91
|
-
# @param [Hash] opts the optional parameters
|
92
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
93
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
94
|
-
# @return [Array<(InlineResponse2001Apps, Fixnum, Hash)>] InlineResponse2001Apps data, response status code and response headers
|
95
|
-
def get_with_http_info(app_id, opts = {})
|
96
|
-
# resource path
|
97
|
-
local_var_path = '/authorized-apps/{app_id}'.sub('{' + 'app_id' + '}', app_id.to_s)
|
45
|
+
def get(app_id, opts = {})
|
46
|
+
fail ArgumentError, "Missing required param: 'app_id'" if app_id.nil?
|
98
47
|
|
99
|
-
# query parameters
|
100
48
|
query_params = {}
|
101
49
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
102
50
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
103
|
-
|
104
|
-
# header parameters
|
105
|
-
header_params = {}
|
106
|
-
# HTTP header 'Accept' (if needed)
|
107
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
108
|
-
# HTTP header 'Content-Type'
|
109
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
110
|
-
|
111
|
-
# form parameters
|
112
51
|
form_params = {}
|
113
|
-
|
114
|
-
# http body (model)
|
115
52
|
post_body = nil
|
116
|
-
|
53
|
+
|
54
|
+
local_var_path = '/authorized-apps/{app_id}'.sub('{' + 'app_id' + '}', app_id.to_s)
|
117
55
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
118
|
-
:header_params => header_params,
|
119
56
|
:query_params => query_params,
|
120
57
|
:form_params => form_params,
|
121
|
-
:body => post_body
|
122
|
-
:auth_names => auth_names,
|
123
|
-
:return_type => 'InlineResponse2001Apps')
|
58
|
+
:body => post_body)
|
124
59
|
return data, status_code, headers
|
125
60
|
end
|
126
|
-
# Link application
|
127
|
-
# Get Batch Operation Status
|
128
|
-
# @param client_details Use this endpoint to link your application and retrieve OAuth2-based credentials. This is useful if you can't implement the OAuth2 flow but still want to associate calls with your application.
|
129
|
-
# @param [Hash] opts the optional parameters
|
130
|
-
# @return [InlineResponse2002]
|
131
|
-
def link(client_details = {}, opts = {})
|
132
|
-
data, _status_code, _headers = link_with_http_info(client_details, opts)
|
133
|
-
data
|
134
|
-
end
|
135
61
|
|
136
62
|
# Link application
|
137
|
-
|
138
|
-
|
139
|
-
# @param [Hash] opts the optional parameters
|
140
|
-
# @return [Array<(InlineResponse2002, Fixnum, Hash)>] InlineResponse2002 data, response status code and response headers
|
141
|
-
def link_with_http_info(client_details, opts = {})
|
142
|
-
# resource path
|
143
|
-
local_var_path = '/authorized-apps'
|
63
|
+
def link(client_details, opts = {})
|
64
|
+
fail ArgumentError, "Missing required param: 'client_details'" if client_details.nil?
|
144
65
|
|
145
|
-
# query parameters
|
146
66
|
query_params = {}
|
147
|
-
|
148
|
-
# header parameters
|
149
|
-
header_params = {}
|
150
|
-
# HTTP header 'Accept' (if needed)
|
151
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
152
|
-
# HTTP header 'Content-Type'
|
153
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
154
|
-
|
155
|
-
# form parameters
|
156
67
|
form_params = {}
|
157
|
-
|
158
|
-
# http body (model)
|
159
68
|
post_body = @api_client.object_to_http_body(client_details)
|
160
|
-
|
69
|
+
|
70
|
+
local_var_path = '/authorized-apps'
|
161
71
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
162
|
-
:header_params => header_params,
|
163
72
|
:query_params => query_params,
|
164
73
|
:form_params => form_params,
|
165
|
-
:body => post_body
|
166
|
-
:auth_names => auth_names,
|
167
|
-
:return_type => 'InlineResponse2002')
|
74
|
+
:body => post_body)
|
168
75
|
return data, status_code, headers
|
169
76
|
end
|
170
77
|
end
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
5
5
|
|
6
|
-
OpenAPI spec version: 3.0.
|
6
|
+
OpenAPI spec version: 3.0.6
|
7
7
|
Contact: apihelp@mailchimp.com
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.4.12
|
@@ -11,6 +11,7 @@ Swagger Codegen version: 2.4.12
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'uri'
|
14
|
+
require 'json'
|
14
15
|
|
15
16
|
module MailchimpMarketing
|
16
17
|
class AutomationsApi
|
@@ -19,126 +20,44 @@ module MailchimpMarketing
|
|
19
20
|
def initialize(api_client)
|
20
21
|
@api_client = api_client
|
21
22
|
end
|
22
|
-
# Archive automation
|
23
|
-
# Archiving will permanently end your automation and keep the report data. You’ll be able to replicate your archived automation, but you can’t restart it.
|
24
|
-
# @param workflow_id The unique id for the Automation workflow.
|
25
|
-
# @param [Hash] opts the optional parameters
|
26
|
-
# @return [nil]
|
27
|
-
def archive(workflow_id = {}, opts = {})
|
28
|
-
archive_with_http_info(workflow_id, opts)
|
29
|
-
nil
|
30
|
-
end
|
31
23
|
|
32
24
|
# Archive automation
|
33
|
-
|
34
|
-
|
35
|
-
# @param [Hash] opts the optional parameters
|
36
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
37
|
-
def archive_with_http_info(workflow_id, opts = {})
|
38
|
-
# resource path
|
39
|
-
local_var_path = '/automations/{workflow_id}/actions/archive'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
|
25
|
+
def archive(workflow_id, opts = {})
|
26
|
+
fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
|
40
27
|
|
41
|
-
# query parameters
|
42
28
|
query_params = {}
|
43
|
-
|
44
|
-
# header parameters
|
45
|
-
header_params = {}
|
46
|
-
# HTTP header 'Accept' (if needed)
|
47
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
48
|
-
# HTTP header 'Content-Type'
|
49
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
50
|
-
|
51
|
-
# form parameters
|
52
29
|
form_params = {}
|
53
|
-
|
54
|
-
# http body (model)
|
55
30
|
post_body = nil
|
56
|
-
|
31
|
+
|
32
|
+
local_var_path = '/automations/{workflow_id}/actions/archive'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
|
57
33
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
58
|
-
:header_params => header_params,
|
59
34
|
:query_params => query_params,
|
60
35
|
:form_params => form_params,
|
61
|
-
:body => post_body
|
62
|
-
:auth_names => auth_names)
|
36
|
+
:body => post_body)
|
63
37
|
return data, status_code, headers
|
64
38
|
end
|
65
|
-
# Delete workflow email
|
66
|
-
# Removes an individual Automation workflow email. Emails from certain workflow types, including the Abandoned Cart Email (abandonedCart) and Product Retargeting Email (abandonedBrowse) Workflows, cannot be deleted.
|
67
|
-
# @param workflow_id The unique id for the Automation workflow.
|
68
|
-
# @param workflow_email_id The unique id for the Automation workflow email.
|
69
|
-
# @param [Hash] opts the optional parameters
|
70
|
-
# @return [nil]
|
71
|
-
def delete_workflow_email(workflow_id = {}, workflow_email_id = {}, opts = {})
|
72
|
-
delete_workflow_email_with_http_info(workflow_id, workflow_email_id, opts)
|
73
|
-
nil
|
74
|
-
end
|
75
39
|
|
76
40
|
# Delete workflow email
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
# @param [Hash] opts the optional parameters
|
81
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
82
|
-
def delete_workflow_email_with_http_info(workflow_id, workflow_email_id, opts = {})
|
83
|
-
# resource path
|
84
|
-
local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
|
41
|
+
def delete_workflow_email(workflow_id, workflow_email_id, opts = {})
|
42
|
+
fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
|
43
|
+
fail ArgumentError, "Missing required param: 'workflow_email_id'" if workflow_email_id.nil?
|
85
44
|
|
86
|
-
# query parameters
|
87
45
|
query_params = {}
|
88
|
-
|
89
|
-
# header parameters
|
90
|
-
header_params = {}
|
91
|
-
# HTTP header 'Accept' (if needed)
|
92
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
93
|
-
# HTTP header 'Content-Type'
|
94
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
95
|
-
|
96
|
-
# form parameters
|
97
46
|
form_params = {}
|
98
|
-
|
99
|
-
# http body (model)
|
100
47
|
post_body = nil
|
101
|
-
|
48
|
+
|
49
|
+
local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
|
102
50
|
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
103
|
-
:header_params => header_params,
|
104
51
|
:query_params => query_params,
|
105
52
|
:form_params => form_params,
|
106
|
-
:body => post_body
|
107
|
-
:auth_names => auth_names)
|
53
|
+
:body => post_body)
|
108
54
|
return data, status_code, headers
|
109
55
|
end
|
110
|
-
# List automations
|
111
|
-
# Get a summary of an account's Automations.
|
112
|
-
# @param [Hash] opts the optional parameters
|
113
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
114
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
115
|
-
# @option opts [DateTime] :before_create_time Restrict the response to automations created before the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
116
|
-
# @option opts [DateTime] :since_create_time Restrict the response to automations created after the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
117
|
-
# @option opts [DateTime] :before_send_time Restrict the response to automations sent before the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
118
|
-
# @option opts [DateTime] :since_send_time Restrict the response to automations sent after the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
119
|
-
# @option opts [String] :status Restrict the results to automations with the specified status.
|
120
|
-
# @return [InlineResponse2003]
|
121
|
-
def list(opts = {})
|
122
|
-
data, _status_code, _headers = list_with_http_info(opts)
|
123
|
-
data
|
124
|
-
end
|
125
56
|
|
126
57
|
# List automations
|
127
|
-
|
128
|
-
|
129
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
130
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
131
|
-
# @option opts [DateTime] :before_create_time Restrict the response to automations created before the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
132
|
-
# @option opts [DateTime] :since_create_time Restrict the response to automations created after the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
133
|
-
# @option opts [DateTime] :before_send_time Restrict the response to automations sent before the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
134
|
-
# @option opts [DateTime] :since_send_time Restrict the response to automations sent after the set time. We recommend [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time format: 2015-10-21T15:41:36+00:00.
|
135
|
-
# @option opts [String] :status Restrict the results to automations with the specified status.
|
136
|
-
# @return [Array<(InlineResponse2003, Fixnum, Hash)>] InlineResponse2003 data, response status code and response headers
|
137
|
-
def list_with_http_info(opts = {})
|
138
|
-
# resource path
|
139
|
-
local_var_path = '/automations'
|
58
|
+
def list(opts = {})
|
59
|
+
fail ArgumentError, 'invalid value for "status", must be one of save, paused, sending' if opts[:'status'] && !['save', 'paused', 'sending'].include?(opts[:'status'])
|
140
60
|
|
141
|
-
# query parameters
|
142
61
|
query_params = {}
|
143
62
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
144
63
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
@@ -147,759 +66,285 @@ module MailchimpMarketing
|
|
147
66
|
query_params[:'before_send_time'] = opts[:'before_send_time'] if !opts[:'before_send_time'].nil?
|
148
67
|
query_params[:'since_send_time'] = opts[:'since_send_time'] if !opts[:'since_send_time'].nil?
|
149
68
|
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
150
|
-
|
151
|
-
# header parameters
|
152
|
-
header_params = {}
|
153
|
-
# HTTP header 'Accept' (if needed)
|
154
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
155
|
-
# HTTP header 'Content-Type'
|
156
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
157
|
-
|
158
|
-
# form parameters
|
159
69
|
form_params = {}
|
160
|
-
|
161
|
-
# http body (model)
|
162
70
|
post_body = nil
|
163
|
-
|
71
|
+
|
72
|
+
local_var_path = '/automations'
|
164
73
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
165
|
-
:header_params => header_params,
|
166
74
|
:query_params => query_params,
|
167
75
|
:form_params => form_params,
|
168
|
-
:body => post_body
|
169
|
-
:auth_names => auth_names,
|
170
|
-
:return_type => 'InlineResponse2003')
|
76
|
+
:body => post_body)
|
171
77
|
return data, status_code, headers
|
172
78
|
end
|
173
|
-
# Get automation info
|
174
|
-
# Get a summary of an individual Automation workflow's settings and content. The `trigger_settings` object returns information for the first email in the workflow.
|
175
|
-
# @param workflow_id The unique id for the Automation workflow.
|
176
|
-
# @param [Hash] opts the optional parameters
|
177
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
178
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
179
|
-
# @return [AutomationWorkflow]
|
180
|
-
def get(workflow_id = {}, opts = {})
|
181
|
-
data, _status_code, _headers = get_with_http_info(workflow_id, opts)
|
182
|
-
data
|
183
|
-
end
|
184
79
|
|
185
80
|
# Get automation info
|
186
|
-
|
187
|
-
|
188
|
-
# @param [Hash] opts the optional parameters
|
189
|
-
# @option opts [Array<String>] :fields A comma-separated list of fields to return. Reference parameters of sub-objects with dot notation.
|
190
|
-
# @option opts [Array<String>] :exclude_fields A comma-separated list of fields to exclude. Reference parameters of sub-objects with dot notation.
|
191
|
-
# @return [Array<(AutomationWorkflow, Fixnum, Hash)>] AutomationWorkflow data, response status code and response headers
|
192
|
-
def get_with_http_info(workflow_id, opts = {})
|
193
|
-
# resource path
|
194
|
-
local_var_path = '/automations/{workflow_id}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
|
81
|
+
def get(workflow_id, opts = {})
|
82
|
+
fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
|
195
83
|
|
196
|
-
# query parameters
|
197
84
|
query_params = {}
|
198
85
|
query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil?
|
199
86
|
query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil?
|
200
|
-
|
201
|
-
# header parameters
|
202
|
-
header_params = {}
|
203
|
-
# HTTP header 'Accept' (if needed)
|
204
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
205
|
-
# HTTP header 'Content-Type'
|
206
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
207
|
-
|
208
|
-
# form parameters
|
209
87
|
form_params = {}
|
210
|
-
|
211
|
-
# http body (model)
|
212
88
|
post_body = nil
|
213
|
-
|
89
|
+
|
90
|
+
local_var_path = '/automations/{workflow_id}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
|
214
91
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
215
|
-
:header_params => header_params,
|
216
92
|
:query_params => query_params,
|
217
93
|
:form_params => form_params,
|
218
|
-
:body => post_body
|
219
|
-
:auth_names => auth_names,
|
220
|
-
:return_type => 'AutomationWorkflow')
|
94
|
+
:body => post_body)
|
221
95
|
return data, status_code, headers
|
222
96
|
end
|
223
|
-
# List automated emails
|
224
|
-
# Get a summary of the emails in an Automation workflow.
|
225
|
-
# @param workflow_id The unique id for the Automation workflow.
|
226
|
-
# @param [Hash] opts the optional parameters
|
227
|
-
# @return [AutomationEmails]
|
228
|
-
def list_all_workflow_emails(workflow_id = {}, opts = {})
|
229
|
-
data, _status_code, _headers = list_all_workflow_emails_with_http_info(workflow_id, opts)
|
230
|
-
data
|
231
|
-
end
|
232
97
|
|
233
98
|
# List automated emails
|
234
|
-
|
235
|
-
|
236
|
-
# @param [Hash] opts the optional parameters
|
237
|
-
# @return [Array<(AutomationEmails, Fixnum, Hash)>] AutomationEmails data, response status code and response headers
|
238
|
-
def list_all_workflow_emails_with_http_info(workflow_id, opts = {})
|
239
|
-
# resource path
|
240
|
-
local_var_path = '/automations/{workflow_id}/emails'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
|
99
|
+
def list_all_workflow_emails(workflow_id, opts = {})
|
100
|
+
fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
|
241
101
|
|
242
|
-
# query parameters
|
243
102
|
query_params = {}
|
244
|
-
|
245
|
-
# header parameters
|
246
|
-
header_params = {}
|
247
|
-
# HTTP header 'Accept' (if needed)
|
248
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
249
|
-
# HTTP header 'Content-Type'
|
250
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
251
|
-
|
252
|
-
# form parameters
|
253
103
|
form_params = {}
|
254
|
-
|
255
|
-
# http body (model)
|
256
104
|
post_body = nil
|
257
|
-
|
105
|
+
|
106
|
+
local_var_path = '/automations/{workflow_id}/emails'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
|
258
107
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
259
|
-
:header_params => header_params,
|
260
108
|
:query_params => query_params,
|
261
109
|
:form_params => form_params,
|
262
|
-
:body => post_body
|
263
|
-
:auth_names => auth_names,
|
264
|
-
:return_type => 'AutomationEmails')
|
110
|
+
:body => post_body)
|
265
111
|
return data, status_code, headers
|
266
112
|
end
|
267
|
-
# Get workflow email info
|
268
|
-
# Get information about an individual Automation workflow email.
|
269
|
-
# @param workflow_id The unique id for the Automation workflow.
|
270
|
-
# @param workflow_email_id The unique id for the Automation workflow email.
|
271
|
-
# @param [Hash] opts the optional parameters
|
272
|
-
# @return [AutomationWorkflowEmail]
|
273
|
-
def get_workflow_email(workflow_id = {}, workflow_email_id = {}, opts = {})
|
274
|
-
data, _status_code, _headers = get_workflow_email_with_http_info(workflow_id, workflow_email_id, opts)
|
275
|
-
data
|
276
|
-
end
|
277
113
|
|
278
114
|
# Get workflow email info
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
# @param [Hash] opts the optional parameters
|
283
|
-
# @return [Array<(AutomationWorkflowEmail, Fixnum, Hash)>] AutomationWorkflowEmail data, response status code and response headers
|
284
|
-
def get_workflow_email_with_http_info(workflow_id, workflow_email_id, opts = {})
|
285
|
-
# resource path
|
286
|
-
local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
|
115
|
+
def get_workflow_email(workflow_id, workflow_email_id, opts = {})
|
116
|
+
fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
|
117
|
+
fail ArgumentError, "Missing required param: 'workflow_email_id'" if workflow_email_id.nil?
|
287
118
|
|
288
|
-
# query parameters
|
289
119
|
query_params = {}
|
290
|
-
|
291
|
-
# header parameters
|
292
|
-
header_params = {}
|
293
|
-
# HTTP header 'Accept' (if needed)
|
294
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
295
|
-
# HTTP header 'Content-Type'
|
296
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
297
|
-
|
298
|
-
# form parameters
|
299
120
|
form_params = {}
|
300
|
-
|
301
|
-
# http body (model)
|
302
121
|
post_body = nil
|
303
|
-
|
122
|
+
|
123
|
+
local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
|
304
124
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
305
|
-
:header_params => header_params,
|
306
125
|
:query_params => query_params,
|
307
126
|
:form_params => form_params,
|
308
|
-
:body => post_body
|
309
|
-
:auth_names => auth_names,
|
310
|
-
:return_type => 'AutomationWorkflowEmail')
|
127
|
+
:body => post_body)
|
311
128
|
return data, status_code, headers
|
312
129
|
end
|
313
|
-
# List automated email subscribers
|
314
|
-
# Get information about an Automation email queue.
|
315
|
-
# @param workflow_id The unique id for the Automation workflow.
|
316
|
-
# @param workflow_email_id The unique id for the Automation workflow email.
|
317
|
-
# @param [Hash] opts the optional parameters
|
318
|
-
# @return [InlineResponse2004]
|
319
|
-
def get_workflow_email_subscriber_queue(workflow_id = {}, workflow_email_id = {}, opts = {})
|
320
|
-
data, _status_code, _headers = get_workflow_email_subscriber_queue_with_http_info(workflow_id, workflow_email_id, opts)
|
321
|
-
data
|
322
|
-
end
|
323
130
|
|
324
131
|
# List automated email subscribers
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
# @param [Hash] opts the optional parameters
|
329
|
-
# @return [Array<(InlineResponse2004, Fixnum, Hash)>] InlineResponse2004 data, response status code and response headers
|
330
|
-
def get_workflow_email_subscriber_queue_with_http_info(workflow_id, workflow_email_id, opts = {})
|
331
|
-
# resource path
|
332
|
-
local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}/queue'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
|
132
|
+
def get_workflow_email_subscriber_queue(workflow_id, workflow_email_id, opts = {})
|
133
|
+
fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
|
134
|
+
fail ArgumentError, "Missing required param: 'workflow_email_id'" if workflow_email_id.nil?
|
333
135
|
|
334
|
-
# query parameters
|
335
136
|
query_params = {}
|
336
|
-
|
337
|
-
# header parameters
|
338
|
-
header_params = {}
|
339
|
-
# HTTP header 'Accept' (if needed)
|
340
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
341
|
-
# HTTP header 'Content-Type'
|
342
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
343
|
-
|
344
|
-
# form parameters
|
345
137
|
form_params = {}
|
346
|
-
|
347
|
-
# http body (model)
|
348
138
|
post_body = nil
|
349
|
-
|
139
|
+
|
140
|
+
local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}/queue'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
|
350
141
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
351
|
-
:header_params => header_params,
|
352
142
|
:query_params => query_params,
|
353
143
|
:form_params => form_params,
|
354
|
-
:body => post_body
|
355
|
-
:auth_names => auth_names,
|
356
|
-
:return_type => 'InlineResponse2004')
|
144
|
+
:body => post_body)
|
357
145
|
return data, status_code, headers
|
358
146
|
end
|
359
|
-
# Get automated email subscriber
|
360
|
-
# Get information about a specific subscriber in an Automation email queue.
|
361
|
-
# @param workflow_id The unique id for the Automation workflow.
|
362
|
-
# @param workflow_email_id The unique id for the Automation workflow email.
|
363
|
-
# @param subscriber_hash The MD5 hash of the lowercase version of the list member's email address.
|
364
|
-
# @param [Hash] opts the optional parameters
|
365
|
-
# @return [SubscriberInAutomationQueue2]
|
366
|
-
def get_workflow_email_subscriber(workflow_id = {}, workflow_email_id = {}, subscriber_hash = {}, opts = {})
|
367
|
-
data, _status_code, _headers = get_workflow_email_subscriber_with_http_info(workflow_id, workflow_email_id, subscriber_hash, opts)
|
368
|
-
data
|
369
|
-
end
|
370
147
|
|
371
148
|
# Get automated email subscriber
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
# @param [Hash] opts the optional parameters
|
377
|
-
# @return [Array<(SubscriberInAutomationQueue2, Fixnum, Hash)>] SubscriberInAutomationQueue2 data, response status code and response headers
|
378
|
-
def get_workflow_email_subscriber_with_http_info(workflow_id, workflow_email_id, subscriber_hash, opts = {})
|
379
|
-
# resource path
|
380
|
-
local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}/queue/{subscriber_hash}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
149
|
+
def get_workflow_email_subscriber(workflow_id, workflow_email_id, subscriber_hash, opts = {})
|
150
|
+
fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
|
151
|
+
fail ArgumentError, "Missing required param: 'workflow_email_id'" if workflow_email_id.nil?
|
152
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
381
153
|
|
382
|
-
# query parameters
|
383
154
|
query_params = {}
|
384
|
-
|
385
|
-
# header parameters
|
386
|
-
header_params = {}
|
387
|
-
# HTTP header 'Accept' (if needed)
|
388
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
389
|
-
# HTTP header 'Content-Type'
|
390
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
391
|
-
|
392
|
-
# form parameters
|
393
155
|
form_params = {}
|
394
|
-
|
395
|
-
# http body (model)
|
396
156
|
post_body = nil
|
397
|
-
|
157
|
+
|
158
|
+
local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}/queue/{subscriber_hash}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
398
159
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
399
|
-
:header_params => header_params,
|
400
160
|
:query_params => query_params,
|
401
161
|
:form_params => form_params,
|
402
|
-
:body => post_body
|
403
|
-
:auth_names => auth_names,
|
404
|
-
:return_type => 'SubscriberInAutomationQueue2')
|
162
|
+
:body => post_body)
|
405
163
|
return data, status_code, headers
|
406
164
|
end
|
407
|
-
# List subscribers removed from workflow
|
408
|
-
# Get information about subscribers who were removed from an Automation workflow.
|
409
|
-
# @param workflow_id The unique id for the Automation workflow.
|
410
|
-
# @param [Hash] opts the optional parameters
|
411
|
-
# @return [RemovedSubscribers]
|
412
|
-
def list_workflow_email_subscribers_removed(workflow_id = {}, opts = {})
|
413
|
-
data, _status_code, _headers = list_workflow_email_subscribers_removed_with_http_info(workflow_id, opts)
|
414
|
-
data
|
415
|
-
end
|
416
165
|
|
417
166
|
# List subscribers removed from workflow
|
418
|
-
|
419
|
-
|
420
|
-
# @param [Hash] opts the optional parameters
|
421
|
-
# @return [Array<(RemovedSubscribers, Fixnum, Hash)>] RemovedSubscribers data, response status code and response headers
|
422
|
-
def list_workflow_email_subscribers_removed_with_http_info(workflow_id, opts = {})
|
423
|
-
# resource path
|
424
|
-
local_var_path = '/automations/{workflow_id}/removed-subscribers'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
|
167
|
+
def list_workflow_email_subscribers_removed(workflow_id, opts = {})
|
168
|
+
fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
|
425
169
|
|
426
|
-
# query parameters
|
427
170
|
query_params = {}
|
428
|
-
|
429
|
-
# header parameters
|
430
|
-
header_params = {}
|
431
|
-
# HTTP header 'Accept' (if needed)
|
432
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
433
|
-
# HTTP header 'Content-Type'
|
434
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
435
|
-
|
436
|
-
# form parameters
|
437
171
|
form_params = {}
|
438
|
-
|
439
|
-
# http body (model)
|
440
172
|
post_body = nil
|
441
|
-
|
173
|
+
|
174
|
+
local_var_path = '/automations/{workflow_id}/removed-subscribers'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
|
442
175
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
443
|
-
:header_params => header_params,
|
444
176
|
:query_params => query_params,
|
445
177
|
:form_params => form_params,
|
446
|
-
:body => post_body
|
447
|
-
:auth_names => auth_names,
|
448
|
-
:return_type => 'RemovedSubscribers')
|
178
|
+
:body => post_body)
|
449
179
|
return data, status_code, headers
|
450
180
|
end
|
451
|
-
# Get subscriber removed from workflow
|
452
|
-
# Get information about a specific subscriber who was removed from an Automation workflow.
|
453
|
-
# @param workflow_id The unique id for the Automation workflow.
|
454
|
-
# @param subscriber_hash The MD5 hash of the lowercase version of the list member's email address.
|
455
|
-
# @param [Hash] opts the optional parameters
|
456
|
-
# @return [SubscriberRemovedFromAutomationWorkflow]
|
457
|
-
def get_removed_workflow_email_subscriber(workflow_id = {}, subscriber_hash = {}, opts = {})
|
458
|
-
data, _status_code, _headers = get_removed_workflow_email_subscriber_with_http_info(workflow_id, subscriber_hash, opts)
|
459
|
-
data
|
460
|
-
end
|
461
181
|
|
462
182
|
# Get subscriber removed from workflow
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
# @param [Hash] opts the optional parameters
|
467
|
-
# @return [Array<(SubscriberRemovedFromAutomationWorkflow, Fixnum, Hash)>] SubscriberRemovedFromAutomationWorkflow data, response status code and response headers
|
468
|
-
def get_removed_workflow_email_subscriber_with_http_info(workflow_id, subscriber_hash, opts = {})
|
469
|
-
# resource path
|
470
|
-
local_var_path = '/automations/{workflow_id}/removed-subscribers/{subscriber_hash}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
183
|
+
def get_removed_workflow_email_subscriber(workflow_id, subscriber_hash, opts = {})
|
184
|
+
fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
|
185
|
+
fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil?
|
471
186
|
|
472
|
-
# query parameters
|
473
187
|
query_params = {}
|
474
|
-
|
475
|
-
# header parameters
|
476
|
-
header_params = {}
|
477
|
-
# HTTP header 'Accept' (if needed)
|
478
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
479
|
-
# HTTP header 'Content-Type'
|
480
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
481
|
-
|
482
|
-
# form parameters
|
483
188
|
form_params = {}
|
484
|
-
|
485
|
-
# http body (model)
|
486
189
|
post_body = nil
|
487
|
-
|
190
|
+
|
191
|
+
local_var_path = '/automations/{workflow_id}/removed-subscribers/{subscriber_hash}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s)
|
488
192
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
489
|
-
:header_params => header_params,
|
490
193
|
:query_params => query_params,
|
491
194
|
:form_params => form_params,
|
492
|
-
:body => post_body
|
493
|
-
:auth_names => auth_names,
|
494
|
-
:return_type => 'SubscriberRemovedFromAutomationWorkflow')
|
195
|
+
:body => post_body)
|
495
196
|
return data, status_code, headers
|
496
197
|
end
|
497
|
-
# Update workflow email
|
498
|
-
# Update settings for a Automation workflow email
|
499
|
-
# @param workflow_id The unique id for the Automation workflow.
|
500
|
-
# @param workflow_email_id The unique id for the Automation workflow email.
|
501
|
-
# @param body
|
502
|
-
# @param [Hash] opts the optional parameters
|
503
|
-
# @return [AutomationWorkflowEmail]
|
504
|
-
def update_workflow_email(workflow_id = {}, workflow_email_id = {}, body = {}, opts = {})
|
505
|
-
data, _status_code, _headers = update_workflow_email_with_http_info(workflow_id, workflow_email_id, body, opts)
|
506
|
-
data
|
507
|
-
end
|
508
198
|
|
509
199
|
# Update workflow email
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
# @param [Hash] opts the optional parameters
|
515
|
-
# @return [Array<(AutomationWorkflowEmail, Fixnum, Hash)>] AutomationWorkflowEmail data, response status code and response headers
|
516
|
-
def update_workflow_email_with_http_info(workflow_id, workflow_email_id, body, opts = {})
|
517
|
-
# resource path
|
518
|
-
local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
|
200
|
+
def update_workflow_email(workflow_id, workflow_email_id, body, opts = {})
|
201
|
+
fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
|
202
|
+
fail ArgumentError, "Missing required param: 'workflow_email_id'" if workflow_email_id.nil?
|
203
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
519
204
|
|
520
|
-
# query parameters
|
521
205
|
query_params = {}
|
522
|
-
|
523
|
-
# header parameters
|
524
|
-
header_params = {}
|
525
|
-
# HTTP header 'Accept' (if needed)
|
526
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
527
|
-
# HTTP header 'Content-Type'
|
528
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
529
|
-
|
530
|
-
# form parameters
|
531
206
|
form_params = {}
|
532
|
-
|
533
|
-
# http body (model)
|
534
207
|
post_body = @api_client.object_to_http_body(body)
|
535
|
-
|
208
|
+
|
209
|
+
local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
|
536
210
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
537
|
-
:header_params => header_params,
|
538
211
|
:query_params => query_params,
|
539
212
|
:form_params => form_params,
|
540
|
-
:body => post_body
|
541
|
-
:auth_names => auth_names,
|
542
|
-
:return_type => 'AutomationWorkflowEmail')
|
213
|
+
:body => post_body)
|
543
214
|
return data, status_code, headers
|
544
215
|
end
|
545
|
-
# Update automation
|
546
|
-
# Update some or all of the settings for a Automation
|
547
|
-
# @param workflow_id The unique id for the Automation workflow.
|
548
|
-
# @param body
|
549
|
-
# @param [Hash] opts the optional parameters
|
550
|
-
# @return [AutomationWorkflow]
|
551
|
-
def update(workflow_id = {}, body = {}, opts = {})
|
552
|
-
data, _status_code, _headers = update_with_http_info(workflow_id, body, opts)
|
553
|
-
data
|
554
|
-
end
|
555
216
|
|
556
217
|
# Update automation
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
# @param [Hash] opts the optional parameters
|
561
|
-
# @return [Array<(AutomationWorkflow, Fixnum, Hash)>] AutomationWorkflow data, response status code and response headers
|
562
|
-
def update_with_http_info(workflow_id, body, opts = {})
|
563
|
-
# resource path
|
564
|
-
local_var_path = '/automations/{workflow_id}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
|
218
|
+
def update(workflow_id, body, opts = {})
|
219
|
+
fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
|
220
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
565
221
|
|
566
|
-
# query parameters
|
567
222
|
query_params = {}
|
568
|
-
|
569
|
-
# header parameters
|
570
|
-
header_params = {}
|
571
|
-
# HTTP header 'Accept' (if needed)
|
572
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
573
|
-
# HTTP header 'Content-Type'
|
574
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
575
|
-
|
576
|
-
# form parameters
|
577
223
|
form_params = {}
|
578
|
-
|
579
|
-
# http body (model)
|
580
224
|
post_body = @api_client.object_to_http_body(body)
|
581
|
-
|
225
|
+
|
226
|
+
local_var_path = '/automations/{workflow_id}'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
|
582
227
|
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
|
583
|
-
:header_params => header_params,
|
584
228
|
:query_params => query_params,
|
585
229
|
:form_params => form_params,
|
586
|
-
:body => post_body
|
587
|
-
:auth_names => auth_names,
|
588
|
-
:return_type => 'AutomationWorkflow')
|
230
|
+
:body => post_body)
|
589
231
|
return data, status_code, headers
|
590
232
|
end
|
591
|
-
# Add automation
|
592
|
-
# Create a new Automation in your Mailchimp account.
|
593
|
-
# @param body
|
594
|
-
# @param [Hash] opts the optional parameters
|
595
|
-
# @return [AutomationWorkflow]
|
596
|
-
def create(body = {}, opts = {})
|
597
|
-
data, _status_code, _headers = create_with_http_info(body, opts)
|
598
|
-
data
|
599
|
-
end
|
600
233
|
|
601
234
|
# Add automation
|
602
|
-
|
603
|
-
|
604
|
-
# @param [Hash] opts the optional parameters
|
605
|
-
# @return [Array<(AutomationWorkflow, Fixnum, Hash)>] AutomationWorkflow data, response status code and response headers
|
606
|
-
def create_with_http_info(body, opts = {})
|
607
|
-
# resource path
|
608
|
-
local_var_path = '/automations'
|
235
|
+
def create(body, opts = {})
|
236
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
609
237
|
|
610
|
-
# query parameters
|
611
238
|
query_params = {}
|
612
|
-
|
613
|
-
# header parameters
|
614
|
-
header_params = {}
|
615
|
-
# HTTP header 'Accept' (if needed)
|
616
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
617
|
-
# HTTP header 'Content-Type'
|
618
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
619
|
-
|
620
|
-
# form parameters
|
621
239
|
form_params = {}
|
622
|
-
|
623
|
-
# http body (model)
|
624
240
|
post_body = @api_client.object_to_http_body(body)
|
625
|
-
|
241
|
+
|
242
|
+
local_var_path = '/automations'
|
626
243
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
627
|
-
:header_params => header_params,
|
628
244
|
:query_params => query_params,
|
629
245
|
:form_params => form_params,
|
630
|
-
:body => post_body
|
631
|
-
:auth_names => auth_names,
|
632
|
-
:return_type => 'AutomationWorkflow')
|
246
|
+
:body => post_body)
|
633
247
|
return data, status_code, headers
|
634
248
|
end
|
635
|
-
# Pause automation emails
|
636
|
-
# Pause all emails in a specific Automation workflow.
|
637
|
-
# @param workflow_id The unique id for the Automation workflow.
|
638
|
-
# @param [Hash] opts the optional parameters
|
639
|
-
# @return [nil]
|
640
|
-
def pause_all_emails(workflow_id = {}, opts = {})
|
641
|
-
pause_all_emails_with_http_info(workflow_id, opts)
|
642
|
-
nil
|
643
|
-
end
|
644
249
|
|
645
250
|
# Pause automation emails
|
646
|
-
|
647
|
-
|
648
|
-
# @param [Hash] opts the optional parameters
|
649
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
650
|
-
def pause_all_emails_with_http_info(workflow_id, opts = {})
|
651
|
-
# resource path
|
652
|
-
local_var_path = '/automations/{workflow_id}/actions/pause-all-emails'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
|
251
|
+
def pause_all_emails(workflow_id, opts = {})
|
252
|
+
fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
|
653
253
|
|
654
|
-
# query parameters
|
655
254
|
query_params = {}
|
656
|
-
|
657
|
-
# header parameters
|
658
|
-
header_params = {}
|
659
|
-
# HTTP header 'Accept' (if needed)
|
660
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
661
|
-
# HTTP header 'Content-Type'
|
662
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
663
|
-
|
664
|
-
# form parameters
|
665
255
|
form_params = {}
|
666
|
-
|
667
|
-
# http body (model)
|
668
256
|
post_body = nil
|
669
|
-
|
257
|
+
|
258
|
+
local_var_path = '/automations/{workflow_id}/actions/pause-all-emails'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
|
670
259
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
671
|
-
:header_params => header_params,
|
672
260
|
:query_params => query_params,
|
673
261
|
:form_params => form_params,
|
674
|
-
:body => post_body
|
675
|
-
:auth_names => auth_names)
|
262
|
+
:body => post_body)
|
676
263
|
return data, status_code, headers
|
677
264
|
end
|
678
|
-
# Start automation emails
|
679
|
-
# Start all emails in an Automation workflow.
|
680
|
-
# @param workflow_id The unique id for the Automation workflow.
|
681
|
-
# @param [Hash] opts the optional parameters
|
682
|
-
# @return [nil]
|
683
|
-
def start_all_emails(workflow_id = {}, opts = {})
|
684
|
-
start_all_emails_with_http_info(workflow_id, opts)
|
685
|
-
nil
|
686
|
-
end
|
687
265
|
|
688
266
|
# Start automation emails
|
689
|
-
|
690
|
-
|
691
|
-
# @param [Hash] opts the optional parameters
|
692
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
693
|
-
def start_all_emails_with_http_info(workflow_id, opts = {})
|
694
|
-
# resource path
|
695
|
-
local_var_path = '/automations/{workflow_id}/actions/start-all-emails'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
|
267
|
+
def start_all_emails(workflow_id, opts = {})
|
268
|
+
fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
|
696
269
|
|
697
|
-
# query parameters
|
698
270
|
query_params = {}
|
699
|
-
|
700
|
-
# header parameters
|
701
|
-
header_params = {}
|
702
|
-
# HTTP header 'Accept' (if needed)
|
703
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
704
|
-
# HTTP header 'Content-Type'
|
705
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
706
|
-
|
707
|
-
# form parameters
|
708
271
|
form_params = {}
|
709
|
-
|
710
|
-
# http body (model)
|
711
272
|
post_body = nil
|
712
|
-
|
273
|
+
|
274
|
+
local_var_path = '/automations/{workflow_id}/actions/start-all-emails'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
|
713
275
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
714
|
-
:header_params => header_params,
|
715
276
|
:query_params => query_params,
|
716
277
|
:form_params => form_params,
|
717
|
-
:body => post_body
|
718
|
-
:auth_names => auth_names)
|
278
|
+
:body => post_body)
|
719
279
|
return data, status_code, headers
|
720
280
|
end
|
721
|
-
# Pause automated email
|
722
|
-
# Pause an automated email.
|
723
|
-
# @param workflow_id The unique id for the Automation workflow.
|
724
|
-
# @param workflow_email_id The unique id for the Automation workflow email.
|
725
|
-
# @param [Hash] opts the optional parameters
|
726
|
-
# @return [nil]
|
727
|
-
def pause_workflow_email(workflow_id = {}, workflow_email_id = {}, opts = {})
|
728
|
-
pause_workflow_email_with_http_info(workflow_id, workflow_email_id, opts)
|
729
|
-
nil
|
730
|
-
end
|
731
281
|
|
732
282
|
# Pause automated email
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
# @param [Hash] opts the optional parameters
|
737
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
738
|
-
def pause_workflow_email_with_http_info(workflow_id, workflow_email_id, opts = {})
|
739
|
-
# resource path
|
740
|
-
local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}/actions/pause'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
|
283
|
+
def pause_workflow_email(workflow_id, workflow_email_id, opts = {})
|
284
|
+
fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
|
285
|
+
fail ArgumentError, "Missing required param: 'workflow_email_id'" if workflow_email_id.nil?
|
741
286
|
|
742
|
-
# query parameters
|
743
287
|
query_params = {}
|
744
|
-
|
745
|
-
# header parameters
|
746
|
-
header_params = {}
|
747
|
-
# HTTP header 'Accept' (if needed)
|
748
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
749
|
-
# HTTP header 'Content-Type'
|
750
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
751
|
-
|
752
|
-
# form parameters
|
753
288
|
form_params = {}
|
754
|
-
|
755
|
-
# http body (model)
|
756
289
|
post_body = nil
|
757
|
-
|
290
|
+
|
291
|
+
local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}/actions/pause'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
|
758
292
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
759
|
-
:header_params => header_params,
|
760
293
|
:query_params => query_params,
|
761
294
|
:form_params => form_params,
|
762
|
-
:body => post_body
|
763
|
-
:auth_names => auth_names)
|
295
|
+
:body => post_body)
|
764
296
|
return data, status_code, headers
|
765
297
|
end
|
766
|
-
# Start automated email
|
767
|
-
# Start an automated email.
|
768
|
-
# @param workflow_id The unique id for the Automation workflow.
|
769
|
-
# @param workflow_email_id The unique id for the Automation workflow email.
|
770
|
-
# @param [Hash] opts the optional parameters
|
771
|
-
# @return [nil]
|
772
|
-
def start_workflow_email(workflow_id = {}, workflow_email_id = {}, opts = {})
|
773
|
-
start_workflow_email_with_http_info(workflow_id, workflow_email_id, opts)
|
774
|
-
nil
|
775
|
-
end
|
776
298
|
|
777
299
|
# Start automated email
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
# @param [Hash] opts the optional parameters
|
782
|
-
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
783
|
-
def start_workflow_email_with_http_info(workflow_id, workflow_email_id, opts = {})
|
784
|
-
# resource path
|
785
|
-
local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}/actions/start'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
|
300
|
+
def start_workflow_email(workflow_id, workflow_email_id, opts = {})
|
301
|
+
fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
|
302
|
+
fail ArgumentError, "Missing required param: 'workflow_email_id'" if workflow_email_id.nil?
|
786
303
|
|
787
|
-
# query parameters
|
788
304
|
query_params = {}
|
789
|
-
|
790
|
-
# header parameters
|
791
|
-
header_params = {}
|
792
|
-
# HTTP header 'Accept' (if needed)
|
793
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
794
|
-
# HTTP header 'Content-Type'
|
795
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
796
|
-
|
797
|
-
# form parameters
|
798
305
|
form_params = {}
|
799
|
-
|
800
|
-
# http body (model)
|
801
306
|
post_body = nil
|
802
|
-
|
307
|
+
|
308
|
+
local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}/actions/start'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
|
803
309
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
804
|
-
:header_params => header_params,
|
805
310
|
:query_params => query_params,
|
806
311
|
:form_params => form_params,
|
807
|
-
:body => post_body
|
808
|
-
:auth_names => auth_names)
|
312
|
+
:body => post_body)
|
809
313
|
return data, status_code, headers
|
810
314
|
end
|
811
|
-
# Add subscriber to workflow email
|
812
|
-
# Manually add a subscriber to a workflow, bypassing the default trigger settings. You can also use this endpoint to trigger a series of automated emails in an API 3.0 workflow type.
|
813
|
-
# @param workflow_id The unique id for the Automation workflow.
|
814
|
-
# @param workflow_email_id The unique id for the Automation workflow email.
|
815
|
-
# @param body
|
816
|
-
# @param [Hash] opts the optional parameters
|
817
|
-
# @return [SubscriberInAutomationQueue2]
|
818
|
-
def add_workflow_email_subscriber(workflow_id = {}, workflow_email_id = {}, body = {}, opts = {})
|
819
|
-
data, _status_code, _headers = add_workflow_email_subscriber_with_http_info(workflow_id, workflow_email_id, body, opts)
|
820
|
-
data
|
821
|
-
end
|
822
315
|
|
823
316
|
# Add subscriber to workflow email
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
# @param [Hash] opts the optional parameters
|
829
|
-
# @return [Array<(SubscriberInAutomationQueue2, Fixnum, Hash)>] SubscriberInAutomationQueue2 data, response status code and response headers
|
830
|
-
def add_workflow_email_subscriber_with_http_info(workflow_id, workflow_email_id, body, opts = {})
|
831
|
-
# resource path
|
832
|
-
local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}/queue'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
|
317
|
+
def add_workflow_email_subscriber(workflow_id, workflow_email_id, body, opts = {})
|
318
|
+
fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
|
319
|
+
fail ArgumentError, "Missing required param: 'workflow_email_id'" if workflow_email_id.nil?
|
320
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
833
321
|
|
834
|
-
# query parameters
|
835
322
|
query_params = {}
|
836
|
-
|
837
|
-
# header parameters
|
838
|
-
header_params = {}
|
839
|
-
# HTTP header 'Accept' (if needed)
|
840
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
841
|
-
# HTTP header 'Content-Type'
|
842
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
843
|
-
|
844
|
-
# form parameters
|
845
323
|
form_params = {}
|
846
|
-
|
847
|
-
# http body (model)
|
848
324
|
post_body = @api_client.object_to_http_body(body)
|
849
|
-
|
325
|
+
|
326
|
+
local_var_path = '/automations/{workflow_id}/emails/{workflow_email_id}/queue'.sub('{' + 'workflow_id' + '}', workflow_id.to_s).sub('{' + 'workflow_email_id' + '}', workflow_email_id.to_s)
|
850
327
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
851
|
-
:header_params => header_params,
|
852
328
|
:query_params => query_params,
|
853
329
|
:form_params => form_params,
|
854
|
-
:body => post_body
|
855
|
-
:auth_names => auth_names,
|
856
|
-
:return_type => 'SubscriberInAutomationQueue2')
|
330
|
+
:body => post_body)
|
857
331
|
return data, status_code, headers
|
858
332
|
end
|
859
|
-
# Remove subscriber from workflow
|
860
|
-
# Remove a subscriber from a specific Automation workflow. You can remove a subscriber at any point in an Automation workflow, regardless of how many emails they've been sent from that workflow. Once they're removed, they can never be added back to the same workflow.
|
861
|
-
# @param workflow_id The unique id for the Automation workflow.
|
862
|
-
# @param body
|
863
|
-
# @param [Hash] opts the optional parameters
|
864
|
-
# @return [SubscriberRemovedFromAutomationWorkflow]
|
865
|
-
def remove_workflow_email_subscriber(workflow_id = {}, body = {}, opts = {})
|
866
|
-
data, _status_code, _headers = remove_workflow_email_subscriber_with_http_info(workflow_id, body, opts)
|
867
|
-
data
|
868
|
-
end
|
869
333
|
|
870
334
|
# Remove subscriber from workflow
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
# @param [Hash] opts the optional parameters
|
875
|
-
# @return [Array<(SubscriberRemovedFromAutomationWorkflow, Fixnum, Hash)>] SubscriberRemovedFromAutomationWorkflow data, response status code and response headers
|
876
|
-
def remove_workflow_email_subscriber_with_http_info(workflow_id, body, opts = {})
|
877
|
-
# resource path
|
878
|
-
local_var_path = '/automations/{workflow_id}/removed-subscribers'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
|
335
|
+
def remove_workflow_email_subscriber(workflow_id, body, opts = {})
|
336
|
+
fail ArgumentError, "Missing required param: 'workflow_id'" if workflow_id.nil?
|
337
|
+
fail ArgumentError, "Missing required param: 'body'" if body.nil?
|
879
338
|
|
880
|
-
# query parameters
|
881
339
|
query_params = {}
|
882
|
-
|
883
|
-
# header parameters
|
884
|
-
header_params = {}
|
885
|
-
# HTTP header 'Accept' (if needed)
|
886
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/problem+json'])
|
887
|
-
# HTTP header 'Content-Type'
|
888
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
889
|
-
|
890
|
-
# form parameters
|
891
340
|
form_params = {}
|
892
|
-
|
893
|
-
# http body (model)
|
894
341
|
post_body = @api_client.object_to_http_body(body)
|
895
|
-
|
342
|
+
|
343
|
+
local_var_path = '/automations/{workflow_id}/removed-subscribers'.sub('{' + 'workflow_id' + '}', workflow_id.to_s)
|
896
344
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
897
|
-
:header_params => header_params,
|
898
345
|
:query_params => query_params,
|
899
346
|
:form_params => form_params,
|
900
|
-
:body => post_body
|
901
|
-
:auth_names => auth_names,
|
902
|
-
:return_type => 'SubscriberRemovedFromAutomationWorkflow')
|
347
|
+
:body => post_body)
|
903
348
|
return data, status_code, headers
|
904
349
|
end
|
905
350
|
end
|