| ) | ) | ||||
| type crmdLead struct { | type crmdLead struct { | ||||
| ID string `json:"id"` | |||||
| ID string `json:"id,omitempty"` | |||||
| Name string `json:"name,omitempty"` | Name string `json:"name,omitempty"` | ||||
| Deleted bool `json:"deleted,omitempty"` | Deleted bool `json:"deleted,omitempty"` | ||||
| SalutationName string `json:"salutationName,omitempty"` | SalutationName string `json:"salutationName,omitempty"` | ||||
| return headers | return headers | ||||
| } | } | ||||
| func crmGetLeadByID(id string) (r crmdLead, err error) { | |||||
| resp, err := crmGetEntity("Lead", id) | |||||
| err = json.Unmarshal([]byte(resp), &r) | |||||
| func crmGetLead(id string) (r crmdLead, err error) { | |||||
| entity, err := crmGetEntity("Lead", id) | |||||
| r = entity.(crmdLead) | |||||
| return | return | ||||
| } | } |