Giter Site home page Giter Site logo

Comments (12)

EtienneDepaulis avatar EtienneDepaulis commented on August 17, 2024

Looks like the problem could be coming from the fact that if I do (after having tried at least once to save the contact):

contact = Mailjet::Contactslist_managecontact.new(contact_params)
contact.class.properties

I get: {}
Meaning that https://github.com/mailjet/mailjet-gem/blob/master/lib/mailjet/resource.rb#L235 then erase all the properties while formating the payload...

from mailjet-gem.

WeshGuillaume avatar WeshGuillaume commented on August 17, 2024

Hi @EtienneDepaulis !
thank you for using Mailjet ! I faced the issue a few days ago! strangely, it doesn't happen without rails. I will investigate and get back to you ! Thank you !
Best,
Guillaume

from mailjet-gem.

EtienneDepaulis avatar EtienneDepaulis commented on August 17, 2024

Here is the dirty fix I found:

contact_params = {id: main_contact_list_id, action: "addnoforce", email: user.email}
contact = Mailjet::Contactslist_managecontact.create(contact_params)

Mailjet::Contactslist_managecontact.properties = [:email, :name, :action, :properties]

Mailjet::Contactdata.create(:contact_id => contact.contact_id, :data => [...])

from mailjet-gem.

WeshGuillaume avatar WeshGuillaume commented on August 17, 2024

Hahah ! dirty indeed ! I guess you could use that until I come up with a solution !

from mailjet-gem.

EtienneDepaulis avatar EtienneDepaulis commented on August 17, 2024

I had too, looks like Mailjet support don't give a shit about support request sadly :/

from mailjet-gem.

WeshGuillaume avatar WeshGuillaume commented on August 17, 2024

Sorry you have this feeling.
we're working hard on this issue. I manage to identify the bug. I'll keep you up to date on that !
Best,
Guillaume

from mailjet-gem.

WeshGuillaume avatar WeshGuillaume commented on August 17, 2024

I found out why it didn't work. A naming conflict in our wrapper. Could you tell me if this works for you on the rails_fix: branch ?

from mailjet-gem.

EtienneDepaulis avatar EtienneDepaulis commented on August 17, 2024

Thanks for looking into it.
However, we already lost 3 hours today (and few more 2 weeks ago) with this bug.
This gem should really have specs in my opinion ...

from mailjet-gem.

WeshGuillaume avatar WeshGuillaume commented on August 17, 2024

Hey !
I started implementing specs to test the wrapper. Thank you for your time. If you need anything else, I would be happy to help, otherwise, can you please close the issue ?
Best,
Guillaume

from mailjet-gem.

EtienneDepaulis avatar EtienneDepaulis commented on August 17, 2024

Has this gem been updated on Rubygems ?
If not, the issue still exists ...

from mailjet-gem.

WeshGuillaume avatar WeshGuillaume commented on August 17, 2024

Hey ! @EtienneDepaulis

I am just letting you know that we released a new version on RubyGem with specs this time, and the rails_fix branch is now merged into master. We are planning to constantly grow our tests over time. Feel free to contribute if you think it lacks some useful checks !

Best,
Guillaume from Mailjet !

from mailjet-gem.

EtienneDepaulis avatar EtienneDepaulis commented on August 17, 2024

awesome thx :)

from mailjet-gem.

Related Issues (20)

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.