Class: PhraseApp::RequestParams::JobParams
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- PhraseApp::RequestParams::JobParams
- Defined in:
- lib/phraseapp-ruby.rb
Overview
JobParams
Parameters:
- branch
-
specify the branch to use
- briefing
-
Briefing for the translators
- due_date
-
Date the job should be finished
- name
-
Job name
- tags
-
tags of keys that should be included within the job
- translation_key_ids
-
ids of keys that should be included within the job
Instance Method Summary collapse
- #branch=(val) ⇒ Object
- #briefing=(val) ⇒ Object
- #due_date=(val) ⇒ Object
- #name=(val) ⇒ Object
- #tags=(val) ⇒ Object
- #translation_key_ids=(val) ⇒ Object
- #validate ⇒ Object
Instance Method Details
#branch=(val) ⇒ Object
824 825 826 |
# File 'lib/phraseapp-ruby.rb', line 824 def branch=(val) super(val) end |
#briefing=(val) ⇒ Object
828 829 830 |
# File 'lib/phraseapp-ruby.rb', line 828 def briefing=(val) super(val) end |
#due_date=(val) ⇒ Object
832 833 834 |
# File 'lib/phraseapp-ruby.rb', line 832 def due_date=(val) super(DateTime.parse(val)) end |
#name=(val) ⇒ Object
836 837 838 |
# File 'lib/phraseapp-ruby.rb', line 836 def name=(val) super(val) end |
#tags=(val) ⇒ Object
840 841 842 |
# File 'lib/phraseapp-ruby.rb', line 840 def (val) super(val.split(',')) end |
#translation_key_ids=(val) ⇒ Object
844 845 846 |
# File 'lib/phraseapp-ruby.rb', line 844 def translation_key_ids=(val) super(val.split(',')) end |
#validate ⇒ Object
848 849 850 851 852 853 854 855 856 857 858 859 |
# File 'lib/phraseapp-ruby.rb', line 848 def validate if name == nil || name == "" raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"name\" of \"JobParams\" not set") end if == nil raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"tags\" of \"JobParams\" not set") end if translation_key_ids == nil raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"translation_key_ids\" of \"JobParams\" not set") end end |