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
1583 1584 1585 |
# File 'lib/phraseapp-ruby.rb', line 1583 def content=(val) super(val) end |
#excluded=(val) ⇒ Object
1587 1588 1589 1590 1591 1592 1593 1594 1595 |
# File 'lib/phraseapp-ruby.rb', line 1587 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 |
#plural_suffix=(val) ⇒ Object
1597 1598 1599 |
# File 'lib/phraseapp-ruby.rb', line 1597 def plural_suffix=(val) super(val) end |
#unverified=(val) ⇒ Object
1601 1602 1603 1604 1605 1606 1607 1608 1609 |
# File 'lib/phraseapp-ruby.rb', line 1601 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
1611 1612 1613 1614 1615 1616 |
# File 'lib/phraseapp-ruby.rb', line 1611 def validate if content == nil || content == "" raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"content\" of \"translation_updateParams\" not set") end end |