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. Must be specified if the key associated to the translation is pluralized.

unverified

Indicates whether translation is unverified. Part of the <a href=“phraseapp.com/docs/guides/working-with-phraseapp/verification-proofreading” target=“_blank”>Advanced Workflows</a> feature and only available in <a href=“phraseapp.com/pricing” target=“_blank”>Control Package</a>.

Instance Method Summary collapse

Instance Method Details

#content=(val) ⇒ Object



2184
2185
2186
# File 'lib/phraseapp-ruby.rb', line 2184

def content=(val)
  super(val)
end

#excluded=(val) ⇒ Object



2188
2189
2190
2191
2192
2193
2194
2195
2196
# File 'lib/phraseapp-ruby.rb', line 2188

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



2198
2199
2200
# File 'lib/phraseapp-ruby.rb', line 2198

def plural_suffix=(val)
  super(val)
end

#unverified=(val) ⇒ Object



2202
2203
2204
2205
2206
2207
2208
2209
2210
# File 'lib/phraseapp-ruby.rb', line 2202

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



2212
2213
2214
2215
2216
2217
# File 'lib/phraseapp-ruby.rb', line 2212

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