Class: PhraseApp::RequestParams::LocaleFileImportParams

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

Overview

LocaleFileImportParams

Parameters:

convert_emoji

Indicates whether the file contains Emoji symbols that should be converted.

file

File to be imported

file_format

File format. Auto-detected when possible and not specified.

locale_id

Locale of the file’s content. Can be the name or public id of the locale. Preferred is the public id.

skip_unverification

Indicates whether the upload should unverify updated translations.

skip_upload_tags

Indicates whether the upload should not create upload tags.

tags

List of tags separated by comma to be associated with the new keys contained in the upload.

update_translations

Indicates whether existing translations should be updated with the file content.

Instance Method Summary collapse

Instance Method Details

#convert_emoji=(val) ⇒ Object



917
918
919
920
921
922
923
924
925
# File 'lib/phraseapp-ruby.rb', line 917

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

#file=(val) ⇒ Object



927
928
929
# File 'lib/phraseapp-ruby.rb', line 927

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

#file_format=(val) ⇒ Object



931
932
933
# File 'lib/phraseapp-ruby.rb', line 931

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

#locale_id=(val) ⇒ Object



935
936
937
# File 'lib/phraseapp-ruby.rb', line 935

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

#skip_unverification=(val) ⇒ Object



939
940
941
942
943
944
945
946
947
# File 'lib/phraseapp-ruby.rb', line 939

def skip_unverification=(val)
  if val.is_a?(TrueClass)
    self.skip_unverification = true
  elsif val.is_a?(FalseClass) #ignore
    self.skip_unverification = b
  else
    PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
  end
end

#skip_upload_tags=(val) ⇒ Object



949
950
951
952
953
954
955
956
957
# File 'lib/phraseapp-ruby.rb', line 949

def skip_upload_tags=(val)
  if val.is_a?(TrueClass)
    self.skip_upload_tags = true
  elsif val.is_a?(FalseClass) #ignore
    self.skip_upload_tags = b
  else
    PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
  end
end

#tags=(val) ⇒ Object



959
960
961
# File 'lib/phraseapp-ruby.rb', line 959

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

#update_translations=(val) ⇒ Object



963
964
965
966
967
968
969
970
971
# File 'lib/phraseapp-ruby.rb', line 963

def update_translations=(val)
  if val.is_a?(TrueClass)
    self.update_translations = true
  elsif val.is_a?(FalseClass) #ignore
    self.update_translations = b
  else
    PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
  end
end

#validateObject



973
974
975
976
977
# File 'lib/phraseapp-ruby.rb', line 973

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