(data []byte)
| 194 | } |
| 195 | |
| 196 | func (e *ExchangeResponse) UnmarshalJSON(data []byte) error { |
| 197 | var raw struct { |
| 198 | Status string `json:"status"` |
| 199 | CliID string `json:"cli_id"` |
| 200 | CliId2 string `json:"cliId"` |
| 201 | APIKey string `json:"api_key"` |
| 202 | APIKey2 string `json:"apiKey"` |
| 203 | } |
| 204 | if err := json.Unmarshal(data, &raw); err != nil { |
| 205 | return err |
| 206 | } |
| 207 | if raw.Status != "" { |
| 208 | e.Status = &raw.Status |
| 209 | } |
| 210 | cliID := raw.CliID |
| 211 | if cliID == "" { |
| 212 | cliID = raw.CliId2 |
| 213 | } |
| 214 | if cliID != "" { |
| 215 | e.CliID = &cliID |
| 216 | } |
| 217 | apiKey := raw.APIKey |
| 218 | if apiKey == "" { |
| 219 | apiKey = raw.APIKey2 |
| 220 | } |
| 221 | if apiKey != "" { |
| 222 | e.APIKey = &apiKey |
| 223 | } |
| 224 | return nil |
| 225 | } |
nothing calls this directly
no outgoing calls
no test coverage detected