Class: AdLocalize::Mappers::OptionsToExportRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/ad_localize/mappers/options_to_export_request.rb

Instance Method Summary collapse

Instance Method Details

#map(options:) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/ad_localize/mappers/options_to_export_request.rb', line 5

def map(options:)
  request = Requests::ExportRequest.new
  request.locales = options[:locales]
  request.bypass_empty_values = options[:'non-empty-values']
  request.auto_escape_percent = options[:'auto-escape-percent']
  request.skip_value_stripping = options[:'skip-value-stripping']
  request.csv_paths = options[:csv_paths]
  request.merge_policy = options[:'merge-policy']
  request.output_path = options[:'target-dir']
  request.platforms = options[:only]
  request.spreadsheet_id = options[:'drive-key']
  request.sheet_ids = options[:sheets]
  request.export_all = options[:'export-all-sheets']
  request.verbose = options[:debug]
  request
end