Class: Apiddress::BatchStatusResponse
- Inherits:
-
Data
- Object
- Data
- Apiddress::BatchStatusResponse
- Defined in:
- lib/apiddress/models.rb
Overview
Current state of an asynchronous batch job.
Instance Attribute Summary collapse
-
#batch_id ⇒ Object
readonly
Returns the value of attribute batch_id.
-
#completed_at ⇒ Object
readonly
Returns the value of attribute completed_at.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#processed_count ⇒ Object
readonly
Returns the value of attribute processed_count.
-
#results ⇒ Object
readonly
Returns the value of attribute results.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#submitted_count ⇒ Object
readonly
Returns the value of attribute submitted_count.
Class Method Summary collapse
Instance Attribute Details
#batch_id ⇒ Object (readonly)
Returns the value of attribute batch_id
103 104 105 |
# File 'lib/apiddress/models.rb', line 103 def batch_id @batch_id end |
#completed_at ⇒ Object (readonly)
Returns the value of attribute completed_at
103 104 105 |
# File 'lib/apiddress/models.rb', line 103 def completed_at @completed_at end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at
103 104 105 |
# File 'lib/apiddress/models.rb', line 103 def created_at @created_at end |
#processed_count ⇒ Object (readonly)
Returns the value of attribute processed_count
103 104 105 |
# File 'lib/apiddress/models.rb', line 103 def processed_count @processed_count end |
#results ⇒ Object (readonly)
Returns the value of attribute results
103 104 105 |
# File 'lib/apiddress/models.rb', line 103 def results @results end |
#status ⇒ Object (readonly)
Returns the value of attribute status
103 104 105 |
# File 'lib/apiddress/models.rb', line 103 def status @status end |
#submitted_count ⇒ Object (readonly)
Returns the value of attribute submitted_count
103 104 105 |
# File 'lib/apiddress/models.rb', line 103 def submitted_count @submitted_count end |
Class Method Details
.from_hash(data) ⇒ Object
114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/apiddress/models.rb', line 114 def self.from_hash(data) raw_results = data["results"] new( batch_id: data["batch_id"], status: data["status"], submitted_count: data["submitted_count"].to_i, processed_count: data["processed_count"].to_i, created_at: data["created_at"], completed_at: data["completed_at"], results: raw_results.nil? ? nil : raw_results.map { |item| ValidateEmailResponse.from_hash(item) }, ) end |