nateleavitt / infusionsoft

Ruby Gem for the Infusionsoft API
MIT License
58 stars 63 forks source link

contact_add_with_dup_check error #53

Closed ocambridge closed 7 years ago

ocambridge commented 8 years ago

Hi,

All of a sudden we seem to be getting an error when trying to use this method. The error is: #<RuntimeError: Wrong type NilClass. Not allowed!>

We pass in a hash of {:FirstName => "x", LastName: "y", :Email => z} with the second parameter being "Email". We haven;t had an issue doing this until recently. Any ideas?

TheMetalCode commented 8 years ago

@ocambridge There aren't quotes around that z to denote a string like you've done with your FirstName and LastName, so unless that's a variable you declared somewhere beforehand, I would expect it to lead to an error similar to what you describe.

samcambridge commented 7 years ago

I can confirm still getting this issue the hash being passed in is:

{:Email=>"standard@email.com", :FirstName=>"first", :LastName=>"last", :Company=>"co-name"}

Second param being passed in is 'Email'

error is still RuntimeError: Wrong type NilClass. Not allowed!

samcambridge commented 7 years ago

@TheMetalCode would you have any suggestions for this?

/cc @nateleavitt

TheMetalCode commented 7 years ago

@samcambridge Well unfortunately, I'm no longer using Infusionsoft and hence no longer have a valid API key to make any attempt at replicating the issue. It sure looks like all four of those params should accept strings though.

nateleavitt commented 7 years ago

Hey guys.. try the parameters with ""

So try {"Email" => "blabla@email.com", "FirstName" => "first"}

nateleavitt commented 7 years ago

I know that the symbols are converted to string, but it depends on the implementation. Also @ocambridge can you show some more snippets of code?

nateleavitt commented 7 years ago

Comment here to reopen if this is still an issue :)