Class: Xolphin::Api::Responses::Certificates

Inherits:
Base
  • Object
show all
Defined in:
lib/xolphin/api/responses/certificates.rb

Instance Method Summary collapse

Methods inherited from Base

#_embedded, #error?, #errors, #limit, #message, #page, #pages, #total

Constructor Details

#initialize(data) ⇒ Certificates

Returns a new instance of Certificates.



5
6
7
# File 'lib/xolphin/api/responses/certificates.rb', line 5

def initialize(data)
  super(data)
end

Instance Method Details

#certificatesObject



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/xolphin/api/responses/certificates.rb', line 9

def certificates
  @certificates ||= begin
    certificates = []

    if _embedded && _embedded["certificates"]
      _embedded["certificates"].each do |certificate|
        certificates << Certificate.new(certificate)
      end
    end

    certificates
  end
end