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



1259
1260
1261
# File 'lib/phraseapp-ruby.rb', line 1259

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

#excluded=(val) ⇒ Object



1263
1264
1265
1266
1267
1268
1269
1270
1271
# File 'lib/phraseapp-ruby.rb', line 1263

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



1273
1274
1275
# File 'lib/phraseapp-ruby.rb', line 1273

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

#unverified=(val) ⇒ Object



1277
1278
1279
1280
1281
1282
1283
1284
1285
# File 'lib/phraseapp-ruby.rb', line 1277

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



1287
1288
1289
1290
1291
# File 'lib/phraseapp-ruby.rb', line 1287

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