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