toApplication flattens a JSON:API resource into a simple Application.
()
| 170 | |
| 171 | // toApplication flattens a JSON:API resource into a simple Application. |
| 172 | func (r *ApplicationResource) toApplication() Application { |
| 173 | return Application{ |
| 174 | ID: r.Attributes.ApplicationID, |
| 175 | Name: r.Attributes.Name, |
| 176 | APIKey: r.Attributes.APIKey, |
| 177 | PlanLabel: r.Attributes.Plan.Label, |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | // PlanTypeFree is the attributes.type value that identifies the free-tier plan |
| 182 | // template. The free plan's configuration.plan id is not fixed (it can be |
no outgoing calls
no test coverage detected