Class: PhraseApp::RequestParams::LocaleFileImportParams
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- PhraseApp::RequestParams::LocaleFileImportParams
- Defined in:
- lib/phraseapp-ruby.rb
Overview
LocaleFileImportParams
Parameters:
- convert_emoji
-
Indicates whether the file contains Emoji symbols that should be converted. <a href=“/guides/working-with-phraseapp/emoji-support/”>Working with Emojis</a>.
- 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
- #convert_emoji=(val) ⇒ Object
- #file=(val) ⇒ Object
- #file_format=(val) ⇒ Object
- #locale_id=(val) ⇒ Object
- #skip_unverification=(val) ⇒ Object
- #skip_upload_tags=(val) ⇒ Object
- #tags=(val) ⇒ Object
- #update_translations=(val) ⇒ Object
- #validate ⇒ Object
Instance Method Details
#convert_emoji=(val) ⇒ Object
915 916 917 918 919 920 921 922 923 |
# File 'lib/phraseapp-ruby.rb', line 915 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
925 926 927 |
# File 'lib/phraseapp-ruby.rb', line 925 def file=(val) self.file = val end |
#file_format=(val) ⇒ Object
929 930 931 |
# File 'lib/phraseapp-ruby.rb', line 929 def file_format=(val) self.file_format = val end |
#locale_id=(val) ⇒ Object
933 934 935 |
# File 'lib/phraseapp-ruby.rb', line 933 def locale_id=(val) self.locale_id = val end |
#skip_unverification=(val) ⇒ Object
937 938 939 940 941 942 943 944 945 |
# File 'lib/phraseapp-ruby.rb', line 937 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
947 948 949 950 951 952 953 954 955 |
# File 'lib/phraseapp-ruby.rb', line 947 def (val) if val.is_a?(TrueClass) self. = true elsif val.is_a?(FalseClass) #ignore self. = b else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#tags=(val) ⇒ Object
957 958 959 |
# File 'lib/phraseapp-ruby.rb', line 957 def (val) self. = val end |
#update_translations=(val) ⇒ Object
961 962 963 964 965 966 967 968 969 |
# File 'lib/phraseapp-ruby.rb', line 961 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 |
#validate ⇒ Object
971 972 973 974 975 |
# File 'lib/phraseapp-ruby.rb', line 971 def validate if self.file == nil raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"file\" of \"LocaleFileImportParams\" not set") end end |