Module: Commercelayer::CLI::Exporters

Included in:
Base
Defined in:
lib/commercelayer/cli/exporters.rb,
lib/commercelayer/cli/exporters/contentful.rb

Defined Under Namespace

Classes: Contentful

Instance Method Summary collapse

Instance Method Details

#export_data!(destination) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/commercelayer/cli/exporters.rb', line 7

def export_data!(destination)
  commercelayer_client.authorize!
  case destination
  when "contentful"
    if yes? "Warning: this will export your SKUs to Contentful. Continue?", :yellow
      say "Exporting SKUs to Contentful...", :blue
      Contentful.new.export!
    else
      say "Nothing to do here. Bye!", :blue
    end
  else
    say "coming soon...", :yellow
  end
end