Class: PhraseApp::RequestParams::ProjectParams
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- PhraseApp::RequestParams::ProjectParams
- Defined in:
- lib/phraseapp-ruby.rb
Overview
ProjectParams
Parameters:
- account_id
-
Account ID to specify the actual account the project should be created in. Required if the requesting user is a member of multiple accounts.
- main_format
-
Main file format specified by its API Extension name. Used for locale downloads if no format is specified. For API Extension names of available file formats see <a href=“guides/formats/”>Format Guide</a> or our <a href=“api.phraseapp.com/api/v2/formats”>Formats API Endpoint</a>.
- name
-
Name of the project
- shares_translation_memory
-
Indicates whether the project should share the account’s translation memory
Instance Method Summary collapse
- #account_id=(val) ⇒ Object
- #main_format=(val) ⇒ Object
- #name=(val) ⇒ Object
- #shares_translation_memory=(val) ⇒ Object
- #validate ⇒ Object
Instance Method Details
#account_id=(val) ⇒ Object
787 788 789 |
# File 'lib/phraseapp-ruby.rb', line 787 def account_id=(val) super(val) end |
#main_format=(val) ⇒ Object
791 792 793 |
# File 'lib/phraseapp-ruby.rb', line 791 def main_format=(val) super(val) end |
#name=(val) ⇒ Object
795 796 797 |
# File 'lib/phraseapp-ruby.rb', line 795 def name=(val) super(val) end |
#shares_translation_memory=(val) ⇒ Object
799 800 801 802 803 804 805 806 807 |
# File 'lib/phraseapp-ruby.rb', line 799 def shares_translation_memory=(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
809 810 811 812 813 814 |
# File 'lib/phraseapp-ruby.rb', line 809 def validate if name == nil || name == "" raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"name\" of \"ProjectParams\" not set") end end |