Class: PhraseApp::RequestParams::TranslationParams
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- PhraseApp::RequestParams::TranslationParams
- Defined in:
- lib/phraseapp-ruby.rb
Overview
TranslationParams
Parameters:
- content
-
Translation content
- excluded
-
Indicates whether translation is excluded.
- key_id
-
Key
- locale_id
-
Locale. Can be the name or public id of the locale. Preferred is the public id.
- plural_suffix
-
Plural suffix. Can be one of: zero, one, two, few, many, other. Must be specified if the key associated to the translation is pluralized.
- unverified
-
Indicates whether translation is unverified. Part of the <a href=“phraseapp.com/docs/guides/working-with-phraseapp/verification-proofreading” target=“_blank”>Advanced Workflows</a> feature and only available in <a href=“phraseapp.com/pricing” target=“_blank”>Control Package</a>.
Instance Method Summary collapse
- #content=(val) ⇒ Object
- #excluded=(val) ⇒ Object
- #key_id=(val) ⇒ Object
- #locale_id=(val) ⇒ Object
- #plural_suffix=(val) ⇒ Object
- #unverified=(val) ⇒ Object
- #validate ⇒ Object
Instance Method Details
#content=(val) ⇒ Object
1307 1308 1309 |
# File 'lib/phraseapp-ruby.rb', line 1307 def content=(val) super(val) end |
#excluded=(val) ⇒ Object
1311 1312 1313 1314 1315 1316 1317 1318 1319 |
# File 'lib/phraseapp-ruby.rb', line 1311 def excluded=(val) if val.is_a?(TrueClass) super(true) elsif val.is_a?(FalseClass) return else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#key_id=(val) ⇒ Object
1321 1322 1323 |
# File 'lib/phraseapp-ruby.rb', line 1321 def key_id=(val) super(val) end |
#locale_id=(val) ⇒ Object
1325 1326 1327 |
# File 'lib/phraseapp-ruby.rb', line 1325 def locale_id=(val) super(val) end |
#plural_suffix=(val) ⇒ Object
1329 1330 1331 |
# File 'lib/phraseapp-ruby.rb', line 1329 def plural_suffix=(val) super(val) end |
#unverified=(val) ⇒ Object
1333 1334 1335 1336 1337 1338 1339 1340 1341 |
# File 'lib/phraseapp-ruby.rb', line 1333 def unverified=(val) if val.is_a?(TrueClass) super(true) elsif val.is_a?(FalseClass) return else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#validate ⇒ Object
1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 |
# File 'lib/phraseapp-ruby.rb', line 1343 def validate if content == nil || content == "" raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"content\" of \"TranslationParams\" not set") end if key_id == nil raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"key_id\" of \"TranslationParams\" not set") end if locale_id == nil raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"locale_id\" of \"TranslationParams\" not set") end end |