Class: Xolphin::Api::Responses::Certificate
- Inherits:
-
Base
- Object
- Base
- Xolphin::Api::Responses::Certificate
show all
- Defined in:
- lib/xolphin/api/responses/certificate.rb
Instance Method Summary
collapse
Methods inherited from Base
#_embedded, #error?, #errors, #limit, #message, #page, #pages, #total
Constructor Details
Returns a new instance of Certificate.
7
8
9
|
# File 'lib/xolphin/api/responses/certificate.rb', line 7
def initialize(data)
super(data)
end
|
Instance Method Details
#company ⇒ Object
31
32
33
|
# File 'lib/xolphin/api/responses/certificate.rb', line 31
def company
@data["company"]
end
|
#customer_id ⇒ Object
35
36
37
|
# File 'lib/xolphin/api/responses/certificate.rb', line 35
def customer_id
@data["customerId"]
end
|
#date_expired ⇒ Object
27
28
29
|
# File 'lib/xolphin/api/responses/certificate.rb', line 27
def date_expired
Time.parse(@data["dateExpired"])
end
|
#date_issued ⇒ Object
23
24
25
|
# File 'lib/xolphin/api/responses/certificate.rb', line 23
def date_issued
Time.parse(@data["dateIssued"])
end
|
#domain_name ⇒ Object
15
16
17
|
# File 'lib/xolphin/api/responses/certificate.rb', line 15
def domain_name
@data["domainName"]
end
|
#expired? ⇒ Boolean
39
40
41
|
# File 'lib/xolphin/api/responses/certificate.rb', line 39
def expired?
date_expired <= Time.now
end
|
#id ⇒ Object
11
12
13
|
# File 'lib/xolphin/api/responses/certificate.rb', line 11
def id
@data["id"]
end
|
#product ⇒ Object
43
44
45
46
47
48
49
|
# File 'lib/xolphin/api/responses/certificate.rb', line 43
def product
@product ||= begin
if _embedded && _embedded["product"]
Product.new(_embedded["product"])
end
end
end
|
#subject_alternative_names ⇒ Object
19
20
21
|
# File 'lib/xolphin/api/responses/certificate.rb', line 19
def subject_alternative_names
@data["subjectAlternativeNames"]
end
|