Class: PhraseApp::RequestParams::ProjectParams

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/phraseapp-ruby.rb

Overview

ProjectParams

Parameters:

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

#name=(val) ⇒ Object



699
700
701
# File 'lib/phraseapp-ruby.rb', line 699

def name=(val)
  self.name = val
end

#shares_translation_memory=(val) ⇒ Object



703
704
705
706
707
708
709
710
711
# File 'lib/phraseapp-ruby.rb', line 703

def shares_translation_memory=(val)
  if val == "true"
    self.shares_translation_memory = true
  elsif val == "false" #ignore
    self.shares_translation_memory = b
  else
    PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
  end
end

#validateObject



713
714
715
716
717
# File 'lib/phraseapp-ruby.rb', line 713

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