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=“phraseapp.com/docs/guides/formats/”>Format Guide</a> or our <a href=“#formats”>Formats API Endpoint</a>.
- name
-
Name of the project
- project_image
-
Image to identify the project
- remove_project_image
-
Indicates whether the project image should be deleted.
- 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
- #project_image=(val) ⇒ Object
- #remove_project_image=(val) ⇒ Object
- #shares_translation_memory=(val) ⇒ Object
- #validate ⇒ Object
Instance Method Details
#account_id=(val) ⇒ Object
1127 1128 1129 |
# File 'lib/phraseapp-ruby.rb', line 1127 def account_id=(val) super(val) end |
#main_format=(val) ⇒ Object
1131 1132 1133 |
# File 'lib/phraseapp-ruby.rb', line 1131 def main_format=(val) super(val) end |
#name=(val) ⇒ Object
1135 1136 1137 |
# File 'lib/phraseapp-ruby.rb', line 1135 def name=(val) super(val) end |
#project_image=(val) ⇒ Object
1139 1140 1141 |
# File 'lib/phraseapp-ruby.rb', line 1139 def project_image=(val) super(val) end |
#remove_project_image=(val) ⇒ Object
1143 1144 1145 1146 1147 1148 1149 1150 1151 |
# File 'lib/phraseapp-ruby.rb', line 1143 def remove_project_image=(val) if val.is_a?(TrueClass) super(true) elsif val.is_a?(FalseClass) return else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#shares_translation_memory=(val) ⇒ Object
1153 1154 1155 1156 1157 1158 1159 1160 1161 |
# File 'lib/phraseapp-ruby.rb', line 1153 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
1163 1164 1165 1166 1167 1168 |
# File 'lib/phraseapp-ruby.rb', line 1163 def validate if name == nil || name == "" raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"name\" of \"ProjectParams\" not set") end end |