Class: PhraseApp::RequestParams::LocaleDownloadParams

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/phraseapp-ruby.rb

Instance Method Summary collapse

Instance Method Details

#convert_emoji=(val) ⇒ Object

:convert_emoji, :file_format, :format_options, :include_empty_translations, :keep_notranslate_tags, :tag_id,



996
997
998
999
1000
1001
1002
1003
1004
# File 'lib/phraseapp-ruby.rb', line 996

def convert_emoji=(val)
  if val == "true"
    self.convert_emoji = true
  elsif val == "false" #ignore
    self.convert_emoji = b
  else
    PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
  end
end

#file_format=(val) ⇒ Object



1006
1007
1008
# File 'lib/phraseapp-ruby.rb', line 1006

def file_format=(val)
  self.file_format = val
end

#format_options=(val) ⇒ Object



1010
1011
1012
# File 'lib/phraseapp-ruby.rb', line 1010

def format_options=(val)
  self.format_options = JSON.load(val)
end

#include_empty_translations=(val) ⇒ Object



1014
1015
1016
1017
1018
1019
1020
1021
1022
# File 'lib/phraseapp-ruby.rb', line 1014

def include_empty_translations=(val)
  if val == "true"
    self.include_empty_translations = true
  elsif val == "false" #ignore
    self.include_empty_translations = b
  else
    PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
  end
end

#keep_notranslate_tags=(val) ⇒ Object



1024
1025
1026
1027
1028
1029
1030
1031
1032
# File 'lib/phraseapp-ruby.rb', line 1024

def keep_notranslate_tags=(val)
  if val == "true"
    self.keep_notranslate_tags = true
  elsif val == "false" #ignore
    self.keep_notranslate_tags = b
  else
    PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
  end
end

#tag_id=(val) ⇒ Object



1034
1035
1036
# File 'lib/phraseapp-ruby.rb', line 1034

def tag_id=(val)
  self.tag_id = val
end

#validateObject



1038
1039
1040
1041
1042
# File 'lib/phraseapp-ruby.rb', line 1038

def validate
  if self.file_format == nil || self.file_format == "" 
    raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"file_format\" of \"locale_downloadParams\" not set")
  end
end