From 24d31cd6b9fb3d4a35a803d27b60ef8b69074f34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Semp=C3=A9?= Date: Wed, 10 Jul 2024 14:26:07 +0200 Subject: [PATCH] misc: Force external_subscription_id when creating an event --- lib/lago/api/resources/event.rb | 1 - spec/factories/event.rb | 2 +- spec/fixtures/api/event.json | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/lago/api/resources/event.rb b/lib/lago/api/resources/event.rb index b53dc8e..330d77a 100644 --- a/lib/lago/api/resources/event.rb +++ b/lib/lago/api/resources/event.rb @@ -30,7 +30,6 @@ def whitelist_params(params) { root_name => { transaction_id: params[:transaction_id], - external_customer_id: params[:external_customer_id], code: params[:code], timestamp: params[:timestamp], external_subscription_id: params[:external_subscription_id], diff --git a/spec/factories/event.rb b/spec/factories/event.rb index d367c90..7f453c0 100644 --- a/spec/factories/event.rb +++ b/spec/factories/event.rb @@ -1,7 +1,7 @@ FactoryBot.define do factory :event, class: OpenStruct do transaction_id { 'UNIQUE_ID' } - external_customer_id { '5eb02857-a71e-4ea2-bcf9-57d8885990ba' } + external_subscription_id { '5eb02857-a71e-4ea2-bcf9-57d8885990ba' } code { '123' } timestamp { '2022-05-05T12:27:30Z' } properties do diff --git a/spec/fixtures/api/event.json b/spec/fixtures/api/event.json index 565fcde..8d9ede0 100644 --- a/spec/fixtures/api/event.json +++ b/spec/fixtures/api/event.json @@ -3,7 +3,6 @@ "lago_id": "1a901a90-1a90-1a90-1a90-1a901a901a90", "transaction_id": "1a901a90-1a90-1a90-1a90-1a901a901a90", "lago_customer_id": "1a901a90-1a90-1a90-1a90-1a901a901a90", - "external_customer_id": "1a901a90-1a90-1a90-1a90-1a901a901a90", "code": "bm_code", "timestamp": "2022-04-29T08:59:51.998Z", "properties": {