Class: DeepL::Requests::Document::GetStatus
- Defined in:
- lib/deepl/requests/document/get_status.rb
Instance Attribute Summary collapse
-
#document_id ⇒ Object
readonly
Returns the value of attribute document_id.
-
#document_key ⇒ Object
readonly
Returns the value of attribute document_key.
Attributes inherited from Base
Instance Method Summary collapse
- #details ⇒ Object
-
#initialize(api, document_id, document_key, options = {}, additional_headers = {}) ⇒ GetStatus
constructor
A new instance of GetStatus.
- #request ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(api, document_id, document_key, options = {}, additional_headers = {}) ⇒ GetStatus
Returns a new instance of GetStatus.
12 13 14 15 16 |
# File 'lib/deepl/requests/document/get_status.rb', line 12 def initialize(api, document_id, document_key, = {}, additional_headers = {}) super(api, , additional_headers) @document_id = document_id @document_key = document_key end |
Instance Attribute Details
#document_id ⇒ Object (readonly)
Returns the value of attribute document_id.
10 11 12 |
# File 'lib/deepl/requests/document/get_status.rb', line 10 def document_id @document_id end |
#document_key ⇒ Object (readonly)
Returns the value of attribute document_key.
10 11 12 |
# File 'lib/deepl/requests/document/get_status.rb', line 10 def document_key @document_key end |
Instance Method Details
#details ⇒ Object
23 24 25 |
# File 'lib/deepl/requests/document/get_status.rb', line 23 def details "HTTP Headers: #{headers}\nPayload #{{ document_key: document_key }}" end |
#request ⇒ Object
18 19 20 21 |
# File 'lib/deepl/requests/document/get_status.rb', line 18 def request payload = { document_key: document_key } build_doc_translation_status(*execute_request_with_retries(post_request(payload))) end |
#to_s ⇒ Object
27 28 29 |
# File 'lib/deepl/requests/document/get_status.rb', line 27 def to_s "POST #{uri.request_uri}" end |