class Multiwoven::Integrations::Destination::Zendesk::Client

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

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