Class: PhraseApp::RequestParams::TranslationUpdateParams

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

Overview

TranslationUpdateParams

Parameters:

content

Translation content

excluded

Indicates whether translation is excluded.

plural_suffix

Plural suffix. Can be one of: zero, one, two, few, many, other.

unverified

Indicates whether translation is unverified.

Instance Method Summary collapse

Instance Method Details

#content=(val) ⇒ Object



1412
1413
1414
# File 'lib/phraseapp-ruby.rb', line 1412

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

#excluded=(val) ⇒ Object



1416
1417
1418
1419
1420
1421
1422
1423
1424
# File 'lib/phraseapp-ruby.rb', line 1416

def excluded=(val)
  if val.is_a?(TrueClass)
    self.excluded = true
  elsif val.is_a?(FalseClass) #ignore
    self.excluded = b
  else
    PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
  end
end

#plural_suffix=(val) ⇒ Object



1426
1427
1428
# File 'lib/phraseapp-ruby.rb', line 1426

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

#to_hObject



1446
1447
1448
# File 'lib/phraseapp-ruby.rb', line 1446

def to_h
  @table.dup
end

#unverified=(val) ⇒ Object



1430
1431
1432
1433
1434
1435
1436
1437
1438
# File 'lib/phraseapp-ruby.rb', line 1430

def unverified=(val)
  if val.is_a?(TrueClass)
    self.unverified = true
  elsif val.is_a?(FalseClass) #ignore
    self.unverified = b
  else
    PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
  end
end

#validateObject



1440
1441
1442
1443
1444
# File 'lib/phraseapp-ruby.rb', line 1440

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