class Digicert::Domain
Public Instance Methods
activate()
click to toggle source
# File lib/digicert/domain.rb, line 12 def activate request_klass.new( :put, [resource_path, resource_id, "activate"].join("/") ).parse end
deactivate()
click to toggle source
# File lib/digicert/domain.rb, line 18 def deactivate request_klass.new( :put, [resource_path, resource_id, "deactivate"].join("/") ).parse end
Private Instance Methods
resource_path()
click to toggle source
# File lib/digicert/domain.rb, line 26 def resource_path "domain" end
validate(name:, organization:, validations:, **attributes)
click to toggle source
# File lib/digicert/domain.rb, line 49 def validate(name:, organization:, validations:, **attributes) required_attributes = { name: name, organization: organization, validations: validate_validations(validations), } required_attributes.merge(attributes) end
validate_validation(type:, **attributes)
click to toggle source
Validate validation
We need to provide a valid type of valitations when creating a new domain, but the most important thing about the types are it has to be in lowercase format, otherwise Digicert
won't accept it a valid type. So let's ensure we are always providig the type in correct format.
Ref: www.digicert.com/services/v2/documentation/appendix-validation-types
# File lib/digicert/domain.rb, line 45 def validate_validation(type:, **attributes) { type: type.downcase }.merge(attributes) end
validate_validations(attributes)
click to toggle source
# File lib/digicert/domain.rb, line 30 def validate_validations(attributes) attributes.map do |attribute| validate_validation(attribute) end end