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
920 921 922 |
# File 'lib/phraseapp-ruby.rb', line 920 def account_id=(val) super(val) end |
#main_format=(val) ⇒ Object
924 925 926 |
# File 'lib/phraseapp-ruby.rb', line 924 def main_format=(val) super(val) end |
#name=(val) ⇒ Object
928 929 930 |
# File 'lib/phraseapp-ruby.rb', line 928 def name=(val) super(val) end |
#shares_translation_memory=(val) ⇒ Object
932 933 934 935 936 937 938 939 940 |
# File 'lib/phraseapp-ruby.rb', line 932 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
942 943 944 945 946 947 |
# File 'lib/phraseapp-ruby.rb', line 942 def validate if name == nil || name == "" raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"name\" of \"ProjectParams\" not set") end end |