Class: MailchimpMarketing::ListsApi
- Inherits:
-
Object
- Object
- MailchimpMarketing::ListsApi
- Defined in:
- lib/MailchimpMarketing/api/lists_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#add_list_member(list_id, body, opts = {}) ⇒ Object
Add member to list.
-
#add_list_merge_field(list_id, body, opts = {}) ⇒ Object
Add merge field.
-
#batch_list_members(list_id, body, opts = {}) ⇒ Object
Batch subscribe or unsubscribe.
-
#batch_segment_members(body, list_id, segment_id, opts = {}) ⇒ Object
Batch add or remove members.
-
#create_interest_category_interest(list_id, interest_category_id, body, opts = {}) ⇒ Object
Add interest in category.
-
#create_list(body, opts = {}) ⇒ Object
Add list.
-
#create_list_interest_category(list_id, body, opts = {}) ⇒ Object
Add interest category.
-
#create_list_member_event(list_id, subscriber_hash, body, opts = {}) ⇒ Object
Add event.
-
#create_list_member_note(list_id, subscriber_hash, body, opts = {}) ⇒ Object
Add member note.
-
#create_list_webhook(list_id, body, opts = {}) ⇒ Object
Add webhook.
-
#create_segment(list_id, body, opts = {}) ⇒ Object
Add segment.
-
#create_segment_member(list_id, segment_id, body, opts = {}) ⇒ Object
Add member to segment.
-
#delete_interest_category(list_id, interest_category_id, opts = {}) ⇒ Object
Delete interest category.
-
#delete_interest_category_interest(list_id, interest_category_id, interest_id, opts = {}) ⇒ Object
Delete interest in category.
-
#delete_list(list_id, opts = {}) ⇒ Object
Delete list.
-
#delete_list_member(list_id, subscriber_hash, opts = {}) ⇒ Object
Archive list member.
-
#delete_list_member_note(list_id, subscriber_hash, note_id, opts = {}) ⇒ Object
Delete note.
-
#delete_list_member_permanent(list_id, subscriber_hash, opts = {}) ⇒ Object
Delete list member.
-
#delete_list_merge_field(list_id, merge_id, opts = {}) ⇒ Object
Delete merge field.
-
#delete_list_webhook(list_id, webhook_id, opts = {}) ⇒ Object
Delete webhook.
-
#delete_segment(list_id, segment_id, opts = {}) ⇒ Object
Delete segment.
-
#get_all_lists(opts = {}) ⇒ Object
Get lists info.
-
#get_interest_category(list_id, interest_category_id, opts = {}) ⇒ Object
Get interest category info.
-
#get_interest_category_interest(list_id, interest_category_id, interest_id, opts = {}) ⇒ Object
Get interest in category.
-
#get_list(list_id, opts = {}) ⇒ Object
Get list info.
-
#get_list_abuse_report_details(list_id, report_id, opts = {}) ⇒ Object
Get abuse report.
-
#get_list_abuse_reports(list_id, opts = {}) ⇒ Object
List abuse reports.
-
#get_list_clients(list_id, opts = {}) ⇒ Object
List top email clients.
-
#get_list_growth_history(list_id, opts = {}) ⇒ Object
List growth history data.
-
#get_list_growth_history_by_month(list_id, month, opts = {}) ⇒ Object
Get growth history by month.
-
#get_list_interest_categories(list_id, opts = {}) ⇒ Object
List interest categories.
-
#get_list_locations(list_id, opts = {}) ⇒ Object
List locations.
-
#get_list_member(list_id, subscriber_hash, opts = {}) ⇒ Object
Get member info.
-
#get_list_member_activity(list_id, subscriber_hash, opts = {}) ⇒ Object
View recent activity 50.
-
#get_list_member_activity_feed(list_id, subscriber_hash, opts = {}) ⇒ Object
View recent activity.
-
#get_list_member_events(list_id, subscriber_hash, opts = {}) ⇒ Object
List member events.
-
#get_list_member_note(list_id, subscriber_hash, note_id, opts = {}) ⇒ Object
Get member note.
-
#get_list_member_notes(list_id, subscriber_hash, opts = {}) ⇒ Object
List recent member notes.
-
#get_list_member_tags(list_id, subscriber_hash, opts = {}) ⇒ Object
List member tags.
-
#get_list_members_info(list_id, opts = {}) ⇒ Object
List members info.
-
#get_list_merge_field(list_id, merge_id, opts = {}) ⇒ Object
Get merge field.
-
#get_list_merge_fields(list_id, opts = {}) ⇒ Object
List merge fields.
-
#get_list_recent_activity(list_id, opts = {}) ⇒ Object
List recent activity.
-
#get_list_signup_forms(list_id, opts = {}) ⇒ Object
List signup forms.
-
#get_list_webhook(list_id, webhook_id, opts = {}) ⇒ Object
Get webhook info.
-
#get_list_webhooks(list_id, opts = {}) ⇒ Object
List webhooks.
-
#get_segment(list_id, segment_id, opts = {}) ⇒ Object
Get segment info.
-
#get_segment_members_list(list_id, segment_id, opts = {}) ⇒ Object
List members in segment.
-
#getListMemberGoals(list_id, subscriber_hash, opts = {}) ⇒ Object
List member goal events.
-
#initialize(api_client) ⇒ ListsApi
constructor
A new instance of ListsApi.
-
#list_interest_category_interests(list_id, interest_category_id, opts = {}) ⇒ Object
List interests in category.
-
#list_segments(list_id, opts = {}) ⇒ Object
List segments.
-
#remove_segment_member(list_id, segment_id, subscriber_hash, opts = {}) ⇒ Object
Remove list member from segment.
-
#set_list_member(list_id, subscriber_hash, body, opts = {}) ⇒ Object
Add or update list member.
-
#tag_search(list_id, opts = {}) ⇒ Object
Search for tags on a list by name.
-
#update_interest_category(list_id, interest_category_id, body, opts = {}) ⇒ Object
Update interest category.
-
#update_interest_category_interest(list_id, interest_category_id, interest_id, body, opts = {}) ⇒ Object
Update interest in category.
-
#update_list(list_id, body, opts = {}) ⇒ Object
Update lists.
-
#update_list_member(list_id, subscriber_hash, body, opts = {}) ⇒ Object
Update list member.
-
#update_list_member_note(list_id, subscriber_hash, note_id, body, opts = {}) ⇒ Object
Update note.
-
#update_list_member_tags(list_id, subscriber_hash, body, opts = {}) ⇒ Object
Add or remove member tags.
-
#update_list_merge_field(list_id, merge_id, body, opts = {}) ⇒ Object
Update merge field.
-
#update_list_signup_form(list_id, body, opts = {}) ⇒ Object
Customize signup form.
-
#update_list_webhook(list_id, webhook_id, body, opts = {}) ⇒ Object
Update webhook.
-
#update_segment(list_id, segment_id, body, opts = {}) ⇒ Object
Update segment.
Constructor Details
#initialize(api_client) ⇒ ListsApi
Returns a new instance of ListsApi.
19 20 21 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 19 def initialize(api_client) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#add_list_member(list_id, body, opts = {}) ⇒ Object
Add member to list
953 954 955 956 957 958 959 960 961 962 963 964 965 966 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 953 def add_list_member(list_id, body, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} query_params[:'skip_merge_validation'] = opts[:'skip_merge_validation'] if !opts[:'skip_merge_validation'].nil? post_body = @api_client.object_to_http_body(body) local_var_path = '/lists/{list_id}/members'.sub('{' + 'list_id' + '}', list_id.to_s) data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#add_list_merge_field(list_id, body, opts = {}) ⇒ Object
Add merge field
1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 1000 def add_list_merge_field(list_id, body, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/lists/{list_id}/merge-fields'.sub('{' + 'list_id' + '}', list_id.to_s) data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#batch_list_members(list_id, body, opts = {}) ⇒ Object
Batch subscribe or unsubscribe
905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 905 def batch_list_members(list_id, body, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} query_params[:'skip_merge_validation'] = opts[:'skip_merge_validation'] if !opts[:'skip_merge_validation'].nil? query_params[:'skip_duplicate_check'] = opts[:'skip_duplicate_check'] if !opts[:'skip_duplicate_check'].nil? post_body = @api_client.object_to_http_body(body) local_var_path = '/lists/{list_id}'.sub('{' + 'list_id' + '}', list_id.to_s) data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#batch_segment_members(body, list_id, segment_id, opts = {}) ⇒ Object
Batch add or remove members
1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 1030 def batch_segment_members(body, list_id, segment_id, opts = {}) fail ArgumentError, "Missing required param: 'body'" if body.nil? fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/lists/{list_id}/segments/{segment_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s) data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#create_interest_category_interest(list_id, interest_category_id, body, opts = {}) ⇒ Object
Add interest in category
937 938 939 940 941 942 943 944 945 946 947 948 949 950 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 937 def create_interest_category_interest(list_id, interest_category_id, body, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}/interests'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s) data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#create_list(body, opts = {}) ⇒ Object
Add list
891 892 893 894 895 896 897 898 899 900 901 902 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 891 def create_list(body, opts = {}) fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/lists' data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#create_list_interest_category(list_id, body, opts = {}) ⇒ Object
Add interest category
922 923 924 925 926 927 928 929 930 931 932 933 934 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 922 def create_list_interest_category(list_id, body, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/lists/{list_id}/interest-categories'.sub('{' + 'list_id' + '}', list_id.to_s) data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#create_list_member_event(list_id, subscriber_hash, body, opts = {}) ⇒ Object
Add event
859 860 861 862 863 864 865 866 867 868 869 870 871 872 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 859 def create_list_member_event(list_id, subscriber_hash, body, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/lists/{list_id}/members/{subscriber_hash}/events'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s) data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#create_list_member_note(list_id, subscriber_hash, body, opts = {}) ⇒ Object
Add member note
984 985 986 987 988 989 990 991 992 993 994 995 996 997 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 984 def create_list_member_note(list_id, subscriber_hash, body, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/lists/{list_id}/members/{subscriber_hash}/notes'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s) data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#create_list_webhook(list_id, body, opts = {}) ⇒ Object
Add webhook
1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 1077 def create_list_webhook(list_id, body, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/lists/{list_id}/webhooks'.sub('{' + 'list_id' + '}', list_id.to_s) data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#create_segment(list_id, body, opts = {}) ⇒ Object
Add segment
1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 1015 def create_segment(list_id, body, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/lists/{list_id}/segments'.sub('{' + 'list_id' + '}', list_id.to_s) data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#create_segment_member(list_id, segment_id, body, opts = {}) ⇒ Object
Add member to segment
1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 1046 def create_segment_member(list_id, segment_id, body, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/lists/{list_id}/segments/{segment_id}/members'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s) data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#delete_interest_category(list_id, interest_category_id, opts = {}) ⇒ Object
Delete interest category
38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 38 def delete_interest_category(list_id, interest_category_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil? query_params = {} post_body = nil local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s) data = @api_client.call_api(:DELETE, local_var_path, :query_params => query_params, :body => post_body) return data end |
#delete_interest_category_interest(list_id, interest_category_id, interest_id, opts = {}) ⇒ Object
Delete interest in category
53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 53 def delete_interest_category_interest(list_id, interest_category_id, interest_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil? fail ArgumentError, "Missing required param: 'interest_id'" if interest_id.nil? query_params = {} post_body = nil local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}/interests/{interest_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s).sub('{' + 'interest_id' + '}', interest_id.to_s) data = @api_client.call_api(:DELETE, local_var_path, :query_params => query_params, :body => post_body) return data end |
#delete_list(list_id, opts = {}) ⇒ Object
Delete list
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 24 def delete_list(list_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? query_params = {} post_body = nil local_var_path = '/lists/{list_id}'.sub('{' + 'list_id' + '}', list_id.to_s) data = @api_client.call_api(:DELETE, local_var_path, :query_params => query_params, :body => post_body) return data end |
#delete_list_member(list_id, subscriber_hash, opts = {}) ⇒ Object
Archive list member
69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 69 def delete_list_member(list_id, subscriber_hash, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil? query_params = {} post_body = nil local_var_path = '/lists/{list_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s) data = @api_client.call_api(:DELETE, local_var_path, :query_params => query_params, :body => post_body) return data end |
#delete_list_member_note(list_id, subscriber_hash, note_id, opts = {}) ⇒ Object
Delete note
84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 84 def delete_list_member_note(list_id, subscriber_hash, note_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil? fail ArgumentError, "Missing required param: 'note_id'" if note_id.nil? query_params = {} post_body = nil local_var_path = '/lists/{list_id}/members/{subscriber_hash}/notes/{note_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s).sub('{' + 'note_id' + '}', note_id.to_s) data = @api_client.call_api(:DELETE, local_var_path, :query_params => query_params, :body => post_body) return data end |
#delete_list_member_permanent(list_id, subscriber_hash, opts = {}) ⇒ Object
Delete list member
969 970 971 972 973 974 975 976 977 978 979 980 981 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 969 def delete_list_member_permanent(list_id, subscriber_hash, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil? query_params = {} post_body = nil local_var_path = '/lists/{list_id}/members/{subscriber_hash}/actions/delete-permanent'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s) data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#delete_list_merge_field(list_id, merge_id, opts = {}) ⇒ Object
Delete merge field
100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 100 def delete_list_merge_field(list_id, merge_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'merge_id'" if merge_id.nil? query_params = {} post_body = nil local_var_path = '/lists/{list_id}/merge-fields/{merge_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'merge_id' + '}', merge_id.to_s) data = @api_client.call_api(:DELETE, local_var_path, :query_params => query_params, :body => post_body) return data end |
#delete_list_webhook(list_id, webhook_id, opts = {}) ⇒ Object
Delete webhook
146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 146 def delete_list_webhook(list_id, webhook_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'webhook_id'" if webhook_id.nil? query_params = {} post_body = nil local_var_path = '/lists/{list_id}/webhooks/{webhook_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'webhook_id' + '}', webhook_id.to_s) data = @api_client.call_api(:DELETE, local_var_path, :query_params => query_params, :body => post_body) return data end |
#delete_segment(list_id, segment_id, opts = {}) ⇒ Object
Delete segment
115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 115 def delete_segment(list_id, segment_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil? query_params = {} post_body = nil local_var_path = '/lists/{list_id}/segments/{segment_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s) data = @api_client.call_api(:DELETE, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_all_lists(opts = {}) ⇒ Object
Get lists info
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 181 def get_all_lists(opts = {}) fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 fail ArgumentError, 'invalid value for "sort_field", must be one of date_created' if opts[:'sort_field'] && !['date_created'].include?(opts[:'sort_field']) fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir']) query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'before_date_created'] = opts[:'before_date_created'] if !opts[:'before_date_created'].nil? query_params[:'since_date_created'] = opts[:'since_date_created'] if !opts[:'since_date_created'].nil? query_params[:'before_campaign_last_sent'] = opts[:'before_campaign_last_sent'] if !opts[:'before_campaign_last_sent'].nil? query_params[:'since_campaign_last_sent'] = opts[:'since_campaign_last_sent'] if !opts[:'since_campaign_last_sent'].nil? query_params[:'email'] = opts[:'email'] if !opts[:'email'].nil? query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil? query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil? query_params[:'has_ecommerce_store'] = opts[:'has_ecommerce_store'] if !opts[:'has_ecommerce_store'].nil? query_params[:'include_total_contacts'] = opts[:'include_total_contacts'] if !opts[:'include_total_contacts'].nil? post_body = nil local_var_path = '/lists' data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_interest_category(list_id, interest_category_id, opts = {}) ⇒ Object
Get interest category info
361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 361 def get_interest_category(list_id, interest_category_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil? query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? post_body = nil local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_interest_category_interest(list_id, interest_category_id, interest_id, opts = {}) ⇒ Object
Get interest in category
398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 398 def get_interest_category_interest(list_id, interest_category_id, interest_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil? fail ArgumentError, "Missing required param: 'interest_id'" if interest_id.nil? query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? post_body = nil local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}/interests/{interest_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s).sub('{' + 'interest_id' + '}', interest_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_list(list_id, opts = {}) ⇒ Object
Get list info
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 210 def get_list(list_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'include_total_contacts'] = opts[:'include_total_contacts'] if !opts[:'include_total_contacts'].nil? post_body = nil local_var_path = '/lists/{list_id}'.sub('{' + 'list_id' + '}', list_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_list_abuse_report_details(list_id, report_id, opts = {}) ⇒ Object
Get abuse report
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 246 def get_list_abuse_report_details(list_id, report_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'report_id'" if report_id.nil? fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? post_body = nil local_var_path = '/lists/{list_id}/abuse-reports/{report_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'report_id' + '}', report_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_list_abuse_reports(list_id, opts = {}) ⇒ Object
List abuse reports
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 227 def get_list_abuse_reports(list_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? post_body = nil local_var_path = '/lists/{list_id}/abuse-reports'.sub('{' + 'list_id' + '}', list_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_list_clients(list_id, opts = {}) ⇒ Object
List top email clients
285 286 287 288 289 290 291 292 293 294 295 296 297 298 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 285 def get_list_clients(list_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? post_body = nil local_var_path = '/lists/{list_id}/clients'.sub('{' + 'list_id' + '}', list_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_list_growth_history(list_id, opts = {}) ⇒ Object
List growth history data
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 301 def get_list_growth_history(list_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 fail ArgumentError, 'invalid value for "sort_field", must be one of month' if opts[:'sort_field'] && !['month'].include?(opts[:'sort_field']) fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir']) query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil? query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil? post_body = nil local_var_path = '/lists/{list_id}/growth-history'.sub('{' + 'list_id' + '}', list_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_list_growth_history_by_month(list_id, month, opts = {}) ⇒ Object
Get growth history by month
324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 324 def get_list_growth_history_by_month(list_id, month, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'month'" if month.nil? query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? post_body = nil local_var_path = '/lists/{list_id}/growth-history/{month}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'month' + '}', month.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_list_interest_categories(list_id, opts = {}) ⇒ Object
List interest categories
341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 341 def get_list_interest_categories(list_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? post_body = nil local_var_path = '/lists/{list_id}/interest-categories'.sub('{' + 'list_id' + '}', list_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_list_locations(list_id, opts = {}) ⇒ Object
List locations
416 417 418 419 420 421 422 423 424 425 426 427 428 429 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 416 def get_list_locations(list_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? post_body = nil local_var_path = '/lists/{list_id}/locations'.sub('{' + 'list_id' + '}', list_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_list_member(list_id, subscriber_hash, opts = {}) ⇒ Object
Get member info
470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 470 def get_list_member(list_id, subscriber_hash, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil? query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? post_body = nil local_var_path = '/lists/{list_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_list_member_activity(list_id, subscriber_hash, opts = {}) ⇒ Object
View recent activity 50
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 487 def get_list_member_activity(list_id, subscriber_hash, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil? query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'action'] = @api_client.build_collection_param(opts[:'action'], :csv) if !opts[:'action'].nil? post_body = nil local_var_path = '/lists/{list_id}/members/{subscriber_hash}/activity'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_list_member_activity_feed(list_id, subscriber_hash, opts = {}) ⇒ Object
View recent activity
505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 505 def get_list_member_activity_feed(list_id, subscriber_hash, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil? fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'activity_filters'] = @api_client.build_collection_param(opts[:'activity_filters'], :csv) if !opts[:'activity_filters'].nil? post_body = nil local_var_path = '/lists/{list_id}/members/{subscriber_hash}/activity-feed'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_list_member_events(list_id, subscriber_hash, opts = {}) ⇒ Object
List member events
526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 526 def get_list_member_events(list_id, subscriber_hash, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil? fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 query_params = {} query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? post_body = nil local_var_path = '/lists/{list_id}/members/{subscriber_hash}/events'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_list_member_note(list_id, subscriber_hash, note_id, opts = {}) ⇒ Object
Get member note
587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 587 def get_list_member_note(list_id, subscriber_hash, note_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil? fail ArgumentError, "Missing required param: 'note_id'" if note_id.nil? query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? post_body = nil local_var_path = '/lists/{list_id}/members/{subscriber_hash}/notes/{note_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s).sub('{' + 'note_id' + '}', note_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_list_member_notes(list_id, subscriber_hash, opts = {}) ⇒ Object
List recent member notes
563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 563 def get_list_member_notes(list_id, subscriber_hash, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil? fail ArgumentError, 'invalid value for "sort_field", must be one of created_at, updated_at, note_id' if opts[:'sort_field'] && !['created_at', 'updated_at', 'note_id'].include?(opts[:'sort_field']) fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir']) fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 query_params = {} query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil? query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil? query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? post_body = nil local_var_path = '/lists/{list_id}/members/{subscriber_hash}/notes'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_list_member_tags(list_id, subscriber_hash, opts = {}) ⇒ Object
List member tags
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 161 def (list_id, subscriber_hash, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil? fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? post_body = nil local_var_path = '/lists/{list_id}/members/{subscriber_hash}/tags'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_list_members_info(list_id, opts = {}) ⇒ Object
List members info
432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 432 def get_list_members_info(list_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 fail ArgumentError, 'invalid value for "status", must be one of subscribed, unsubscribed, cleaned, pending, transactional, archived' if opts[:'status'] && !['subscribed', 'unsubscribed', 'cleaned', 'pending', 'transactional', 'archived'].include?(opts[:'status']) fail ArgumentError, 'invalid value for "interest_match", must be one of any, all, none' if opts[:'interest_match'] && !['any', 'all', 'none'].include?(opts[:'interest_match']) fail ArgumentError, 'invalid value for "sort_field", must be one of timestamp_opt, timestamp_signup, last_changed' if opts[:'sort_field'] && !['timestamp_opt', 'timestamp_signup', 'last_changed'].include?(opts[:'sort_field']) fail ArgumentError, 'invalid value for "sort_dir", must be one of ASC, DESC' if opts[:'sort_dir'] && !['ASC', 'DESC'].include?(opts[:'sort_dir']) query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'email_type'] = opts[:'email_type'] if !opts[:'email_type'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? query_params[:'since_timestamp_opt'] = opts[:'since_timestamp_opt'] if !opts[:'since_timestamp_opt'].nil? query_params[:'before_timestamp_opt'] = opts[:'before_timestamp_opt'] if !opts[:'before_timestamp_opt'].nil? query_params[:'since_last_changed'] = opts[:'since_last_changed'] if !opts[:'since_last_changed'].nil? query_params[:'before_last_changed'] = opts[:'before_last_changed'] if !opts[:'before_last_changed'].nil? query_params[:'unique_email_id'] = opts[:'unique_email_id'] if !opts[:'unique_email_id'].nil? query_params[:'vip_only'] = opts[:'vip_only'] if !opts[:'vip_only'].nil? query_params[:'interest_category_id'] = opts[:'interest_category_id'] if !opts[:'interest_category_id'].nil? query_params[:'interest_ids'] = opts[:'interest_ids'] if !opts[:'interest_ids'].nil? query_params[:'interest_match'] = opts[:'interest_match'] if !opts[:'interest_match'].nil? query_params[:'sort_field'] = opts[:'sort_field'] if !opts[:'sort_field'].nil? query_params[:'sort_dir'] = opts[:'sort_dir'] if !opts[:'sort_dir'].nil? query_params[:'since_last_campaign'] = opts[:'since_last_campaign'] if !opts[:'since_last_campaign'].nil? query_params[:'unsubscribed_since'] = opts[:'unsubscribed_since'] if !opts[:'unsubscribed_since'].nil? post_body = nil local_var_path = '/lists/{list_id}/members'.sub('{' + 'list_id' + '}', list_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_list_merge_field(list_id, merge_id, opts = {}) ⇒ Object
Get merge field
626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 626 def get_list_merge_field(list_id, merge_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'merge_id'" if merge_id.nil? query_params = {} query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? post_body = nil local_var_path = '/lists/{list_id}/merge-fields/{merge_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'merge_id' + '}', merge_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_list_merge_fields(list_id, opts = {}) ⇒ Object
List merge fields
605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 605 def get_list_merge_fields(list_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? query_params[:'required'] = opts[:'required'] if !opts[:'required'].nil? post_body = nil local_var_path = '/lists/{list_id}/merge-fields'.sub('{' + 'list_id' + '}', list_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_list_recent_activity(list_id, opts = {}) ⇒ Object
List recent activity
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 266 def get_list_recent_activity(list_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 query_params = {} query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? post_body = nil local_var_path = '/lists/{list_id}/activity'.sub('{' + 'list_id' + '}', list_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_list_signup_forms(list_id, opts = {}) ⇒ Object
List signup forms
686 687 688 689 690 691 692 693 694 695 696 697 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 686 def get_list_signup_forms(list_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? query_params = {} post_body = nil local_var_path = '/lists/{list_id}/signup-forms'.sub('{' + 'list_id' + '}', list_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_list_webhook(list_id, webhook_id, opts = {}) ⇒ Object
Get webhook info
714 715 716 717 718 719 720 721 722 723 724 725 726 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 714 def get_list_webhook(list_id, webhook_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'webhook_id'" if webhook_id.nil? query_params = {} post_body = nil local_var_path = '/lists/{list_id}/webhooks/{webhook_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'webhook_id' + '}', webhook_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_list_webhooks(list_id, opts = {}) ⇒ Object
List webhooks
700 701 702 703 704 705 706 707 708 709 710 711 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 700 def get_list_webhooks(list_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? query_params = {} post_body = nil local_var_path = '/lists/{list_id}/webhooks'.sub('{' + 'list_id' + '}', list_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_segment(list_id, segment_id, opts = {}) ⇒ Object
Get segment info
643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 643 def get_segment(list_id, segment_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil? query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'include_cleaned'] = opts[:'include_cleaned'] if !opts[:'include_cleaned'].nil? query_params[:'include_transactional'] = opts[:'include_transactional'] if !opts[:'include_transactional'].nil? query_params[:'include_unsubscribed'] = opts[:'include_unsubscribed'] if !opts[:'include_unsubscribed'].nil? post_body = nil local_var_path = '/lists/{list_id}/segments/{segment_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#get_segment_members_list(list_id, segment_id, opts = {}) ⇒ Object
List members in segment
663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 663 def get_segment_members_list(list_id, segment_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil? fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'include_cleaned'] = opts[:'include_cleaned'] if !opts[:'include_cleaned'].nil? query_params[:'include_transactional'] = opts[:'include_transactional'] if !opts[:'include_transactional'].nil? query_params[:'include_unsubscribed'] = opts[:'include_unsubscribed'] if !opts[:'include_unsubscribed'].nil? post_body = nil local_var_path = '/lists/{list_id}/segments/{segment_id}/members'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#getListMemberGoals(list_id, subscriber_hash, opts = {}) ⇒ Object
List member goal events
546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 546 def getListMemberGoals(list_id, subscriber_hash, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil? query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? post_body = nil local_var_path = '/lists/{list_id}/members/{subscriber_hash}/goals'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#list_interest_category_interests(list_id, interest_category_id, opts = {}) ⇒ Object
List interests in category
378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 378 def list_interest_category_interests(list_id, interest_category_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil? fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? post_body = nil local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}/interests'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#list_segments(list_id, opts = {}) ⇒ Object
List segments
1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 1092 def list_segments(list_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, 'invalid value for "opts[:"count"]", must be smaller than or equal to 1000.' if !opts[:'count'].nil? && opts[:'count'] > 1000 query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :csv) if !opts[:'exclude_fields'].nil? query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil? query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil? query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil? query_params[:'since_created_at'] = opts[:'since_created_at'] if !opts[:'since_created_at'].nil? query_params[:'before_created_at'] = opts[:'before_created_at'] if !opts[:'before_created_at'].nil? query_params[:'include_cleaned'] = opts[:'include_cleaned'] if !opts[:'include_cleaned'].nil? query_params[:'include_transactional'] = opts[:'include_transactional'] if !opts[:'include_transactional'].nil? query_params[:'include_unsubscribed'] = opts[:'include_unsubscribed'] if !opts[:'include_unsubscribed'].nil? query_params[:'since_updated_at'] = opts[:'since_updated_at'] if !opts[:'since_updated_at'].nil? query_params[:'before_updated_at'] = opts[:'before_updated_at'] if !opts[:'before_updated_at'].nil? post_body = nil local_var_path = '/lists/{list_id}/segments'.sub('{' + 'list_id' + '}', list_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#remove_segment_member(list_id, segment_id, subscriber_hash, opts = {}) ⇒ Object
Remove list member from segment
130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 130 def remove_segment_member(list_id, segment_id, subscriber_hash, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil? fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil? query_params = {} post_body = nil local_var_path = '/lists/{list_id}/segments/{segment_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s) data = @api_client.call_api(:DELETE, local_var_path, :query_params => query_params, :body => post_body) return data end |
#set_list_member(list_id, subscriber_hash, body, opts = {}) ⇒ Object
Add or update list member
1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 1119 def set_list_member(list_id, subscriber_hash, body, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} query_params[:'skip_merge_validation'] = opts[:'skip_merge_validation'] if !opts[:'skip_merge_validation'].nil? post_body = @api_client.object_to_http_body(body) local_var_path = '/lists/{list_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s) data = @api_client.call_api(:PUT, local_var_path, :query_params => query_params, :body => post_body) return data end |
#tag_search(list_id, opts = {}) ⇒ Object
Search for tags on a list by name.
1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 1136 def tag_search(list_id, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? query_params = {} query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil? post_body = nil local_var_path = '/lists/{list_id}/tag-search'.sub('{' + 'list_id' + '}', list_id.to_s) data = @api_client.call_api(:GET, local_var_path, :query_params => query_params, :body => post_body) return data end |
#update_interest_category(list_id, interest_category_id, body, opts = {}) ⇒ Object
Update interest category
744 745 746 747 748 749 750 751 752 753 754 755 756 757 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 744 def update_interest_category(list_id, interest_category_id, body, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s) data = @api_client.call_api(:PATCH, local_var_path, :query_params => query_params, :body => post_body) return data end |
#update_interest_category_interest(list_id, interest_category_id, interest_id, body, opts = {}) ⇒ Object
Update interest in category
760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 760 def update_interest_category_interest(list_id, interest_category_id, interest_id, body, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'interest_category_id'" if interest_category_id.nil? fail ArgumentError, "Missing required param: 'interest_id'" if interest_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/lists/{list_id}/interest-categories/{interest_category_id}/interests/{interest_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'interest_category_id' + '}', interest_category_id.to_s).sub('{' + 'interest_id' + '}', interest_id.to_s) data = @api_client.call_api(:PATCH, local_var_path, :query_params => query_params, :body => post_body) return data end |
#update_list(list_id, body, opts = {}) ⇒ Object
Update lists
729 730 731 732 733 734 735 736 737 738 739 740 741 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 729 def update_list(list_id, body, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/lists/{list_id}'.sub('{' + 'list_id' + '}', list_id.to_s) data = @api_client.call_api(:PATCH, local_var_path, :query_params => query_params, :body => post_body) return data end |
#update_list_member(list_id, subscriber_hash, body, opts = {}) ⇒ Object
Update list member
777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 777 def update_list_member(list_id, subscriber_hash, body, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} query_params[:'skip_merge_validation'] = opts[:'skip_merge_validation'] if !opts[:'skip_merge_validation'].nil? post_body = @api_client.object_to_http_body(body) local_var_path = '/lists/{list_id}/members/{subscriber_hash}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s) data = @api_client.call_api(:PATCH, local_var_path, :query_params => query_params, :body => post_body) return data end |
#update_list_member_note(list_id, subscriber_hash, note_id, body, opts = {}) ⇒ Object
Update note
794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 794 def update_list_member_note(list_id, subscriber_hash, note_id, body, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil? fail ArgumentError, "Missing required param: 'note_id'" if note_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/lists/{list_id}/members/{subscriber_hash}/notes/{note_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s).sub('{' + 'note_id' + '}', note_id.to_s) data = @api_client.call_api(:PATCH, local_var_path, :query_params => query_params, :body => post_body) return data end |
#update_list_member_tags(list_id, subscriber_hash, body, opts = {}) ⇒ Object
Add or remove member tags
875 876 877 878 879 880 881 882 883 884 885 886 887 888 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 875 def (list_id, subscriber_hash, body, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'subscriber_hash'" if subscriber_hash.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/lists/{list_id}/members/{subscriber_hash}/tags'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'subscriber_hash' + '}', subscriber_hash.to_s) data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#update_list_merge_field(list_id, merge_id, body, opts = {}) ⇒ Object
Update merge field
811 812 813 814 815 816 817 818 819 820 821 822 823 824 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 811 def update_list_merge_field(list_id, merge_id, body, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'merge_id'" if merge_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/lists/{list_id}/merge-fields/{merge_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'merge_id' + '}', merge_id.to_s) data = @api_client.call_api(:PATCH, local_var_path, :query_params => query_params, :body => post_body) return data end |
#update_list_signup_form(list_id, body, opts = {}) ⇒ Object
Customize signup form
1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 1062 def update_list_signup_form(list_id, body, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/lists/{list_id}/signup-forms'.sub('{' + 'list_id' + '}', list_id.to_s) data = @api_client.call_api(:POST, local_var_path, :query_params => query_params, :body => post_body) return data end |
#update_list_webhook(list_id, webhook_id, body, opts = {}) ⇒ Object
Update webhook
843 844 845 846 847 848 849 850 851 852 853 854 855 856 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 843 def update_list_webhook(list_id, webhook_id, body, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'webhook_id'" if webhook_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/lists/{list_id}/webhooks/{webhook_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'webhook_id' + '}', webhook_id.to_s) data = @api_client.call_api(:PATCH, local_var_path, :query_params => query_params, :body => post_body) return data end |
#update_segment(list_id, segment_id, body, opts = {}) ⇒ Object
Update segment
827 828 829 830 831 832 833 834 835 836 837 838 839 840 |
# File 'lib/MailchimpMarketing/api/lists_api.rb', line 827 def update_segment(list_id, segment_id, body, opts = {}) fail ArgumentError, "Missing required param: 'list_id'" if list_id.nil? fail ArgumentError, "Missing required param: 'segment_id'" if segment_id.nil? fail ArgumentError, "Missing required param: 'body'" if body.nil? query_params = {} post_body = @api_client.object_to_http_body(body) local_var_path = '/lists/{list_id}/segments/{segment_id}'.sub('{' + 'list_id' + '}', list_id.to_s).sub('{' + 'segment_id' + '}', segment_id.to_s) data = @api_client.call_api(:PATCH, local_var_path, :query_params => query_params, :body => post_body) return data end |