class Multiwoven::Integrations::Destination::Hubspot::Client

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

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