Giter VIP home page Giter VIP logo

constant_contact's Issues

Handle ConstantContact::List#contact_count when list contains no contacts

If a List does not contain any contacts the @attributes collection will not contain the ContactCount key. This will cause an exception. The :contact_count method should be hard-coded as an instance method and return 0 if the ContactCount attribute is missing.

Perhaps adding an empty? method for the list would be handy as well.

Exception trying to save existing contact without contact_lists

The gem raises an exception when you try to save an existing contact which has no contact lists (e.g. one that is in the do-not-mail group).

> contact = ConstantContact::Contact.find(1)
 => #<ConstantContact::Contact:0x100000000 @prefix_options={}, @attributes={"Status"=>"Do Not Mail", ...

> contact.contact_lists
 => nil

> contact.save
NoMethodError: You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.sort
    from .../lib/constant_contact/contact.rb:21:in `to_xml'
...

I'm new to Constant Contact, so perhaps you aren't allowed to update contacts that are in the do-not-mail group, but in that case there should be a more meaningful error. If you are allowed to update these contacts, there should be a way to fix this.

undefined method 'ContactLists' for ConstantContact::Contact

When i try to obtain ContactLists from a Contact which got with ConstantContact::Contact.find_by_email(email) it respond "undefined method 'ContactLists' for ConstantContact::Contact" but when i use this with a Contact recently saved it works successfully

user_name? password? huh... really?

when signing up for the constant contact API, i was given a key_display_name, key, consumer_secret and status.

When you mention user in this gem and password, do you really mean the ones i log in with?

Has their login process changed? Just seems odd getting a secret key and using http authentication really.

Any help would be great.

ConstantContact::Activity#encode_data method missing carriage return

The encode_data method should add a carriage return after the last contact. Currently, the contact_strings are joined with a "\n" but the last contact entry needs to have a CR after it (according to the AppConnect examples for using Activity).

Line 36 should look like this:
result += CGI.escape(contact_strings.join("\n") + "\n")

Get additional customer data

Is it possible to get additional customer data aside from just the email address? I'm specifically interested in the postal address.

New Contact on list 1 -- it doesn't exist

I'm trying to create a new contact. Right now, Contact#to_xml puts the user on list 1 by default.

Why is this the default behavior? It's breaking my save request when I try to create a contact, and the account doesn't have a list with ID 1. Is this done because we can't create a new contact without putting it on at least one list?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.