Sha256: c34be99c15173048496ba6e967ab1969b42d071603c9026ac5eb84f022860666

Contents?: true

Size: 865 Bytes

Versions: 45

Compression:

Stored size: 865 Bytes

Contents

require 'flydata/source/sync_generate_table_ddl'
require 'flydata/source_zendesk/zendesk_flydata_tabledefs'

module Flydata
module SourceZendesk

class SyncGenerateTableDdl < Source::SyncGenerateTableDdl
  def run_compatibility_check
    #TODO Check version "Zendesk v2 API"
  end

  def generate_flydata_tabledef(tables, options)
    flydata_tabledefs = []
    error_list = []
    zendesk_resource_names = ZENDESK_FLYDATA_TABLEDEFS.keys.join(" ")

    tables.each do |tablename|
      flydata_tabledef = ZENDESK_FLYDATA_TABLEDEFS[tablename]
      if !flydata_tabledef
        error_list << { error: "Invalid Zendesk resource name specified. Flydata supports following Zendesk resources: #{zendesk_resource_names}", table: tablename }
        next
      end
      flydata_tabledefs << flydata_tabledef
    end
    [flydata_tabledefs, error_list]
  end
end

end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
flydata-0.8.10.2 lib/flydata/source_zendesk/sync_generate_table_ddl.rb
flydata-0.8.10.1 lib/flydata/source_zendesk/sync_generate_table_ddl.rb
flydata-0.8.9.11 lib/flydata/source_zendesk/sync_generate_table_ddl.rb
flydata-0.8.10 lib/flydata/source_zendesk/sync_generate_table_ddl.rb
flydata-0.8.9 lib/flydata/source_zendesk/sync_generate_table_ddl.rb
flydata-0.8.8 lib/flydata/source_zendesk/sync_generate_table_ddl.rb
flydata-0.8.7 lib/flydata/source_zendesk/sync_generate_table_ddl.rb
flydata-0.8.6 lib/flydata/source_zendesk/sync_generate_table_ddl.rb
flydata-0.8.5 lib/flydata/source_zendesk/sync_generate_table_ddl.rb
flydata-0.8.4 lib/flydata/source_zendesk/sync_generate_table_ddl.rb
flydata-0.8.3 lib/flydata/source_zendesk/sync_generate_table_ddl.rb
flydata-0.8.2 lib/flydata/source_zendesk/sync_generate_table_ddl.rb
flydata-0.8.1 lib/flydata/source_zendesk/sync_generate_table_ddl.rb
flydata-0.8.0 lib/flydata/source_zendesk/sync_generate_table_ddl.rb
flydata-0.7.19 lib/flydata/source_zendesk/sync_generate_table_ddl.rb
flydata-0.7.18 lib/flydata/source_zendesk/sync_generate_table_ddl.rb
flydata-0.7.17 lib/flydata/source_zendesk/sync_generate_table_ddl.rb
flydata-0.7.16 lib/flydata/source_zendesk/sync_generate_table_ddl.rb
flydata-0.7.15 lib/flydata/source_zendesk/sync_generate_table_ddl.rb
flydata-0.7.14 lib/flydata/source_zendesk/sync_generate_table_ddl.rb