Class: DeepL::Requests::TranslationMemory::CreateImport
- Defined in:
- lib/deepl/requests/translation_memory/create_import.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary collapse
-
#content_length ⇒ Object
readonly
Returns the value of attribute content_length.
-
#file_name ⇒ Object
readonly
Returns the value of attribute file_name.
Attributes inherited from Base
Instance Method Summary collapse
- #details ⇒ Object
-
#initialize(api, file_name, content_length, options = {}, additional_headers = {}) ⇒ CreateImport
constructor
A new instance of CreateImport.
- #request ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(api, file_name, content_length, options = {}, additional_headers = {}) ⇒ CreateImport
Returns a new instance of CreateImport.
12 13 14 15 16 17 18 |
# File 'lib/deepl/requests/translation_memory/create_import.rb', line 12 def initialize(api, file_name, content_length, = {}, additional_headers = {}) super(api, , additional_headers) @file_name = file_name @content_length = content_length @content_type = delete_option(:content_type) @display_name = delete_option(:display_name) end |
Instance Attribute Details
#content_length ⇒ Object (readonly)
Returns the value of attribute content_length.
10 11 12 |
# File 'lib/deepl/requests/translation_memory/create_import.rb', line 10 def content_length @content_length end |
#file_name ⇒ Object (readonly)
Returns the value of attribute file_name.
10 11 12 |
# File 'lib/deepl/requests/translation_memory/create_import.rb', line 10 def file_name @file_name end |
Instance Method Details
#details ⇒ Object
24 25 26 |
# File 'lib/deepl/requests/translation_memory/create_import.rb', line 24 def details "HTTP Headers: #{headers}\nPayload #{payload}" end |
#request ⇒ Object
20 21 22 |
# File 'lib/deepl/requests/translation_memory/create_import.rb', line 20 def request build_translation_memory_import(*execute_request_with_retries(post_request(payload))) end |
#to_s ⇒ Object
28 29 30 |
# File 'lib/deepl/requests/translation_memory/create_import.rb', line 28 def to_s "POST #{uri.request_uri}" end |