class Vra::Catalog

Attributes

client[R]

Public Class Methods

new(client) click to toggle source
# File lib/vra/catalog.rb, line 24
def initialize(client)
  @client = client
end

Public Instance Methods

all_items() click to toggle source
# File lib/vra/catalog.rb, line 28
def all_items
  client.http_get_paginated_array!("/catalog-service/api/consumer/catalogItems")
    .map! { |x| Vra::CatalogItem.new(client, data: x) }
end
entitled_items() click to toggle source
# File lib/vra/catalog.rb, line 33
def entitled_items
  client.http_get_paginated_array!("/catalog-service/api/consumer/entitledCatalogItems")
    .map! { |x| Vra::CatalogItem.new(client, data: x["catalogItem"]) }
end
fetch_catalog_items(catalog_name) click to toggle source
# File lib/vra/catalog.rb, line 42
def fetch_catalog_items(catalog_name)
  client.http_get("/catalog-service/api/consumer/entitledCatalogItemViews?%24filter=name+eq+'#{catalog_name}'")
end
request(*args) click to toggle source
# File lib/vra/catalog.rb, line 38
def request(*args)
  Vra::CatalogRequest.new(@client, *args)
end