Sha256: 8169222f4c4851641362c9b896e9911a2e0e9c3bff67681211378707701b4653

Contents?: true

Size: 402 Bytes

Versions: 1

Compression:

Stored size: 402 Bytes

Contents

module OMCMS
  class OfferingData < Resource
    def initialize(client, response = {}, host)
      @offering_id = response["id"]
      super
    end

    def all
      perform_run self, request_path
    end

    def get(id)
      perform_run self, request_path(id)
    end

    private

    def request_path(key = nil)
      ["offerings", @offering_id, "data", key].compact.join("/")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
omcms-ruby-client-1.2.0 lib/omcms/resource/offering_data.rb