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



1257
1258
1259
# File 'lib/phraseapp-ruby.rb', line 1257

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

#excluded=(val) ⇒ Object



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

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

#plural_suffix=(val) ⇒ Object



1271
1272
1273
# File 'lib/phraseapp-ruby.rb', line 1271

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

#unverified=(val) ⇒ Object



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

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

#validateObject



1285
1286
1287
1288
1289
# File 'lib/phraseapp-ruby.rb', line 1285

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