{"id":18375624,"url":"https://github.com/riboseinc/digicert","last_synced_at":"2025-04-06T20:31:06.318Z","repository":{"id":19935093,"uuid":"81908269","full_name":"riboseinc/digicert","owner":"riboseinc","description":"Ruby bindings for the Digicert Services API","archived":false,"fork":false,"pushed_at":"2022-03-02T14:50:52.000Z","size":240,"stargazers_count":8,"open_issues_count":6,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-05T23:32:27.233Z","etag":null,"topics":["digicert","digicert-api-ruby","ruby-client"],"latest_commit_sha":null,"homepage":"https://www.digicert.com/services/v2/documentation","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/riboseinc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-14T05:23:24.000Z","updated_at":"2023-03-31T06:36:34.000Z","dependencies_parsed_at":"2022-08-07T09:15:45.075Z","dependency_job_id":null,"html_url":"https://github.com/riboseinc/digicert","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riboseinc%2Fdigicert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riboseinc%2Fdigicert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riboseinc%2Fdigicert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riboseinc%2Fdigicert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/riboseinc","download_url":"https://codeload.github.com/riboseinc/digicert/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247547252,"owners_count":20956527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["digicert","digicert-api-ruby","ruby-client"],"created_at":"2024-11-06T00:19:37.967Z","updated_at":"2025-04-06T20:31:05.943Z","avatar_url":"https://github.com/riboseinc.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Digicert\n\n[![Build Status](https://github.com/riboseinc/digicert/actions/workflows/test.yml/badge.svg)](https://github.com/riboseinc/digicert/actions/workflows/test.yml)\n[![Code\nClimate](https://codeclimate.com/github/riboseinc/digicert/badges/gpa.svg)](https://codeclimate.com/github/riboseinc/digicert)\n[![Gem\nVersion](https://badge.fury.io/rb/digicert.svg)](https://badge.fury.io/rb/digicert)\n\nThe Ruby client for the official Digicert API.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem \"digicert\"\n```\n\nAnd then execute:\n\n```sh\nbundle install\n```\n\nOr install it yourself as:\n\n```sh\ngem install digicert\n```\n\n## Configure\n\nOnce you have your API key then you can configure it by adding an initializer\nwith the following code\n\n```ruby\nDigicert.configure do |config|\n  config.api_key = \"SECRET_DEV_API_KEY\"\n\n  # Default response type is `object`, but you can configure it if\n  # necessary, and all the further response will be return as config\n  # supported options are `object` and `hash`.\n  #\n  # config.response_type = :object\nend\n```\n\nOr\n\n```ruby\nDigicert.configuration.api_key = \"SECRET_DEV_API_KEY\"\n```\n\n## Usage\n\n### Container\n\nContainer is an Operational Division used to model your organizational\nstructure. The features of the container you create are determined by\nits Container Template.\n\n#### List Containers\n\nUse this interface to retrieve a list of existing containers.\n\nNote: This is an undocumented endpoint of the DigiCert Services API.\n\n```ruby\nDigicert::Container.all\n```\n\n#### Create a Container\n\nUse this interface to create new container, and this interface also\nexpects us to provide `parent_container` along with the others\nattributes as `container_id`.\n\n```ruby\nDigicert::Container.create(\n  container_id: 123_456_789,\n  template_id: 5,\n  name: \"History Department\",\n  description: \"History, Civ, Ancient Languages\",\n\n  user: {\n    first_name: \"Awesome\",\n    last_name: \"User\",\n    email: \"awesomeuser@example.com\",\n    username: \"awesomeuser@example.com\",\n    access_roles: [{ id: 1 }],\n  },\n)\n```\n\n#### View a Container\n\nInformation about a specific container can be retrieved through this interface,\nincluding its name, description, template, and parent container id.\n\n```ruby\nDigicert::Container.fetch(container_id)\n```\n\n### Container Template\n\nContainer Templates define a set of features that are available to a container.\n\n#### List Container Templates\n\nUse this interface to retrieve a list of the templates that are available to use\nto create child containers.\n\n```ruby\nDigicert::ContainerTemplate.all(container_id)\n```\n\n#### View a Container Template\n\nUse this interface to retrieve information about a specific container template,\nincluding which user access roles are available under this template.\n\n```ruby\nDigicert::ContainerTemplate.fetch(\n  template_id: template_id, container_id: container_id,\n)\n```\n\n### Organization\n\n#### Create an Organization\n\nUse this interface to create a new organization. The organization information\nwill be used by DigiCert for validation and may appear on certificates.\n\n```ruby\n# Create a new organization\n# Please pay close attension bellow\n# on building the organization_attributes\n#\nDigicert::Organization.create(organization_attributes)\n\n# Organization attributes hash\n#\norganization_attributes = {\n  name: \"digicert, inc.\",\n  address: \"333 s 520 w\",\n  zip: 84042,\n  city: \"lindon\",\n  state: \"utah\",\n  country: \"us\",\n  telephone: 8015551212,\n  container: { id: 17 },\n\n  organization_contact: {\n    first_name: \"Some\",\n    last_name: \"Guy\",\n    email: \"someguy@digicert.com\",\n    telephone: 8015551212,\n  },\n\n  # Optional attributes\n  assumed_name: \"DigiCert\",\n  address2: \"Suite 500\",\n}\n```\n\n#### View an Organization\n\nUse this interface to view information about an organization.\n\n```ruby\nDigicert::Organization.fetch(organization_id)\n```\n\n#### List all organizations\n\nUse this interface to retrieve a list of organizations.\n\n```ruby\nDigicert::Organization.all\n```\n\n### Domain\n\n#### Create a new Domain\n\nUse this interface to add a domain for an organization in a container. You must\nspecify at least one validation type for the domain.\n\n```ruby\n# Create a new domain in an organization\n# Please pay close attension in building the attibutes hash\n#\nDigicert::Domain.create(domain_attributes)\n\n# Domain attributes hash\n#\ndomain_attributes = {\n  name: \"digicert.com\",\n  organization: { id: 117483 },\n  validations: [\n    {\n      type: \"ev\",\n      user: { id: 12 }\n    },\n  ],\n\n  dcv: { method: \"email\" },\n}\n```\n\n#### Activate a Domain\n\nUse this interface to activate a domain that was previously deactivated.\n\n```ruby\ndomain = Digicert::Domain.find(domain_id)\ndomain.activate\n```\n\n#### Deactivate a Domain\n\nUse this interface to deactivate a domain.\n\n```ruby\ndomain = Digicert::Domain.find(domain_id)\ndomain.deactivate\n```\n\n#### View a Domain\n\nUse this interface to view a domain, This interface also allows you to pass an\nadditional `hash` to specify if you want to retrieve additional data with the\nresponse.\n\n```ruby\nDigicert::Domain.fetch(domain_id, include_dcv: true)\n```\n\n#### List Domains\n\nUse this interface to retrieve a list of domains. This interface also supports\nan additional `filter_params` hash, which can be used to filter the list we want\nthe interface to return.\n\n```ruby\nDigicert::Domain.all(filter_params_hash)\n```\n\n### Submitting Orders\n\n#### Important Note\n\nRecently DigiCert improved the certificate issuance process to allow for\n[immediate certificate issuance]. It does not require us to change anything on\nour API calls but now the response will be different based on your DigiCert\naccount settings.\n\nIf you have everything setup in place and any order is eligible for immediate\nissuance then the certificate will be included with the response. Please check\nthe [certificate download spec] for inspiration.\n\n#### View Product List\n\nUse this interface to retrieve a list of available products for an account.\n\n```ruby\nDigicert::Product.all\n```\n\n#### View Product Details\n\nUse this interface to retrieve a full set of details for a product.\n\n```ruby\nDigicert::Product.fetch(name_id)\n```\n\n#### Generate the CSR content\n\nThis interface will allow us to generate the CSR content on the fly, it will\nreturn the content that we can use for order creation.\n\n```ruby\nDigicert::CSRGenerator.generate(\n  common_name: \"example.com\",\n  san_names: [\"example.com\", \"www.example.com\"],\n  rsa_key: File.read(\"your_rsa_key_file_path\"),\n  organization: Digicert::Organization.all.first,\n)\n```\n\n#### Create any type of order\n\nUse this interface to create a new order, this expect two arguments one is\n`name_id` for the order and another one is the attributes hash.\n\n```ruby\norder = Digicert::Order.create(\n  name_id, order_attributes_hash,\n)\n\n# Pay close attension building the order attributes\n# hash, it requries to format the data in a specific\n# format and once that is satisfied only then it will\n# perfrom the API operation otherwise it will raise\n# invalid argument errors.\n#\norder_attributes = {\n  certificate: {\n    common_name: \"digicert.com\",\n    csr: \"------ [CSR HERE] ------\",\n    signature_hash: \"sha256\",\n\n    organization_units: [\"Developer Operations\"],\n    server_platform: { id: 45 },\n    profile_option: \"some_ssl_profile\",\n  },\n\n  organization: { id: 117483 },\n  validity_years: 3,\n  custom_expiration_date: \"2017-05-18\",\n  comments: \"Comments for the the approver\",\n  disable_renewal_notifications: false,\n  renewal_of_order_id: 314152,\n  payment_method: \"balance\",\n}\n```\n\nThe supported value for `name_id` are `ssl_plus`, `ssl_wildcard`, `ssl_ev_plus`,\n`client_premium`, `email_security_plus` and `digital_signature_plus`. Please\ncheck the Digicert documentation for more details on those.\n\nIf you want to create a new order by yourself by following each of the specific\nclass then please check out the interfaces specified bellow.\n\n#### Order SSL Plus Certificate\n\nUse this interface to order a SSL Plus Certificate.\n\n```ruby\nDigicert::SSLCertificate::SSLPlus.create(\n  certificate: {\n    common_name: \"digicert.com\",\n    csr: \"------ [CSR HERE] ------\",\n    signature_hash: \"sha256\",\n\n    organization_units: [\"Developer Operations\"],\n    server_platform: { id: 45 },\n    profile_option: \"some_ssl_profile\",\n  },\n\n  organization: { id: 117483 },\n  validity_years: 3,\n  custom_expiration_date: \"2017-05-18\",\n  comments: \"Comments for the the approver\",\n  disable_renewal_notifications: false,\n  renewal_of_order_id: 314152,\n  payment_method: \"balance\",\n)\n```\n\n#### Order SSL Wildcard Certificate\n\nUse this interface to order a SSL Wildcard Certificate.\n\n```ruby\nDigicert::SSLCertificate::SSLWildcard.create(\n  certificate: {\n    common_name: \"digicert.com\",\n    csr: \"------ [CSR HERE] ------\",\n    signature_hash: \"sha256\",\n\n    organization_units: [\"Developer Operations\"],\n    server_platform: { id: 45 },\n    profile_option: \"some_ssl_profile\",\n  },\n\n  organization: { id: 117483 },\n  validity_years: 3,\n  custom_expiration_date: \"2017-05-18\",\n  comments: \"Comments for the the approver\",\n  disable_renewal_notifications: false,\n  renewal_of_order_id: 314152,\n)\n```\n\n#### Order SSL EV Plus Certificate\n\nUse this interface to order a SSL EV Plus Certificate.\n\n```ruby\nDigicert::SSLCertificate::SSLEVPlus.create(\n  certificate: {\n    common_name: \"digicert.com\",\n    csr: \"------ [CSR HERE] ------\",\n    signature_hash: \"sha256\",\n\n    organization_units: [\"Developer Operations\"],\n    server_platform: { id: 45 },\n    profile_option: \"some_ssl_profile\",\n  },\n\n  organization: { id: 117483 },\n  validity_years: 3,\n  custom_expiration_date: \"2017-05-18\",\n  comments: \"Comments for the the approver\",\n  disable_renewal_notifications: false,\n  renewal_of_order_id: 314152,\n)\n```\n\n#### Order Client Premium Certificate\n\nUse this interface to order a Client Premium Certificate.\n\n```ruby\nDigicert::ClientCertificate::Premium.create(\n  certificate: {\n    common_name: \"Full Name\",\n    emails: [\"email@example.com\", \"email1@example.com\"],\n    csr: \"------ [CSR HERE] ------\",\n    signature_hash: \"sha256\",\n\n    organization_units: [\"Developer Operations\"],\n    server_platform: { id: 45 },\n    profile_option: \"some_ssl_profile\",\n  },\n\n  organization: { id: 117483 },\n  validity_years: 3,\n  custom_expiration_date: \"2017-05-18\",\n  comments: \"Comments for the the approver\",\n  disable_renewal_notifications: false,\n  renewal_of_order_id: 314152,\n)\n```\n\n#### Order Private Client Premium Certificate\n\nUse this interface to order a Private Client Premium Certificate.\n\n```ruby\nDigicert::ClientCertificate::PrivatePremium.create(\n  certificate: {\n    organization_units: [\"Developer Operations\"],\n\n    csr: \"------ [CSR HERE] ------\",\n    emails: [\"a.name@example.com\"],\n    common_name: \"Common Name\",\n    signature_hash: \"sha256\",\n  },\n  organization: { id: \"12345\" },\n  validity_years: 3,\n  auto_renew: nil,\n  container: { id: \"654321\" },\n  payment_method: \"balance\",\n)\n```\n\n#### Order Email Security Plus\n\nUse this interface to order a Email Security Plus Certificate\n\n```ruby\nDigicert::ClientCertificate::EmailSecurityPlus.create(\n  certificate: {\n    common_name: \"Full Name\",\n    emails: [\"email@example.com\", \"email1@example.com\"],\n    signature_hash: \"sha256\",\n\n    organization_units: [\"Developer Operations\"],\n    server_platform: { id: 45 },\n    profile_option: \"some_ssl_profile\",\n  },\n\n  organization: { id: 117483 },\n  validity_years: 3,\n  auto_renew: 10,\n  renewal_of_order_id: 314152,\n)\n```\n\n#### Order Client Digital Signature Plus\n\nUse this interface to order a Client Digital Signature Plus\n\n```ruby\nDigicert::Order::DigitalSignaturePlus.create(\n  certificate: {\n    common_name: \"Full Name\",\n    emails: [\"email@example.com\", \"email1@example.com\"],\n    csr: \"-----BEGIN CERTIFICATE REQUEST----- ...\",\n    signature_hash: \"sha256\",\n  },\n\n  organization: { id: 117483 },\n  validity_years: 3,\n  auto_renew: 10,\n  renewal_of_order_id: 314152,\n)\n```\n\n### Request Management\n\n#### List certificate requests\n\nUse this interface to retrieve a list of certificate requests.\n\n```ruby\nDigicert::CertificateRequest.all\n```\n\n#### Certificate Request details\n\nUse this interface to retrieve the details for a certificate request.\n\n```ruby\nDigicert::CertificateRequest.fetch(request_id)\n```\n\n#### Update Request Status\n\nUse this interface to update the status of a previously submitted certificate\nrequest.\n\n```ruby\nDigicert::CertificateRequest.update(\n  request_id, status: \"approved\", processor_comment: \"Your domain is approved\",\n)\n```\n\n### Order Management\n\n#### View a Certificate Order\n\nUse this interface to retrieve a certificate order and the response includes all\nthe order attributes along with a `certificate` in it.\n\n```ruby\nDigicert::Order.fetch(order_id)\n```\n\n#### List Certificate Orders\n\nUse this interface to retrieve a list of all certificate orders.\n\n```ruby\nDigicert::Order.all\n```\n\nThis interface also supports query params like `limit`, `offset`, `sort` and\nfilters. We can use those to retrieve more precised orders.\n\n```ruby\nDigicert::Order.all(\n  limit: 20,\n  offset: 0,\n  sort: 'date_created',\n\n  filters: {\n    status: \"approved\",\n    common_name: \"ribosetest.com\"\n  }\n)\n```\n\nThere is also another interface `.filter`, which is basically an alias around\nthe `.all` interface but it passes each of the argument as a filters attributes\n\n```ruby\nDigicert::Order.filter(status: \"approved\", common_name: \"ribosetest.com\")\n\n# Similar functionality with all interface\n#\nDigicert::Order.all(\n  filters: { status: \"approved\", common_name: \"ribosetest.com\" }\n)\n```\n\n#### List of Email Validations\n\nUse this interface to view the status of all emails that require validation on a\nclient certificate order.\n\n```ruby\nDigicert::EmailValidation.all(order_id: order_id)\n\n# If you prefer then there is an alternative alias method\n# on the order class, you can invoke that on any of its\n# instances. Usages\n#\norder = Digicert::Order.find(order_id)\norder.email_validations\n```\n\n#### Validate an Email Address\n\nUse this interface to verify control of an email address, using an email\naddress/token pair.\n\n```ruby\nDigicert::EmailValidation.valid?(token: token, email: email)\n# =\u003e true or false\n```\n\n#### Reissue a Certificate Order\n\nUse this interface to reissue a certificate order. A reissue replaces the\nexisting certificate with a new one that has different information such as\ncommon name, CSR, etc. The simplest interface to reissue an update an existing\norder is\n\n```ruby\norder = Digicert::Order.find(order_id)\norder.reissue\n\n# Alternative and prefereed in most case\nDigicert::OrderReissuer.create(order_id: order_id)\n```\n\nAnd if there are some updated information like `csr`, `common_name` or etc then\nyou can use the same interface but pass the `:certificate` option. Please\nremember if any required fields are missing then it will use the data that\nalready exists for that order.\n\n```ruby\nDigicert::OrderReissuer.create(\n  order: order_id,\n  common_name: certificate_common_name,\n  dns_names: [certificate_dns_name],\n  csr: certificate_csr,\n  signature_hash: certificate_signature_hash,\n  server_platform: { id: certificate_server_platform_id },\n)\n```\n\n#### Duplicate a Certificate Order\n\nUse this interface to request a duplicate certificate for an order. A duplicate\nshares the expiration date as the existing certificate and is identical with the\nexception of the CSR and a possible change in the server platform and signature\nhash. The common name and sans need to be the same as the original order.\n\n```ruby\nDigicert::OrderDuplicator.create(\n  order: order_id,\n  common_name: certificate_common_name,\n  dns_names: [certificate_dns_name],\n  csr: certificate_csr,\n  signature_hash: certificate_signature_hash,\n  server_platform: { id: certificate_server_platform_id },\n)\n```\n\n#### Find a Duplicate Certificate\n\nAs of now, the Digicert API, does not have an easier way to find a duplicate\ncertificate, as the certificate duplication returns existing `order_id` with a\n`request` node which only has an `id`.\n\nSo to find out a duplicate certificate, we need to retrieve the details for that\nspecific request and from that response retrieve the `date_created` for the\nduplicate certificate and then use that `date_created` to find out the correct\ncertificate from the duplications of that specific order.\n\nThis requires lots of work, so this following interface will do all of its\nunderlying tasks, and all we need to do is pass the requests id that we will\nhave form the certificate duplication.\n\n```ruby\n# Duplicate an existing certificate order\n#\norder = Digicert::Order.find(order_id)\nduplicate_order = order.duplicate\n\n# Use the request id to find out the certificate\n#\nrequest_id = duplicate_order.requests.first.id\nDigicert::DuplicateCertificateFinder.find_by(request_id: request_id)\n```\n\n#### List Duplicate Certificates\n\nUse this interface to view all duplicate certificates for an order.\n\n```ruby\nDigicert::DuplicateCertificate.all(order_id: order_id)\n\n# Alternative interface for duplicate certificates\norder = Digicert::Order.find(order_id)\norder.duplicate_certificates\n```\n\n#### Cancel a Certificate Order\n\nUse this interface to update the status of an order. Currently this endpoint only\nallows updating the status to 'CANCELED'\n\n```ruby\norder = Digicert::Order.find(order_id)\norder.cancel(note: \"Cancellation note\")\n\n# Or use the actual interface for more control\nDigicert::OrderCancellation.create(\n  order_id: order_id, status: \"CANCELED\", note: \"your_note\", send_emails: true,\n)\n```\n\n### Reports\n\n#### Expiring Orders\n\nUse this interface to retrieve the number of orders that have certificates\nexpiring within 90, 60, and 30 days. The number of orders that have already\nexpired certificates within the last 7 days is also returned.\n\n```ruby\nDigicert::ExpiringOrder.all(container_id: container_id)\n```\n\n### Certificate Management\n\n#### Download a Certificate\n\nThis request will return an SSL Certificate file from an order. By default, it\nuses the platform specified by the order.\n\n```ruby\n# Fetch the certficate details that includes a http status code\n# and the file content in the `#body`, so you can choose if you\n# want to write it to your filesystem or directly upload it to\n# your host, and the contents it returns is `zip` archieve.\n#\ncertificate = Digicert::CertificateDownloader.fetch(certificate_id, **attributes)\n\n# write to content to somewhere in your filesystem.\n#\nFile.write(\"path_to_file_system/certificate.zip\", certificate.body)\n\n# Alaternative to fetch it through certificate instance\n#\ncertificate = Digicert::Certificate.find(certificate_id)\ncertificate_content_object = certificate.download\n```\n\nAdditionally, if you want the gem to handle the file writing then it also\nprovides another helper interface `fetch_to_path`, and that will fetch the file\ncontent and write the content to supplied path.\n\n```ruby\nDigicert::CertificateDownloader.fetch_to_path(\n  certificate_id,\n  ext: \"zip\",\n  path: File.expand_path(\"./file/download/path\"),\n  **other_attributes_hash_like_platform_or_format,\n)\n\n# Alternative through a certificate instance\n#\ncertificate = Digicert::Certificate.find(certificate_id)\ncertificate.download_to_path(path: \"file/path\", ext: \"zip\", format: \"zip\")\n```\n\n#### Download a Certificate By Format\n\nThis interface will return an SSL Certificate file from an order. The certificate\nwill be return in the format you specify, but one thing to remember the\ncertificate will be archived as `zip` along with the instructions, so you need\nto write that as zip archive.\n\n```ruby\nDigicert::CertificateDownloader.fetch_by_format(\n  certificate_id, format: format,\n)\n\n# Alternative using the certificate instance\n#\ncertificate = Digicert::Certificate.find(certificate_id)\ncertificate_content_object = certificate.download(format: format)\n```\n\n#### Download a Certificate By Platform\n\nThis interface will return an SSL Certificate file from an order using the\nplatform specified.\n\n```ruby\ncertificate = Digicert::CertificateDownloader.fetch_by_platform(\n  certificate_id, platform: \"apache\",\n)\n\n# Alternative using the certificate instance\n#\ncertificate = Digicert::Certificate.find(certificate_id)\ncertificate_content_object = certificate.download(platform: \"apache\")\n```\n\n#### Download a Certificate content\n\nThis interface will fetch a SSL Certificate and extract all of its subsidiary\ncertificates content and return as a hash with `certificate`, `root_certificate`\nand `intermediate_certificate` keys.\n\n```ruby\nDigicert::CertificateDownloader.fetch_content(certificate_id)\n\n# Alternative using certificate instance\n#\ncertificate = Digicert::Certificate.find(certificate_id)\ncertificate.download_content\n```\n\n#### Revoke a Certificate\n\nThis interface will revoke a previously issued SSL Certificate.\n\n```ruby\nDigicert::Certificate.revoke(certificate_id, comments: \"Your comment\")\n```\n\n## Development\n\nWe are following Sandi Metz's Rules for this gem, you can read the\n[description of the rules here][sandi-metz] All new code should follow these\nrules. If you make changes in a pre-existing file that violates these rules you\nshould fix the violations as part of your contribution.\n\n### Setup\n\nClone the repository.\n\n```sh\ngit clone https://github.com/riboseinc/digicert\n```\n\nSetup your environment.\n\n```sh\nbin/setup\n```\n\nRun the test suite\n\n```sh\nbin/rspec\n```\n\n### Play Box\n\nThe API Play Box provides an interactive console so we can easily test out the\nactual API interaction. But before moving forward let's configure the your key.\n\nSetup the client configuration.\n\n```sh\ncp .sample.pryrc .pryrc\nvim .pryrc\n```\n\nStart the console.\n\n```sh\nbin/console\n```\n\nStart playing with it.\n\n```ruby\nDigicert::Product.all\n```\n\n## Contributing\n\nFirst, thank you for contributing! We love pull requests from everyone. By\nparticipating in this project, you hereby grant [Ribose Inc.][riboseinc] the\nright to grant or transfer an unlimited number of non exclusive licenses or\nsub-licenses to third parties, under the copyright covering the contribution\nto use the contribution by all means.\n\nHere are a few technical guidelines to follow:\n\n1. Open an [issue][issues] to discuss a new feature.\n1. Write tests to support your new feature.\n1. Make sure the entire test suite passes locally and on CI.\n1. Open a Pull Request.\n1. [Squash your commits][squash] after receiving feedback.\n1. Party!\n\n\n## Credits\n\nThis gem is developed, maintained and funded by [Ribose Inc.][riboseinc]\n\n[riboseinc]: https://www.ribose.com\n[issues]: https://github.com/riboseinc/digicert/issues\n[squash]: https://github.com/thoughtbot/guides/tree/master/protocol/git#write-a-feature\n[sandi-metz]: http://robots.thoughtbot.com/post/50655960596/sandi-metz-rules-for-developers\n[immediate certificate issuance]: https://www.digicert.com/certcentral-support/immediate-certificate-issuance-feature.htm\n[certificate download spec]: https://github.com/riboseinc/digicert/blob/master/spec/acceptance/certificate_download_spec.rb#L5\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friboseinc%2Fdigicert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Friboseinc%2Fdigicert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friboseinc%2Fdigicert/lists"}