class Kentico::Kontent::Delivery::Responses::DeliveryTypeResponse

The response of a successful query for a content type. See github.com/Kentico/kontent-delivery-sdk-ruby#retrieving-content-types

Public Class Methods

new(response) click to toggle source
Calls superclass method
# File lib/delivery/responses/delivery_type_response.rb, line 21
def initialize(response)
  @response = response
  super 200,
        "Success, type '#{type.system.codename}' returned",
        JSON.generate(@response)
end

Public Instance Methods

type() click to toggle source

A Kentico::Kontent::Delivery::ContentType object from a Kentico::Kontent::Delivery::DeliveryClient.type call.

# File lib/delivery/responses/delivery_type_response.rb, line 16
def type
  @type unless @type.nil?
  @type = Kentico::Kontent::Delivery::ContentType.new(@response)
end