Skip to content

Commit

Permalink
Merge branch 'main' into f/email_templates
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmenendez committed Nov 26, 2024
2 parents 55e5ec3 + 1aa9fbb commit d7c3037
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@ Only the following parameters can be changed. Every parameter is optional.
"endDate":"0001-01-01T00:00:00Z",
"renewalDate":"0001-01-01T00:00:00Z",
"active":true,
"email": "[email protected]",
"maxCensusSize":10
},
"usage":{
Expand Down
1 change: 1 addition & 0 deletions api/stripe.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ func (a *API) handleWebhook(w http.ResponseWriter, r *http.Request) {
RenewalDate: renewalDate,
Active: subscription.Status == "active",
MaxCensusSize: int(subscription.Items.Data[0].Quantity),
Email: customer.Email,
}

// TODO will only worked for new subscriptions
Expand Down
1 change: 1 addition & 0 deletions db/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ type OrganizationSubscription struct {
RenewalDate time.Time `json:"renewalDate" bson:"renewalDate"`
Active bool `json:"active" bson:"active"`
MaxCensusSize int `json:"maxCensusSize" bson:"maxCensusSize"`
Email string `json:"email" bson:"email"`
}

type OrganizationCounters struct {
Expand Down

0 comments on commit d7c3037

Please sign in to comment.