Class: PhraseApp::RequestParams::UploadParams
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- PhraseApp::RequestParams::UploadParams
- Defined in:
- lib/phraseapp-ruby.rb
Overview
UploadParams
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
- #to_h ⇒ Object
- #update_translations=(val) ⇒ Object
- #validate ⇒ Object
Instance Method Details
#convert_emoji=(val) ⇒ Object
967 968 969 970 971 972 973 974 975 |
# File 'lib/phraseapp-ruby.rb', line 967 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
977 978 979 |
# File 'lib/phraseapp-ruby.rb', line 977 def file=(val) self.file = val end |
#file_format=(val) ⇒ Object
981 982 983 |
# File 'lib/phraseapp-ruby.rb', line 981 def file_format=(val) self.file_format = val end |
#locale_id=(val) ⇒ Object
985 986 987 |
# File 'lib/phraseapp-ruby.rb', line 985 def locale_id=(val) self.locale_id = val end |
#skip_unverification=(val) ⇒ Object
989 990 991 992 993 994 995 996 997 |
# File 'lib/phraseapp-ruby.rb', line 989 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
999 1000 1001 1002 1003 1004 1005 1006 1007 |
# File 'lib/phraseapp-ruby.rb', line 999 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
1009 1010 1011 |
# File 'lib/phraseapp-ruby.rb', line 1009 def (val) self. = val end |
#to_h ⇒ Object
1029 1030 1031 |
# File 'lib/phraseapp-ruby.rb', line 1029 def to_h @table.dup end |
#update_translations=(val) ⇒ Object
1013 1014 1015 1016 1017 1018 1019 1020 1021 |
# File 'lib/phraseapp-ruby.rb', line 1013 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
1023 1024 1025 1026 1027 |
# File 'lib/phraseapp-ruby.rb', line 1023 def validate if self.file == nil raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"file\" of \"UploadParams\" not set") end end |