()
| 273 | } |
| 274 | |
| 275 | func (r *userResponse) toUser() DashboardUser { |
| 276 | u := DashboardUser{} |
| 277 | |
| 278 | switch { |
| 279 | case r.HasPaymentMethod != nil: |
| 280 | u.HasPaymentMethod = *r.HasPaymentMethod |
| 281 | case r.Data != nil && r.Data.Attributes.HasPaymentMethod != nil: |
| 282 | u.HasPaymentMethod = *r.Data.Attributes.HasPaymentMethod |
| 283 | } |
| 284 | |
| 285 | return u |
| 286 | } |