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



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

def content=(val)
  super(val)
end

#excluded=(val) ⇒ Object



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

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

#plural_suffix=(val) ⇒ Object



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

def plural_suffix=(val)
  super(val)
end

#unverified=(val) ⇒ Object



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

def unverified=(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



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

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