Class: Apiddress::BatchAcceptedResponse

Inherits:
Data
  • Object
show all
Defined in:
lib/apiddress/models.rb

Overview

Returned when an asynchronous batch job is accepted (HTTP 202).

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#batch_idObject (readonly)

Returns the value of attribute batch_id

Returns:

  • (Object)

    the current value of batch_id



85
86
87
# File 'lib/apiddress/models.rb', line 85

def batch_id
  @batch_id
end

#created_atObject (readonly)

Returns the value of attribute created_at

Returns:

  • (Object)

    the current value of created_at



85
86
87
# File 'lib/apiddress/models.rb', line 85

def created_at
  @created_at
end

#statusObject (readonly)

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



85
86
87
# File 'lib/apiddress/models.rb', line 85

def status
  @status
end

#submitted_countObject (readonly)

Returns the value of attribute submitted_count

Returns:

  • (Object)

    the current value of submitted_count



85
86
87
# File 'lib/apiddress/models.rb', line 85

def 
  @submitted_count
end

Class Method Details

.from_hash(data) ⇒ Object



92
93
94
95
96
97
98
99
# File 'lib/apiddress/models.rb', line 92

def self.from_hash(data)
  new(
    batch_id:        data["batch_id"],
    status:          data["status"],
    submitted_count: data["submitted_count"].to_i,
    created_at:      data["created_at"],
  )
end