diff --git a/lib/ibanity/api/isabel_connect/payment_notification.rb b/lib/ibanity/api/isabel_connect/payment_notification.rb index 25deff1..5c2ec87 100644 --- a/lib/ibanity/api/isabel_connect/payment_notification.rb +++ b/lib/ibanity/api/isabel_connect/payment_notification.rb @@ -5,13 +5,6 @@ def self.list(access_token:, **query_params) list_by_uri(uri: notifications_uri, query_params: query_params, customer_access_token: access_token) end - def self.destroy(id:, access_token:) - uri = Ibanity.isabel_connect_api_schema["bulkPaymentInitiationRequests"] - .sub("{bulkPaymentInitiationRequestId}", "notifications/#{id}") - Ibanity.client.delete(uri: uri, customer_access_token: access_token) - true - end - private_class_method def self.notifications_uri Ibanity.isabel_connect_api_schema["bulkPaymentInitiationRequests"] .sub("{bulkPaymentInitiationRequestId}", "notifications") diff --git a/spec/lib/ibanity/api/isabel_connect/payment_notification_spec.rb b/spec/lib/ibanity/api/isabel_connect/payment_notification_spec.rb index 77df59b..fca1cdb 100644 --- a/spec/lib/ibanity/api/isabel_connect/payment_notification_spec.rb +++ b/spec/lib/ibanity/api/isabel_connect/payment_notification_spec.rb @@ -44,24 +44,5 @@ end end - describe ".destroy" do - before do - allow(client).to receive(:delete) - .with(uri: "#{notifications_uri}/#{notification_id}", customer_access_token: access_token) - .and_return("") - end - - it "returns true" do - result = described_class.destroy(id: notification_id, access_token: access_token) - expect(result).to be true - end - it "calls DELETE on the correct URI" do - expect(client).to receive(:delete) - .with(uri: "#{notifications_uri}/#{notification_id}", customer_access_token: access_token) - .and_return("") - - described_class.destroy(id: notification_id, access_token: access_token) - end - end end