Sha256: 62695ecb694066c9b09ef6c14d7fba74c4116c0b25d4c6f774cc23f579a0fabe

Contents?: true

Size: 420 Bytes

Versions: 5

Compression:

Stored size: 420 Bytes

Contents

module Supersaas
  class Schedules < BaseApi
    def list
      path = "/schedules"
      res = client.get(path)
      res.map { |attributes| Supersaas::Schedule.new(attributes) }
    end

    def resources(schedule_id)
      path = "/resources"
      query = {schedule_id: validate_id(schedule_id)}
      res = client.get(path, query)
      res.map { |attributes| Supersaas::Resource.new(attributes) }
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
supersaas-api-client-1.1.1 lib/supersaas-api-client/api/schedules.rb
supersaas-api-client-1.1.0 lib/supersaas-api-client/api/schedules.rb
supersaas-api-client-1.0.0 lib/supersaas-api-client/api/schedules.rb
supersaas-api-client-0.10.0 lib/supersaas-api-client/api/schedules.rb
supersaas-api-client-0.9.0 lib/supersaas-api-client/api/schedules.rb