Skip to content

Instantly share code, notes, and snippets.

class AddressBook::ContactsImport
BATCH_SIZE = 500
AB_CONTACTS_CREATE_FIELDS = %w(batch_id batch_index email_id merchant_id first_name last_name address company notes phone im_contact im_contact_service is_unsubscribed invalid)
AB_CONTACT_UPDATE_FIELDS = %w(batch_id batch_index first_name last_name address company notes phone im_contact im_contact_service is_unsubscribed invalid deleted)
AB_CONTACT_PROFILE_UPDATE_FIELDS = AddressBook::ContactProfile::MAPPING.map { |i| i[0].to_s }
AB_CONTACTS_RESTORE_FIELDS = AB_CONTACTS_CREATE_FIELDS + %w(known known_reason known_change_at)
def initialize(merchant, attributes_array, options = {})
@maxtor
maxtor / gist:4198078
Created December 3, 2012 21:11
Mailtrap heroku addon

Mailtrap is an add-on for providing safe email delivery testing.

Mailtrap is a perfect tool for your team to test, view and share emails sent from DEVELOPMENT and STAGING environment, without spamming real customers.

Provisioning the add-on

Mailtrap can be attached to a Heroku application via the CLI:

:::term

$ heroku addons:add mailtrap