luk4s / mautic-rails

Mautic ruby client / wrapper
MIT License
23 stars 23 forks source link

refs #15 add tag collection #17

Closed luk4s closed 4 years ago

luk4s commented 4 years ago

fix update tags of contact, add or remove them. Add Tag::Collection class for manage tags of contact.

Usage:

contact.tags # => Array of Mautic::Tag objects
contact.tags << "tagX" # => This build Mautic::Tag instance.
contact.tags.remove "tag1" # => Remove tag1 from collection. In update request it send "-tag1" into mautic for remove = https://developer.mautic.org/#edit-contact
petebytes commented 4 years ago

Manually tested with single, multiple and multiple add and subtract tags worked great!