Sha256: 08c8ac5ff560b129c524a25f4824437203c6c1cb2bc894866b27c5effaf36303

Contents?: true

Size: 1.95 KB

Versions: 11

Compression:

Stored size: 1.95 KB

Contents

# frozen_string_literal: true

module Svix
  class MessageAttemptAPI
    def initialize(api_client)
      @api = MessageAttemptApi.new(api_client)
    end

    # <b>DEPRECATED:</b> Please use <tt>list_by_msg</tt> or <tt>list_by_endpoint</tt> instead.
    def list(app_id, msg_id, options = {})
      warn "[DEPRECATION] `list` is deprecated.  Please use `list_by_msg` or `list_by_endpoint` instead."
      return self.list_by_msg(app_id, msg_id, options)
    end

    def list_by_msg(app_id, msg_id, options = {})
      return @api.list_attempts_by_msg_api_v1_app_app_id_attempt_msg_msg_id_get(app_id, msg_id, options)
    end

    def list_by_endpoint(app_id, endpoint_id, options = {})
      return @api.list_attempts_by_endpoint_api_v1_app_app_id_attempt_endpoint_endpoint_id_get(app_id, endpoint_id, options)
    end

    def get(app_id, msg_id, attempt_id)
      return @api.get_attempt_api_v1_app_app_id_msg_msg_id_attempt_attempt_id_get(attempt_id, msg_id, app_id)
    end

    def resend(app_id, msg_id, endpoint_id, options = {})
      return @api.resend_webhook_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_resend_post(endpoint_id, msg_id, app_id, options)
    end

    def list_attempted_messages(app_id, endpoint_id, options = {})
      return @api.list_attempted_messages_api_v1_app_app_id_endpoint_endpoint_id_msg_get(endpoint_id, app_id, options)
    end

    def list_attempted_destinations(app_id, msg_id, options = {})
      return @api.list_attempted_destinations_api_v1_app_app_id_msg_msg_id_endpoint_get(msg_id, app_id, options)
    end

    def list_attempts_for_endpoint(app_id, endpoint_id, msg_id, options = {})
      return @api.list_attempts_for_endpoint_api_v1_app_app_id_msg_msg_id_endpoint_endpoint_id_attempt_get(msg_id, app_id, endpoint_id, options)
    end

    def expunge_content(app_id, msg_id, attempt_id)
      return @api.expunge_attempt_content_api_v1_app_app_id_msg_msg_id_attempt_attempt_id_content_delete(attempt_id, msg_id, app_id)
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
svix-0.83.1 lib/svix/message_attempt_api.rb
svix-0.83.0 lib/svix/message_attempt_api.rb
svix-0.82.1 lib/svix/message_attempt_api.rb
svix-0.82.0 lib/svix/message_attempt_api.rb
svix-0.81.0 lib/svix/message_attempt_api.rb
svix-0.80.0 lib/svix/message_attempt_api.rb
svix-0.79.0 lib/svix/message_attempt_api.rb
svix-0.78.0 lib/svix/message_attempt_api.rb
svix-0.77.0 lib/svix/message_attempt_api.rb
svix-0.76.1 lib/svix/message_attempt_api.rb
svix-0.76.0 lib/svix/message_attempt_api.rb