(data []byte)
| 19 | } |
| 20 | |
| 21 | func (org *Organization) UnmarshalJSON(data []byte) error { |
| 22 | type alias Organization |
| 23 | var aliasOrg alias |
| 24 | err := json.Unmarshal(data, &aliasOrg) |
| 25 | if err != nil { |
| 26 | return err |
| 27 | } |
| 28 | |
| 29 | *org = Organization(aliasOrg) |
| 30 | |
| 31 | remainingFields := new(struct { |
| 32 | Relationships struct { |
| 33 | Quota struct { |
| 34 | Data struct { |
| 35 | GUID string |
| 36 | } |
| 37 | } |
| 38 | } |
| 39 | }) |
| 40 | |
| 41 | err = json.Unmarshal(data, &remainingFields) |
| 42 | if err != nil { |
| 43 | return err |
| 44 | } |
| 45 | |
| 46 | org.QuotaGUID = remainingFields.Relationships.Quota.Data.GUID |
| 47 | |
| 48 | return nil |
| 49 | } |
nothing calls this directly
no test coverage detected