From 06be9a2da02d0753cdf689717bcf7b39b95ffd73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Semp=C3=A9?= Date: Wed, 15 May 2024 11:35:49 +0200 Subject: [PATCH] feat(wallet): Rename wallet rule_type into trigger --- lib/lago/api/resources/wallet.rb | 2 +- spec/factories/wallet.rb | 2 +- spec/lago/api/resources/wallet_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/lago/api/resources/wallet.rb b/lib/lago/api/resources/wallet.rb index 2d1ab95..d9c1219 100644 --- a/lib/lago/api/resources/wallet.rb +++ b/lib/lago/api/resources/wallet.rb @@ -37,8 +37,8 @@ def whitelist_recurring_rules(rules) :lago_id, :paid_credits, :granted_credits, - :rule_type, :threshold_credits, + :trigger, :interval, ) diff --git a/spec/factories/wallet.rb b/spec/factories/wallet.rb index 5bdbc37..a1b0ec4 100644 --- a/spec/factories/wallet.rb +++ b/spec/factories/wallet.rb @@ -9,7 +9,7 @@ recurring_transaction_rules do [ { - rule_type: 'interval', + trigger: 'interval', interval: 'monthly', paid_credits: '105', granted_credits: '105', diff --git a/spec/lago/api/resources/wallet_spec.rb b/spec/lago/api/resources/wallet_spec.rb index 7430419..e39cb41 100644 --- a/spec/lago/api/resources/wallet_spec.rb +++ b/spec/lago/api/resources/wallet_spec.rb @@ -49,7 +49,7 @@ expect(wallet.lago_id).to eq('this-is-lago-id') expect(wallet.name).to eq(factory_wallet.name) - expect(wallet.recurring_transaction_rules.first.rule_type).to eq('interval') + expect(wallet.recurring_transaction_rules.first.trigger).to eq('interval') expect(wallet.recurring_transaction_rules.first.interval).to eq('monthly') end end