xolphin-api-ruby is a library which allows quick integration of the Xolphin REST API in Ruby to automated ordering, issuance and installation of SSL Certificates.
Xolphin is the largest supplier of SSL Certificates and Digital Signatures in the Netherlands. Xolphin has a professional team providing reliable support and rapid issuance of SSL Certificates at an affordable price from industry leading brands such as Sectigo (formely Comodo), GeoTrust, GlobalSign, Thawte and Symantec.
Add this line to your application's Gemfile:
gem 'xolphin-api'
And then execute:
$ bundle
Or install it yourself as:
$ gem install xolphin-api
require 'xolphin/api'
client = Xolphin::Api::Client.new('<username>', '<password>')
requests = client.request.all
requests.each do |request|
puts request.id, request.product.id
end
request = client.request.get(960000024)
puts request.product.brand
ccr = client.request.create(24, 1, 'csr string', Xolphin::Api::DcvType::EMAIL)
ccr.address = 'Address'
ccr.approver_first_name = 'FirstName'
ccr.approver_last_name = 'LastName'
ccr.approver_phone = '+12345678901'
ccr.approver_email = 'email@domain.com'
ccr.zipcode = '123456'
ccr.city = 'City'
ccr.company = 'Company'
ccr.subject_alternative_names = ['test1.domain.com', 'test2.domain.com']
ccr.dcv = [{
'domain' => 'test1.domain.com',
'dcvType' => Xolphin::Api::DcvType::EMAIL,
'approverEmail' => 'email@domain.com'
}]
request = client.request.send(ccr)
puts request.id
certificate = client.certificate.get(<certificate_id>);
request = Xolphin::Api::CertificateRequests::ReissueCertificateRequest.new(<csr_string>,"EMAIL")
client.certificate.reissue(certificate.id, request)
certificate = client.certificate.get(<certificate_id>);
request = Xolphin::Api::CertificateRequests::RenewCertificateRequest.new(certificate.product.id, <years>, <csr_string>, 'FILE')
client.certificate.renew(certificate.id, request)
result = client.request.sendNote(1234, 'message')
result = client.request.getNotes(1234)
result.notes.each do |note|
puts note.message_body, note.created_at
end
# currently available languages: en, de, fr, nl
result = client.request.sendComodoSAEmail(1234, 'email@example.com', '<language>');
request = client.request.createEE
request.csr = "<csr_string>"
request.approver_first_name = "FirstName"
request.approver_last_name = "LastName"
request.approver_phone = "+1234567890"
request.approver_email = "email@domain.com"
request.subject_alternative_names = ["test1.domain.com", "test2.domain.com"]
request.dcv_type = "FILE"
response = client.request.sendEE(request)
certificates = client.certificate.all
certificates.each do |certificate|
puts certificate.id, certificate.expired?
end
certificate = client.certificate.download(960000031, Xolphin::Api::FormatType::CRT)
File.write('crt.crt', certificate)
products = client.support.products
products.each do |product|
puts product.id, product.brand
end
data = client.support.decode_csr('csr string')
puts data.type, data.size
Bug reports and pull requests are welcome on GitHub at https://github.com/xolphin/xolphin-api-ruby.
The gem is available as open source under the terms of the MIT License.