class Multiwoven::Integrations::Destination::Mailchimp::Client

def write(sync_config, records, _action = "create")

def write(sync_config, records, _action = "create")
  @sync_config = sync_config
  initialize_client(sync_config.destination.connection_specification)
  process_records(records, sync_config.stream)
rescue StandardError => e
  handle_exception(e, {
                     context: "MAILCHIMP:WRITE:EXCEPTION",
                     type: "error",
                     sync_id: @sync_config.sync_id,
                     sync_run_id: @sync_config.sync_run_id
                   })
end