Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
53 | public function addCustomFieldToContact(Contact $contact, CustomField $customField, $value) |
||
54 | { |
||
55 | $data = [ |
||
56 | 'contact' => $contact->id, |
||
57 | 'field' => $customField->id, |
||
58 | 'value' => $value, |
||
59 | ]; |
||
60 | |||
61 | $contacts = $this->transformCollection( |
||
62 | $this->post('fieldValues', ['json' => ['fieldValue' => $data]]), |
||
63 | Contact::class, |
||
64 | 'contacts' |
||
65 | ); |
||
66 | |||
67 | return array_shift($contacts); |
||
68 | } |
||
69 | } |
||
70 |