Class: PhraseApp::RequestParams::UploadParams
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- PhraseApp::RequestParams::UploadParams
- Defined in:
- lib/phraseapp-ruby.rb
Overview
UploadParams
Parameters:
- autotranslate
-
If set, translations for the uploaded language will be fetched automatically.
- branch
-
specify the branch to use
- convert_emoji
-
Indicates whether the file contains Emoji symbols that should be converted. <a href=“phraseapp.com/docs/guides/working-with-phraseapp/emoji-support/”>Working with Emojis</a>.
- file
-
File to be imported
- file_encoding
-
Enforces a specific encoding on the file contents. Valid options are “UTF-8”, “UTF-16” and “ISO-8859-1”.
- file_format
-
File format. Auto-detected when possible and not specified.
- format_options
-
Additional options available for specific formats. See our format guide for complete list.
- locale_id
-
Locale of the file’s content. Can be the name or public id of the locale. Preferred is the public id.
- locale_mapping
-
Optional, format specific mapping between locale names and the columns the translations to those locales are contained in.
- skip_unverification
-
Indicates whether the upload should unverify updated translations.
- skip_upload_tags
-
Indicates whether the upload should not create upload tags.
- tags
-
List of tags separated by comma to be associated with the new keys contained in the upload.
- update_descriptions
-
Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions.
- update_translations
-
Indicates whether existing translations should be updated with the file content.
Instance Method Summary collapse
- #autotranslate=(val) ⇒ Object
- #branch=(val) ⇒ Object
- #convert_emoji=(val) ⇒ Object
- #file=(val) ⇒ Object
- #file_encoding=(val) ⇒ Object
- #file_format=(val) ⇒ Object
- #format_options=(val) ⇒ Object
- #locale_id=(val) ⇒ Object
- #locale_mapping=(val) ⇒ Object
- #skip_unverification=(val) ⇒ Object
- #skip_upload_tags=(val) ⇒ Object
- #tags=(val) ⇒ Object
- #update_descriptions=(val) ⇒ Object
- #update_translations=(val) ⇒ Object
- #validate ⇒ Object
Instance Method Details
#autotranslate=(val) ⇒ Object
1393 1394 1395 1396 1397 1398 1399 1400 1401 |
# File 'lib/phraseapp-ruby.rb', line 1393 def autotranslate=(val) if val.is_a?(TrueClass) super(true) elsif val.is_a?(FalseClass) return else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#branch=(val) ⇒ Object
1403 1404 1405 |
# File 'lib/phraseapp-ruby.rb', line 1403 def branch=(val) super(val) end |
#convert_emoji=(val) ⇒ Object
1407 1408 1409 1410 1411 1412 1413 1414 1415 |
# File 'lib/phraseapp-ruby.rb', line 1407 def convert_emoji=(val) if val.is_a?(TrueClass) super(true) elsif val.is_a?(FalseClass) return else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#file=(val) ⇒ Object
1417 1418 1419 |
# File 'lib/phraseapp-ruby.rb', line 1417 def file=(val) super(val) end |
#file_encoding=(val) ⇒ Object
1421 1422 1423 |
# File 'lib/phraseapp-ruby.rb', line 1421 def file_encoding=(val) super(val) end |
#file_format=(val) ⇒ Object
1425 1426 1427 |
# File 'lib/phraseapp-ruby.rb', line 1425 def file_format=(val) super(val) end |
#format_options=(val) ⇒ Object
1429 1430 1431 |
# File 'lib/phraseapp-ruby.rb', line 1429 def (val) super(JSON.load(val)) end |
#locale_id=(val) ⇒ Object
1433 1434 1435 |
# File 'lib/phraseapp-ruby.rb', line 1433 def locale_id=(val) super(val) end |
#locale_mapping=(val) ⇒ Object
1437 1438 1439 |
# File 'lib/phraseapp-ruby.rb', line 1437 def locale_mapping=(val) super(JSON.load(val)) end |
#skip_unverification=(val) ⇒ Object
1441 1442 1443 1444 1445 1446 1447 1448 1449 |
# File 'lib/phraseapp-ruby.rb', line 1441 def skip_unverification=(val) if val.is_a?(TrueClass) super(true) elsif val.is_a?(FalseClass) return else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#skip_upload_tags=(val) ⇒ Object
1451 1452 1453 1454 1455 1456 1457 1458 1459 |
# File 'lib/phraseapp-ruby.rb', line 1451 def (val) if val.is_a?(TrueClass) super(true) elsif val.is_a?(FalseClass) return else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#tags=(val) ⇒ Object
1461 1462 1463 |
# File 'lib/phraseapp-ruby.rb', line 1461 def (val) super(val) end |
#update_descriptions=(val) ⇒ Object
1465 1466 1467 1468 1469 1470 1471 1472 1473 |
# File 'lib/phraseapp-ruby.rb', line 1465 def update_descriptions=(val) if val.is_a?(TrueClass) super(true) elsif val.is_a?(FalseClass) return else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#update_translations=(val) ⇒ Object
1475 1476 1477 1478 1479 1480 1481 1482 1483 |
# File 'lib/phraseapp-ruby.rb', line 1475 def update_translations=(val) if val.is_a?(TrueClass) super(true) elsif val.is_a?(FalseClass) return else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#validate ⇒ Object
1485 1486 1487 1488 1489 1490 |
# File 'lib/phraseapp-ruby.rb', line 1485 def validate if file == nil raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"file\" of \"UploadParams\" not set") end end |