Sha256: 1da5559fe900c9293c8cd0965701640509e6b2d4da179bc957569d6b1d5be3e5
Contents?: true
Size: 945 Bytes
Versions: 16
Compression:
Stored size: 945 Bytes
Contents
# frozen_string_literal: true require "seam/helpers/action_attempt" module Seam module Clients class ActionAttempts def initialize(client:, defaults:) @client = client @defaults = defaults end def get(action_attempt_id:, wait_for_action_attempt: nil) res = @client.post("/action_attempts/get", {action_attempt_id: action_attempt_id}.compact) wait_for_action_attempt = wait_for_action_attempt.nil? ? @defaults.wait_for_action_attempt : wait_for_action_attempt Helpers::ActionAttempt.decide_and_wait(Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempt"]), @client, wait_for_action_attempt) end def list(action_attempt_ids:) res = @client.post("/action_attempts/list", {action_attempt_ids: action_attempt_ids}.compact) Seam::Resources::ActionAttempt.load_from_response(res.body["action_attempts"]) end end end end
Version data entries
16 entries across 16 versions & 1 rubygems