overmindtech / sdp

Protobuf based protocol for describing the state of a system
Other
4 stars 1 forks source link

Create GetUsage SDP definitions #222

Closed getinnocuous closed 3 weeks ago

getinnocuous commented 3 weeks ago

As discussed in #941, the data returned from Stripe will look similar to below.

type UsageData struct {
    id       string
    cost     float64
    tiers    []*stripe.PriceTier
    quantity int64
}
getinnocuous commented 3 weeks ago

Closing this. Upon reflection it makes more sense for the frontend to query Stripe directly rather than adding another step in the chain.

dylanratcliffe commented 3 weeks ago

@getinnocuous Might be worth getting @DavidS-ovm's opinion on where that should live. Even though it's another step, it might be one less place that we have to share the Strip auth stuff for example

getinnocuous commented 3 weeks ago

@getinnocuous Might be worth getting @DavidS-ovm's opinion on where that should live. Even though it's another step, it might be one less place that we have to share the Strip auth stuff for example

This decision was made as a result of speaking with David. We came to the conclusion that whilst it means another bit of Stripe config/setup, we will be able to move a lot quicker talking to Stripe directly rather than having to go via the api-server.