Skip to content

[stripe] Use attributionId in stripe queries in usage #12755

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 9, 2022

Conversation

easyCZ
Copy link
Member

@easyCZ easyCZ commented Sep 8, 2022

Description

Customers in staging & prod have been udpated to additively contain attributionId metadata.

Related Issue(s)

Fixes #

How to test

Release Notes

NONE

Documentation

Werft options:

  • /werft with-preview

@easyCZ easyCZ force-pushed the mp/stripe-use-attribution-id-metdata branch from f036a1e to 43fb82c Compare September 8, 2022 08:14
@easyCZ easyCZ changed the title [stripe] Use attributionId in stripe queries [stripe] Use attributionId in stripe queries in usage Sep 8, 2022
@roboquat roboquat added size/M and removed size/L labels Sep 8, 2022
@easyCZ easyCZ force-pushed the mp/stripe-use-attribution-id-metdata branch from 43fb82c to bba700f Compare September 8, 2022 08:43
@roboquat roboquat added size/L and removed size/M labels Sep 8, 2022
@easyCZ easyCZ force-pushed the mp/stripe-use-attribution-id-metdata branch 2 times, most recently from cfe8ef9 to 713cf9b Compare September 8, 2022 18:26
@easyCZ easyCZ force-pushed the mp/stripe-use-attribution-id-metdata branch from 713cf9b to c2d4b28 Compare September 8, 2022 18:32
@easyCZ easyCZ marked this pull request as ready for review September 8, 2022 18:33
@easyCZ easyCZ requested a review from a team September 8, 2022 18:33
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Sep 8, 2022
Copy link
Member

@svenefftinge svenefftinge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! ❤️

})
if err != nil {
return nil, fmt.Errorf("failed to register usage for customer %q on subscription item %s", customer.Name, subscriptionItemId)
}

return &UsageRecord{
SubscriptionItemID: subscriptionItemId,
Quantity: summary.Credits,
Quantity: credits,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: do we use this struct anywhere? the name UsageRecord might be a bit confusing given we have records called Usage.

Copy link
Member Author

@easyCZ easyCZ Sep 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair. It was mostly to return something from the method but we can easily return a tuple instead.

@roboquat roboquat merged commit 9329939 into main Sep 9, 2022
@roboquat roboquat deleted the mp/stripe-use-attribution-id-metdata branch September 9, 2022 05:18
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/L team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants