Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def create_signup_location
- glist = Gibbon::API.new.lists
- list_ids = glist.list(filters: { list_name: 'register' })['data'].map {|m| m['id'] }
- list_ids.each do |list_id|
- payload = {
- id: list_id,
- tag: 'SIGNUP_LOC',
- name: 'Signup Location',
- options: {
- field_type: 'dropdown',
- req: false,
- public: true,
- show: true,
- choices: ['App', 'WebApp']
- }
- }
- begin
- glist.merge_var_add(payload)
- rescue Gibbon::MailChimpError => ex
- puts ex.message
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement