Class: PhraseApp::RequestParams::TranslationOrderParams
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- PhraseApp::RequestParams::TranslationOrderParams
- Defined in:
- lib/phraseapp-ruby.rb
Overview
TranslationOrderParams
Parameters:
- category
-
category
- include_untranslated_keys
-
include_untranslated_keys
- include_unverified_translations
-
include_unverified_translations
- lsp
-
lsp
- message
-
message
- priority
-
priority
- quality
-
quality
- source_locale_id
-
source_locale_id
- styleguide_id
-
styleguide_id
- tag
-
tag
- target_locale_ids
-
target_locale_ids
- translation_type
-
translation_type
- unverify_translations_upon_delivery
-
unverify_translations_upon_delivery
Instance Method Summary collapse
- #category=(val) ⇒ Object
- #include_untranslated_keys=(val) ⇒ Object
- #include_unverified_translations=(val) ⇒ Object
- #lsp=(val) ⇒ Object
- #message=(val) ⇒ Object
- #priority=(val) ⇒ Object
- #quality=(val) ⇒ Object
- #source_locale_id=(val) ⇒ Object
- #styleguide_id=(val) ⇒ Object
- #tag=(val) ⇒ Object
- #target_locale_ids=(val) ⇒ Object
- #translation_type=(val) ⇒ Object
- #unverify_translations_upon_delivery=(val) ⇒ Object
- #validate ⇒ Object
Instance Method Details
#category=(val) ⇒ Object
584 585 586 |
# File 'lib/phraseapp-ruby.rb', line 584 def category=(val) self.category = val end |
#include_untranslated_keys=(val) ⇒ Object
588 589 590 591 592 593 594 595 596 |
# File 'lib/phraseapp-ruby.rb', line 588 def include_untranslated_keys=(val) if val == "true" self.include_untranslated_keys = true elsif val == "false" #ignore self.include_untranslated_keys = b else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#include_unverified_translations=(val) ⇒ Object
598 599 600 601 602 603 604 605 606 |
# File 'lib/phraseapp-ruby.rb', line 598 def include_unverified_translations=(val) if val == "true" self.include_unverified_translations = true elsif val == "false" #ignore self.include_unverified_translations = b else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#lsp=(val) ⇒ Object
608 609 610 |
# File 'lib/phraseapp-ruby.rb', line 608 def lsp=(val) self.lsp = val end |
#message=(val) ⇒ Object
612 613 614 |
# File 'lib/phraseapp-ruby.rb', line 612 def (val) self. = val end |
#priority=(val) ⇒ Object
616 617 618 619 620 621 622 623 624 |
# File 'lib/phraseapp-ruby.rb', line 616 def priority=(val) if val == "true" self.priority = true elsif val == "false" #ignore self.priority = b else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#quality=(val) ⇒ Object
626 627 628 629 630 631 632 633 634 |
# File 'lib/phraseapp-ruby.rb', line 626 def quality=(val) if val == "true" self.quality = true elsif val == "false" #ignore self.quality = b else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#source_locale_id=(val) ⇒ Object
636 637 638 |
# File 'lib/phraseapp-ruby.rb', line 636 def source_locale_id=(val) self.source_locale_id = val end |
#styleguide_id=(val) ⇒ Object
640 641 642 |
# File 'lib/phraseapp-ruby.rb', line 640 def styleguide_id=(val) self.styleguide_id = val end |
#tag=(val) ⇒ Object
644 645 646 |
# File 'lib/phraseapp-ruby.rb', line 644 def tag=(val) self.tag = val end |
#target_locale_ids=(val) ⇒ Object
648 649 650 |
# File 'lib/phraseapp-ruby.rb', line 648 def target_locale_ids=(val) self.target_locale_ids = val.split(',') end |
#translation_type=(val) ⇒ Object
652 653 654 |
# File 'lib/phraseapp-ruby.rb', line 652 def translation_type=(val) self.translation_type = val end |
#unverify_translations_upon_delivery=(val) ⇒ Object
656 657 658 659 660 661 662 663 664 |
# File 'lib/phraseapp-ruby.rb', line 656 def unverify_translations_upon_delivery=(val) if val == "true" self.unverify_translations_upon_delivery = true elsif val == "false" #ignore self.unverify_translations_upon_delivery = b else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#validate ⇒ Object
666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'lib/phraseapp-ruby.rb', line 666 def validate if self.category == nil || self.category == "" raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"category\" of \"TranslationOrderParams\" not set") endif self.lsp == nil || self.lsp == "" raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"lsp\" of \"TranslationOrderParams\" not set") endif self.source_locale_id == nil raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"source_locale_id\" of \"TranslationOrderParams\" not set") endif self.target_locale_ids == nil raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"target_locale_ids\" of \"TranslationOrderParams\" not set") endif self.translation_type == nil || self.translation_type == "" raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"translation_type\" of \"TranslationOrderParams\" not set") end end |