Class: PhraseApp::RequestParams::TranslationUpdateParams
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- PhraseApp::RequestParams::TranslationUpdateParams
- Defined in:
- lib/phraseapp-ruby.rb
Overview
TranslationUpdateParams
Parameters:
- content
-
Translation content
- excluded
-
Indicates whether translation is excluded.
- plural_suffix
-
Plural suffix. Can be one of: zero, one, two, few, many, other.
- unverified
-
Indicates whether translation is unverified.
Instance Method Summary collapse
- #content=(val) ⇒ Object
- #excluded=(val) ⇒ Object
- #plural_suffix=(val) ⇒ Object
- #unverified=(val) ⇒ Object
- #validate ⇒ Object
Instance Method Details
#content=(val) ⇒ Object
1265 1266 1267 |
# File 'lib/phraseapp-ruby.rb', line 1265 def content=(val) self.content = val end |
#excluded=(val) ⇒ Object
1269 1270 1271 1272 1273 1274 1275 1276 1277 |
# File 'lib/phraseapp-ruby.rb', line 1269 def excluded=(val) if val == "true" self.excluded = true elsif val == "false" #ignore self.excluded = b else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#plural_suffix=(val) ⇒ Object
1279 1280 1281 |
# File 'lib/phraseapp-ruby.rb', line 1279 def plural_suffix=(val) self.plural_suffix = val end |
#unverified=(val) ⇒ Object
1283 1284 1285 1286 1287 1288 1289 1290 1291 |
# File 'lib/phraseapp-ruby.rb', line 1283 def unverified=(val) if val == "true" self.unverified = true elsif val == "false" #ignore self.unverified = b else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#validate ⇒ Object
1293 1294 1295 1296 1297 |
# File 'lib/phraseapp-ruby.rb', line 1293 def validate if self.content == nil || self.content == "" raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"content\" of \"translation_updateParams\" not set") end end |