Class: Acme::Client::Resources::Directory
- Inherits:
-
Object
- Object
- Acme::Client::Resources::Directory
- Defined in:
- lib/acme/client/resources/directory.rb
Constant Summary collapse
- DIRECTORY_RESOURCES =
{ new_nonce: 'newNonce', new_account: 'newAccount', new_order: 'newOrder', new_authz: 'newAuthz', revoke_certificate: 'revokeCert', key_change: 'keyChange' }
- DIRECTORY_META =
{ terms_of_service: 'termsOfService', website: 'website', caa_identities: 'caaIdentities', external_account_required: 'externalAccountRequired' }
Instance Method Summary collapse
- #caa_identities ⇒ Object
- #endpoint_for(key) ⇒ Object
- #external_account_required ⇒ Object
-
#initialize(url, connection_options) ⇒ Directory
constructor
A new instance of Directory.
- #meta ⇒ Object
- #terms_of_service ⇒ Object
- #website ⇒ Object
Constructor Details
#initialize(url, connection_options) ⇒ Directory
Returns a new instance of Directory.
20 21 22 |
# File 'lib/acme/client/resources/directory.rb', line 20 def initialize(url, ) @url, @connection_options = url, end |
Instance Method Details
#caa_identities ⇒ Object
39 40 41 |
# File 'lib/acme/client/resources/directory.rb', line 39 def caa_identities [DIRECTORY_META[:caa_identities]] end |
#endpoint_for(key) ⇒ Object
24 25 26 27 28 29 |
# File 'lib/acme/client/resources/directory.rb', line 24 def endpoint_for(key) directory.fetch(key) do |missing_key| raise Acme::Client::Error::UnsupportedOperation, "Directory at #{@url} does not include `#{missing_key}`" end end |
#external_account_required ⇒ Object
43 44 45 |
# File 'lib/acme/client/resources/directory.rb', line 43 def external_account_required [DIRECTORY_META[:external_account_required]] end |
#meta ⇒ Object
47 48 49 |
# File 'lib/acme/client/resources/directory.rb', line 47 def directory[:meta] end |
#terms_of_service ⇒ Object
31 32 33 |
# File 'lib/acme/client/resources/directory.rb', line 31 def terms_of_service [DIRECTORY_META[:terms_of_service]] end |
#website ⇒ Object
35 36 37 |
# File 'lib/acme/client/resources/directory.rb', line 35 def website [DIRECTORY_META[:website]] end |