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
1728 1729 1730 |
# File 'lib/phraseapp-ruby.rb', line 1728 def content=(val) super(val) end |
#excluded=(val) ⇒ Object
1732 1733 1734 1735 1736 1737 1738 1739 1740 |
# File 'lib/phraseapp-ruby.rb', line 1732 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
1742 1743 1744 |
# File 'lib/phraseapp-ruby.rb', line 1742 def plural_suffix=(val) super(val) end |
#unverified=(val) ⇒ Object
1746 1747 1748 1749 1750 1751 1752 1753 1754 |
# File 'lib/phraseapp-ruby.rb', line 1746 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
1756 1757 1758 1759 1760 1761 |
# File 'lib/phraseapp-ruby.rb', line 1756 def validate if content == nil || content == "" raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"content\" of \"translation_updateParams\" not set") end end |