From 8663d00db63b24d4259ab6424e3f576648115a4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Semp=C3=A9?= Date: Fri, 24 May 2024 09:55:51 +0200 Subject: [PATCH 1/2] feat(wallet): Add method and target_ongoing_balance to recurring_transaction_rule --- wallet.go | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/wallet.go b/wallet.go index 9558f71..298650b 100644 --- a/wallet.go +++ b/wallet.go @@ -17,22 +17,26 @@ const ( ) type RecurringTransactionRuleInput struct { - LagoID uuid.UUID `json:"lago_id,omitempty"` - Interval string `json:"interval,omitempty"` - ThresholdCredits string `json:"threshold_credits,omitempty"` - Trigger string `json:"trigger,omitempty"` - PaidCredits string `json:"paid_credits,omitempty"` - GrantedCredits string `json:"granted_credits,omitempty"` + LagoID uuid.UUID `json:"lago_id,omitempty"` + Interval string `json:"interval,omitempty"` + Method string `json:"method,omitempty"` + TargetOngoingBalance string `json:"target_ongoing_balance,omitempty"` + ThresholdCredits string `json:"threshold_credits,omitempty"` + Trigger string `json:"trigger,omitempty"` + PaidCredits string `json:"paid_credits,omitempty"` + GrantedCredits string `json:"granted_credits,omitempty"` } type RecurringTransactionRuleResponse struct { - LagoID uuid.UUID `json:"lago_id,omitempty"` - Interval string `json:"interval,omitempty"` - ThresholdCredits string `json:"threshold_credits,omitempty"` - Trigger string `json:"trigger,omitempty"` - PaidCredits string `json:"paid_credits,omitempty"` - GrantedCredits string `json:"granted_credits,omitempty"` - CreatedAt time.Time `json:"created_at,omitempty"` + LagoID uuid.UUID `json:"lago_id,omitempty"` + Interval string `json:"interval,omitempty"` + Method string `json:"method,omitempty"` + TargetOngoingBalance string `json:"target_ongoing_balance,omitempty"` + ThresholdCredits string `json:"threshold_credits,omitempty"` + Trigger string `json:"trigger,omitempty"` + PaidCredits string `json:"paid_credits,omitempty"` + GrantedCredits string `json:"granted_credits,omitempty"` + CreatedAt time.Time `json:"created_at,omitempty"` } type WalletRequest struct { From e60b1585404a5bbdb7b7c20b5aec83d23faec169 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Semp=C3=A9?= Date: Mon, 3 Jun 2024 16:07:50 +0200 Subject: [PATCH 2/2] feat(wallet): Add started_at to recurring_transaction_rule --- wallet.go | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/wallet.go b/wallet.go index 298650b..ef86882 100644 --- a/wallet.go +++ b/wallet.go @@ -17,26 +17,28 @@ const ( ) type RecurringTransactionRuleInput struct { - LagoID uuid.UUID `json:"lago_id,omitempty"` - Interval string `json:"interval,omitempty"` - Method string `json:"method,omitempty"` - TargetOngoingBalance string `json:"target_ongoing_balance,omitempty"` - ThresholdCredits string `json:"threshold_credits,omitempty"` - Trigger string `json:"trigger,omitempty"` - PaidCredits string `json:"paid_credits,omitempty"` - GrantedCredits string `json:"granted_credits,omitempty"` + LagoID uuid.UUID `json:"lago_id,omitempty"` + Interval string `json:"interval,omitempty"` + Method string `json:"method,omitempty"` + StartedAt *time.Time `json:"started_at,omitempty"` + TargetOngoingBalance string `json:"target_ongoing_balance,omitempty"` + ThresholdCredits string `json:"threshold_credits,omitempty"` + Trigger string `json:"trigger,omitempty"` + PaidCredits string `json:"paid_credits,omitempty"` + GrantedCredits string `json:"granted_credits,omitempty"` } type RecurringTransactionRuleResponse struct { - LagoID uuid.UUID `json:"lago_id,omitempty"` - Interval string `json:"interval,omitempty"` - Method string `json:"method,omitempty"` - TargetOngoingBalance string `json:"target_ongoing_balance,omitempty"` - ThresholdCredits string `json:"threshold_credits,omitempty"` - Trigger string `json:"trigger,omitempty"` - PaidCredits string `json:"paid_credits,omitempty"` - GrantedCredits string `json:"granted_credits,omitempty"` - CreatedAt time.Time `json:"created_at,omitempty"` + LagoID uuid.UUID `json:"lago_id,omitempty"` + Interval string `json:"interval,omitempty"` + Method string `json:"method,omitempty"` + StartedAt *time.Time `json:"started_at,omitempty"` + TargetOngoingBalance string `json:"target_ongoing_balance,omitempty"` + ThresholdCredits string `json:"threshold_credits,omitempty"` + Trigger string `json:"trigger,omitempty"` + PaidCredits string `json:"paid_credits,omitempty"` + GrantedCredits string `json:"granted_credits,omitempty"` + CreatedAt time.Time `json:"created_at,omitempty"` } type WalletRequest struct {