MCPcopy Create free account
hub / github.com/bytebase/bytebase / parseInterval

Function parseInterval

backend/api/stripe/webhook.go:431–437  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

429}
430
431func parseInterval(s string) (storepb.SubscriptionPayload_BillingInterval, error) {
432 v, ok := storepb.SubscriptionPayload_BillingInterval_value[s]
433 if !ok {
434 return storepb.SubscriptionPayload_BILLING_INTERVAL_UNSPECIFIED, errors.Errorf("unknown interval %q", s)
435 }
436 return storepb.SubscriptionPayload_BillingInterval(v), nil
437}
438
439// getStripeCustomer gets the full customer object.
440// Stripe webhooks may only include the customer ID, not the full object.

Callers 1

buildPayloadFromMetadataFunction · 0.85

Calls 1

ErrorfMethod · 0.80

Tested by

no test coverage detected