Sha256: ec2f803e07389626eca3ead413d52825830db425effdf4b7dfca411082095ecc

Contents?: true

Size: 656 Bytes

Versions: 2

Compression:

Stored size: 656 Bytes

Contents

module Paddle
  class SimulationRun < Object
    class << self
      def create(simulation_id:, **params)
        response = Client.post_request("simulations/#{simulation_id}/runs", body: {})
        SimulationRun.new(response.body["data"])
      end

      def retrieve(simulation_id:, id:)
        response = Client.get_request("simulations/#{simulation_id}/runs/#{id}")
        SimulationRun.new(response.body["data"])
      end

      def events(simulation_id:, id:)
        response = Client.get_request("simulations/#{simulation_id}/runs/#{id}/events")
        Collection.from_response(response, type: SimulationRunEvent)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
paddle-2.7.0 lib/paddle/models/simulation_run.rb
paddle-2.6.0 lib/paddle/models/simulation_run.rb