Class: NgrokAPI::Models::ReservedDomain

Inherits:
Object
  • Object
show all
Defined in:
lib/ngrokapi/models/reserved_domain.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client: nil, attrs: {}) ⇒ ReservedDomain

Returns a new instance of ReservedDomain.



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/ngrokapi/models/reserved_domain.rb', line 25

def initialize(client: nil, attrs: {})
  @client = client
  @attrs = attrs
  @id = @attrs['id']
  unless @attrs['uri'].nil?
    @uri = URI(@attrs['uri'])
  end
  @created_at = @attrs['created_at']
  @description = @attrs['description']
  @metadata = @attrs['metadata']
  @domain = @attrs['domain']
  @region = @attrs['region']
  @cname_target = @attrs['cname_target']
  @certificate = @attrs['certificate']
  @certificate_management_policy = @attrs['certificate_management_policy']
  @certificate_management_status = @attrs['certificate_management_status']
  @acme_challenge_cname_target = @attrs['acme_challenge_cname_target']
end

Instance Attribute Details

#acme_challenge_cname_targetObject (readonly)

Returns the value of attribute acme_challenge_cname_target.



10
11
12
# File 'lib/ngrokapi/models/reserved_domain.rb', line 10

def acme_challenge_cname_target
  @acme_challenge_cname_target
end

#attrsObject (readonly)

Returns the value of attribute attrs.



10
11
12
# File 'lib/ngrokapi/models/reserved_domain.rb', line 10

def attrs
  @attrs
end

#certificateObject (readonly)

Returns the value of attribute certificate.



10
11
12
# File 'lib/ngrokapi/models/reserved_domain.rb', line 10

def certificate
  @certificate
end

#certificate_management_policyObject (readonly)

Returns the value of attribute certificate_management_policy.



10
11
12
# File 'lib/ngrokapi/models/reserved_domain.rb', line 10

def certificate_management_policy
  @certificate_management_policy
end

#certificate_management_statusObject (readonly)

Returns the value of attribute certificate_management_status.



10
11
12
# File 'lib/ngrokapi/models/reserved_domain.rb', line 10

def certificate_management_status
  @certificate_management_status
end

#clientObject (readonly)

Returns the value of attribute client.



10
11
12
# File 'lib/ngrokapi/models/reserved_domain.rb', line 10

def client
  @client
end

#cname_targetObject (readonly)

Returns the value of attribute cname_target.



10
11
12
# File 'lib/ngrokapi/models/reserved_domain.rb', line 10

def cname_target
  @cname_target
end

#created_atObject (readonly)

Returns the value of attribute created_at.



10
11
12
# File 'lib/ngrokapi/models/reserved_domain.rb', line 10

def created_at
  @created_at
end

#descriptionObject (readonly)

Returns the value of attribute description.



10
11
12
# File 'lib/ngrokapi/models/reserved_domain.rb', line 10

def description
  @description
end

#domainObject (readonly)

Returns the value of attribute domain.



10
11
12
# File 'lib/ngrokapi/models/reserved_domain.rb', line 10

def domain
  @domain
end

#idObject (readonly)

Returns the value of attribute id.



10
11
12
# File 'lib/ngrokapi/models/reserved_domain.rb', line 10

def id
  @id
end

#metadataObject (readonly)

Returns the value of attribute metadata.



10
11
12
# File 'lib/ngrokapi/models/reserved_domain.rb', line 10

def 
  @metadata
end

#regionObject (readonly)

Returns the value of attribute region.



10
11
12
# File 'lib/ngrokapi/models/reserved_domain.rb', line 10

def region
  @region
end

#uriObject (readonly)

Returns the value of attribute uri.



10
11
12
# File 'lib/ngrokapi/models/reserved_domain.rb', line 10

def uri
  @uri
end

Instance Method Details

#==(other) ⇒ Object



44
45
46
# File 'lib/ngrokapi/models/reserved_domain.rb', line 44

def ==(other)
  @attrs == other.attrs
end

#deleteObject



60
61
62
63
64
# File 'lib/ngrokapi/models/reserved_domain.rb', line 60

def delete
  @client.delete(
    id: @id
  )
end

#to_hObject



52
53
54
# File 'lib/ngrokapi/models/reserved_domain.rb', line 52

def to_h
  @attrs.to_h
end

#to_sObject



48
49
50
# File 'lib/ngrokapi/models/reserved_domain.rb', line 48

def to_s
  @attrs.to_s
end