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=“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

Instance Method Details

#account_id=(val) ⇒ Object



1032
1033
1034
# File 'lib/phraseapp-ruby.rb', line 1032

def (val)
  super(val)
end

#main_format=(val) ⇒ Object



1036
1037
1038
# File 'lib/phraseapp-ruby.rb', line 1036

def main_format=(val)
  super(val)
end

#name=(val) ⇒ Object



1040
1041
1042
# File 'lib/phraseapp-ruby.rb', line 1040

def name=(val)
  super(val)
end

#shares_translation_memory=(val) ⇒ Object



1044
1045
1046
1047
1048
1049
1050
1051
1052
# File 'lib/phraseapp-ruby.rb', line 1044

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



1054
1055
1056
1057
1058
1059
# File 'lib/phraseapp-ruby.rb', line 1054

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