ShowAccountSerializer function
()
| 38 | |
| 39 | // ShowAccountSerializer function |
| 40 | func 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 | |
| 49 | const ( |
| 50 | SubscriptionTrial = "trial" |
no test coverage detected