lib/svix/message_attempt_api.rb in svix-0.75.0 vs lib/svix/message_attempt_api.rb in svix-0.76.0

- old
+ new

@@ -1,43 +1,47 @@ # frozen_string_literal: true module Svix - class MessageAttemptAPI - def initialize(api_client) - @api = MessageAttemptApi.new(api_client) - end + 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 + # <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_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 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 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 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_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_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 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