MCPcopy Create free account
hub / github.com/devinterface/startersaas-go-api / ShowAccountSerializer

Function ShowAccountSerializer

models/account.model.go:40–47  ·  view source on GitHub ↗

ShowAccountSerializer function

()

Source from the content-addressed store, hash-verified

38
39// ShowAccountSerializer function
40func ShowAccountSerializer() *AccountSerializer {
41 a := &AccountSerializer{structomap.New()}
42 a.UseCamelCase().Pick("ID", "Subdomain", "CompanyName", "CompanyVat", "CompanyBillingAddress", "CompanySdi", "CompanyPec", "CompanyPhone", "CompanyEmail", "CompanyCountry", "PaymentFailed", "PaymentFailedFirstAt", "TrialPeriodEndsAt", "PaymentFailedSubscriptionEndsAt", "PrivacyAccepted", "MarketingAccepted", "StripePlanID", "SubscriptionExpiresAt", "PlanType", "CreatedAt", "UpdatedAt").AddFunc("SubscriptionStatus", func(a interface{}) interface{} {
43 account := a.(*Account)
44 return account.SubscriptionStatus()
45 })
46 return a
47}
48
49const (
50 SubscriptionTrial = "trial"

Callers 3

MeMethod · 0.92
ByIDMethod · 0.92
UpdateMethod · 0.92

Calls 1

SubscriptionStatusMethod · 0.80

Tested by

no test coverage detected