Class: DeepL::Resources::TranslationMemoryExport
- Defined in:
- lib/deepl/resources/translation_memory_export.rb
Overview
A translation memory export job. Poll the job until it is finished to obtain the download URL of the exported TMX file.
Instance Attribute Summary collapse
-
#job_id ⇒ Object
readonly
Returns the value of attribute job_id.
-
#translation_memory_id ⇒ Object
readonly
Returns the value of attribute translation_memory_id.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(translation_memory_export, reused_existing, *args) ⇒ TranslationMemoryExport
constructor
A new instance of TranslationMemoryExport.
-
#reused_existing? ⇒ true
Checks if the API reused a previously completed export instead of starting a new one.
- #to_s ⇒ Object
Constructor Details
#initialize(translation_memory_export, reused_existing, *args) ⇒ TranslationMemoryExport
Returns a new instance of TranslationMemoryExport.
15 16 17 18 19 20 21 |
# File 'lib/deepl/resources/translation_memory_export.rb', line 15 def initialize(translation_memory_export, reused_existing, *args) super(*args) parameters = translation_memory_export['parameters'] || {} @job_id = translation_memory_export['job_id'] @translation_memory_id = parameters['translation_memory_id'] @reused_existing = reused_existing end |
Instance Attribute Details
#job_id ⇒ Object (readonly)
Returns the value of attribute job_id.
13 14 15 |
# File 'lib/deepl/resources/translation_memory_export.rb', line 13 def job_id @job_id end |
#translation_memory_id ⇒ Object (readonly)
Returns the value of attribute translation_memory_id.
13 14 15 |
# File 'lib/deepl/resources/translation_memory_export.rb', line 13 def translation_memory_id @translation_memory_id end |
Instance Method Details
#reused_existing? ⇒ true
Checks if the API reused a previously completed export instead of starting a new one.
28 29 30 |
# File 'lib/deepl/resources/translation_memory_export.rb', line 28 def reused_existing? @reused_existing end |
#to_s ⇒ Object
32 33 34 |
# File 'lib/deepl/resources/translation_memory_export.rb', line 32 def to_s "TranslationMemoryExport: ID: #{job_id}" end |