Class: Postio::Models::Meta

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

Overview

Meta — response envelope metadata for every endpoint except /connect.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#count_resultsObject (readonly)

Returns the value of attribute count_results

Returns:

  • (Object)

    the current value of count_results



13
14
15
# File 'lib/postio/models.rb', line 13

def count_results
  @count_results
end

#performanceObject (readonly)

Returns the value of attribute performance

Returns:

  • (Object)

    the current value of performance



13
14
15
# File 'lib/postio/models.rb', line 13

def performance
  @performance
end

#request_idObject (readonly)

Returns the value of attribute request_id

Returns:

  • (Object)

    the current value of request_id



13
14
15
# File 'lib/postio/models.rb', line 13

def request_id
  @request_id
end

Class Method Details

.from_hash(h) ⇒ Object



14
15
16
17
18
19
20
# File 'lib/postio/models.rb', line 14

def self.from_hash(h)
  new(
    count_results: h["countResults"].to_i,
    request_id:    h["requestId"].to_s,
    performance:   Performance.from_hash(h["performance"])
  )
end