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
1275 1276 1277 |
# File 'lib/phraseapp-ruby.rb', line 1275 def content=(val) self.content = val end |
#excluded=(val) ⇒ Object
1279 1280 1281 1282 1283 1284 1285 1286 1287 |
# File 'lib/phraseapp-ruby.rb', line 1279 def excluded=(val) if val.is_a?(TrueClass) self.excluded = true elsif val.is_a?(FalseClass) #ignore self.excluded = b else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#plural_suffix=(val) ⇒ Object
1289 1290 1291 |
# File 'lib/phraseapp-ruby.rb', line 1289 def plural_suffix=(val) self.plural_suffix = val end |
#unverified=(val) ⇒ Object
1293 1294 1295 1296 1297 1298 1299 1300 1301 |
# File 'lib/phraseapp-ruby.rb', line 1293 def unverified=(val) if val.is_a?(TrueClass) self.unverified = true elsif val.is_a?(FalseClass) #ignore self.unverified = b else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#validate ⇒ Object
1303 1304 1305 1306 1307 |
# File 'lib/phraseapp-ruby.rb', line 1303 def validate if self.content == nil || self.content == "" raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"content\" of \"translation_updateParams\" not set") end end |