Class: Walinko::AsyncJob
- Inherits:
-
Object
- Object
- Walinko::AsyncJob
- Defined in:
- lib/walinko/result.rb
Overview
Returned by ‘client.messages.enqueue(…)` (async mode). Wraps the `data` block of a 202 Accepted response.
Instance Attribute Summary collapse
-
#idempotent_replayed ⇒ Object
readonly
Returns the value of attribute idempotent_replayed.
-
#rate_limit ⇒ Object
readonly
Returns the value of attribute rate_limit.
-
#request_id ⇒ Object
readonly
Returns the value of attribute request_id.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#status_url ⇒ Object
readonly
Returns the value of attribute status_url.
-
#tracking_id ⇒ Object
readonly
Returns the value of attribute tracking_id.
Instance Method Summary collapse
-
#initialize(data:, request_id:, rate_limit:, idempotent_replayed:) ⇒ AsyncJob
constructor
A new instance of AsyncJob.
- #queued? ⇒ Boolean
Constructor Details
#initialize(data:, request_id:, rate_limit:, idempotent_replayed:) ⇒ AsyncJob
Returns a new instance of AsyncJob.
48 49 50 51 52 53 54 55 |
# File 'lib/walinko/result.rb', line 48 def initialize(data:, request_id:, rate_limit:, idempotent_replayed:) @tracking_id = data['tracking_id'] @status = data['status'] @status_url = data['status_url'] @request_id = request_id @rate_limit = rate_limit @idempotent_replayed = idempotent_replayed end |
Instance Attribute Details
#idempotent_replayed ⇒ Object (readonly)
Returns the value of attribute idempotent_replayed.
45 46 47 |
# File 'lib/walinko/result.rb', line 45 def idempotent_replayed @idempotent_replayed end |
#rate_limit ⇒ Object (readonly)
Returns the value of attribute rate_limit.
45 46 47 |
# File 'lib/walinko/result.rb', line 45 def rate_limit @rate_limit end |
#request_id ⇒ Object (readonly)
Returns the value of attribute request_id.
45 46 47 |
# File 'lib/walinko/result.rb', line 45 def request_id @request_id end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
45 46 47 |
# File 'lib/walinko/result.rb', line 45 def status @status end |
#status_url ⇒ Object (readonly)
Returns the value of attribute status_url.
45 46 47 |
# File 'lib/walinko/result.rb', line 45 def status_url @status_url end |
#tracking_id ⇒ Object (readonly)
Returns the value of attribute tracking_id.
45 46 47 |
# File 'lib/walinko/result.rb', line 45 def tracking_id @tracking_id end |
Instance Method Details
#queued? ⇒ Boolean
57 58 59 |
# File 'lib/walinko/result.rb', line 57 def queued? status == 'queued' end |