class RestPki::ResourceContentOrReference

Attributes

content[RW]
mime_type[RW]
url[RW]

Public Class Methods

new() click to toggle source
# File lib/rest_pki/resource_content_or_reference.rb, line 7
def initialize
  @url = nil
  @mime_type = nil
  @content = nil
end

Public Instance Methods

to_model() click to toggle source
# File lib/rest_pki/resource_content_or_reference.rb, line 13
def to_model
  content = nil
  unless @content.nil?
    content = Base64.encode64(@content)
  end
  {
      url: @url,
      mimeType: @mime_type,
      content: content,
  }
end