Sha256: 9eb4e269f62303dc8f7c7e63db04471c547f3eecb7ac8e9a93dd79efa6a553ed

Contents?: true

Size: 546 Bytes

Versions: 1

Compression:

Stored size: 546 Bytes

Contents

require "digicert/base"

module Digicert
  class OrderCancellation < Digicert::Base
    def create
      request_klass.new(
        :put, resource_path, **default_attributes.merge(attributes)
      ).run
    end

    def self.create(order_id:, note:, **attributes)
      new(attributes.merge(resource_id: order_id, note: note)).create
    end

    private

    def resource_path
      ["order", "certificate", resource_id, "status"].join("/")
    end

    def default_attributes
      { status: "CANCELED", send_emails: false }
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
digicert-1.0.0 lib/digicert/order_cancellation.rb