Class: CloudflareClient::Zone::SSL::CertificatePack
- Inherits:
-
CloudflareClient::Zone::SSL
- Object
- CloudflareClient
- CloudflareClient::Zone
- Base
- CloudflareClient::Zone::SSL
- CloudflareClient::Zone::SSL::CertificatePack
- Defined in:
- lib/cloudflare_client/zone/ssl/certificate_pack.rb
Constant Summary
Constants inherited from CloudflareClient::Zone::SSL
Constants inherited from CloudflareClient::Zone
Constants inherited from CloudflareClient
API_BASE, POSSIBLE_API_SETTINGS, VALID_BUNDLE_METHODS, VALID_DIRECTIONS, VALID_MATCHES, VERSION
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#list ⇒ Object
list all certificate packs.
-
#order(hosts: nil) ⇒ Object
re-order certificate packs.
-
#update(id:, hosts:) ⇒ Object
edit a certificate pack.
Methods inherited from CloudflareClient::Zone::SSL
Methods inherited from Base
Methods inherited from CloudflareClient::Zone
#create_zone, #delete_zone, #edit_zone, #purge_zone_cache, #update_zone_settings, #zone, #zone_activation_check, #zone_setting, #zone_settings, #zones
Methods inherited from CloudflareClient
Constructor Details
This class inherits a constructor from CloudflareClient::Zone::Base
Instance Method Details
#list ⇒ Object
list all certificate packs
7 8 9 |
# File 'lib/cloudflare_client/zone/ssl/certificate_pack.rb', line 7 def list cf_get(path: "/zones/#{zone_id}/ssl/certificate_packs") end |
#order(hosts: nil) ⇒ Object
re-order certificate packs
13 14 15 16 17 18 19 20 |
# File 'lib/cloudflare_client/zone/ssl/certificate_pack.rb', line 13 def order(hosts: nil) non_empty_array_check(:hosts, hosts) unless hosts.nil? data = {hosts: hosts} # TODO: test against api cf_post(path: "/zones/#{zone_id}/ssl/certificate_packs", data: data) end |
#update(id:, hosts:) ⇒ Object
edit a certificate pack
24 25 26 27 28 29 30 31 |
# File 'lib/cloudflare_client/zone/ssl/certificate_pack.rb', line 24 def update(id:, hosts:) id_check(:id, id) non_empty_array_check(:hosts, hosts) unless hosts.nil? data = {hosts: hosts} cf_patch(path: "/zones/#{zone_id}/ssl/certificate_packs/#{id}", data: data) end |