Class: CloudflareClient::Zone::SSL

Inherits:
Base show all
Defined in:
lib/cloudflare_client/zone/ssl.rb

Direct Known Subclasses

CertificatePack

Defined Under Namespace

Classes: CertificatePack

Constant Summary collapse

VALID_RETRY_VERIFICATIONS =
[true].freeze

Constants inherited from CloudflareClient::Zone

VALID_ZONE_STATUSES

Constants inherited from CloudflareClient

API_BASE, POSSIBLE_API_SETTINGS, VALID_BUNDLE_METHODS, VALID_DIRECTIONS, VALID_MATCHES, VERSION

Instance Attribute Summary

Attributes inherited from Base

#zone_id

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods inherited from CloudflareClient::Zone

#create_zone, #delete_zone, #edit_zone, #initialize, #purge_zone_cache, #update_zone_settings, #zone, #zone_activation_check, #zone_setting, #zone_settings, #zones

Methods inherited from CloudflareClient

#initialize

Constructor Details

This class inherits a constructor from CloudflareClient::Zone::Base

Instance Method Details

#analyze(certificate: nil, bundle_method: 'ubiquitous') ⇒ Object

analyze a certificate



8
9
10
11
12
13
14
15
16
# File 'lib/cloudflare_client/zone/ssl.rb', line 8

def analyze(certificate: nil, bundle_method: 'ubiquitous')
  data               = {}
  data[:certificate] = certificate unless certificate.nil?

  bundle_method_check(bundle_method)
  data[:bundle_method] = bundle_method

  cf_post(path: "/zones/#{zone_id}/ssl/analyze", data: data)
end

#verification(retry_verification: nil) ⇒ Object

get ssl verification



20
21
22
23
24
25
26
27
# File 'lib/cloudflare_client/zone/ssl.rb', line 20

def verification(retry_verification: nil)
  unless retry_verification.nil?
    valid_value_check(:retry_verification, retry_verification, VALID_RETRY_VERIFICATIONS)
    params = {retry: true}
  end

  cf_get(path: "/zones/#{zone_id}/ssl/verification", params: params)
end