Sha256: a53a6228990129331460d0d4e60046a46a8a3b8a068470bdfd5062e614101dd3

Contents?: true

Size: 824 Bytes

Versions: 2

Compression:

Stored size: 824 Bytes

Contents

require 'json'

module Xolphin
  module Api
    module CertificateRequests
      class CreateEERequest
        attr_accessor :csr, :dcv_type, :subject_alternative_names, :validate
        attr_accessor :approver_first_name, :approver_last_name, :approver_email, :approver_phone

        def to_param
          result = {
            "csr" => @csr,
            "dcvType" => @dcv_type,
            "approverFirstName" => @approver_first_name,
            "approverLastName" => @approver_last_name,
            "approverEmail" => @approver_email,
            "approverPhone" => @approver_phone
          }

          result['validate'] = true if @validate
          result["subjectAlternativeNames"] = @subject_alternative_names.join(",") if @subject_alternative_names

          result
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
xolphin-api-1.9.0 lib/xolphin/api/certificate_requests/create_ee_request.rb
xolphin-api-1.8.0 lib/xolphin/api/certificate_requests/create_ee_request.rb