Class: PhraseApp::RequestParams::ProjectParams

Inherits:
OpenStruct
  • Object
show all
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=“help.phraseapp.com/what-is-phraseapp/supported-platforms-and-formats/supported-platforms-and-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

Instance Method Details

#account_id=(val) ⇒ Object



1269
1270
1271
# File 'lib/phraseapp-ruby.rb', line 1269

def (val)
  super(val)
end

#main_format=(val) ⇒ Object



1273
1274
1275
# File 'lib/phraseapp-ruby.rb', line 1273

def main_format=(val)
  super(val)
end

#name=(val) ⇒ Object



1277
1278
1279
# File 'lib/phraseapp-ruby.rb', line 1277

def name=(val)
  super(val)
end

#project_image=(val) ⇒ Object



1281
1282
1283
# File 'lib/phraseapp-ruby.rb', line 1281

def project_image=(val)
  super(val)
end

#remove_project_image=(val) ⇒ Object



1285
1286
1287
1288
1289
1290
1291
1292
1293
# File 'lib/phraseapp-ruby.rb', line 1285

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



1295
1296
1297
1298
1299
1300
1301
1302
1303
# File 'lib/phraseapp-ruby.rb', line 1295

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

#validateObject



1305
1306
1307
1308
1309
1310
# File 'lib/phraseapp-ruby.rb', line 1305

def validate
  
  if name == nil || name == "" 
    raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"name\" of \"ProjectParams\" not set")
  end
end