Class: PhraseApp::RequestParams::LocaleFileImportParams
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- PhraseApp::RequestParams::LocaleFileImportParams
- Defined in:
- lib/phraseapp-ruby.rb
Overview
LocaleFileImportParams
Parameters:
- convert_emoji
-
convert_emoji
- file
-
file
- file_format
-
file_format
- format_options
-
format_options
- locale_id
-
locale_id
- skip_unverification
-
skip_unverification
- skip_upload_tags
-
skip_upload_tags
- tags
-
tags
- update_translations
-
update_translations
Instance Method Summary collapse
- #convert_emoji=(val) ⇒ Object
- #file=(val) ⇒ Object
- #file_format=(val) ⇒ Object
- #format_options=(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
911 912 913 914 915 916 917 918 919 |
# File 'lib/phraseapp-ruby.rb', line 911 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=(val) ⇒ Object
921 922 923 |
# File 'lib/phraseapp-ruby.rb', line 921 def file=(val) self.file = val end |
#file_format=(val) ⇒ Object
925 926 927 |
# File 'lib/phraseapp-ruby.rb', line 925 def file_format=(val) self.file_format = val end |
#format_options=(val) ⇒ Object
929 930 931 |
# File 'lib/phraseapp-ruby.rb', line 929 def (val) self. = JSON.load(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 == "true" self.skip_unverification = true elsif val == "false" #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 == "true" self. = true elsif val == "false" #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.split(',') 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 == "true" self.update_translations = true elsif val == "false" #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 |