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



1424
1425
1426
# File 'lib/phraseapp-ruby.rb', line 1424

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

#excluded=(val) ⇒ Object



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

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



1438
1439
1440
# File 'lib/phraseapp-ruby.rb', line 1438

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

#to_hObject



1458
1459
1460
# File 'lib/phraseapp-ruby.rb', line 1458

def to_h
  @table.dup
end

#unverified=(val) ⇒ Object



1442
1443
1444
1445
1446
1447
1448
1449
1450
# File 'lib/phraseapp-ruby.rb', line 1442

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



1452
1453
1454
1455
1456
# File 'lib/phraseapp-ruby.rb', line 1452

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