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



1958
1959
1960
# File 'lib/phraseapp-ruby.rb', line 1958

def content=(val)
  super(val)
end

#excluded=(val) ⇒ Object



1962
1963
1964
1965
1966
1967
1968
1969
1970
# File 'lib/phraseapp-ruby.rb', line 1962

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



1972
1973
1974
# File 'lib/phraseapp-ruby.rb', line 1972

def plural_suffix=(val)
  super(val)
end

#unverified=(val) ⇒ Object



1976
1977
1978
1979
1980
1981
1982
1983
1984
# File 'lib/phraseapp-ruby.rb', line 1976

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



1986
1987
1988
1989
1990
1991
# File 'lib/phraseapp-ruby.rb', line 1986

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