Skip to content

Commit

Permalink
Aggiunto getAccountCustomFields
Browse files Browse the repository at this point in the history
  • Loading branch information
HighLiuk committed Oct 29, 2021
1 parent c34a9a4 commit 7a98b25
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Accounts/Accounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,21 @@ public function listAll(array $query_params = [], $limit = 20, $offset = 0)
return $req->getBody()->getContents();
}

/**
* Ottiene i custom field di un account
*/
public function getAccountCustomFields(int $account_id): array
{
$req = $this->client
->getClient()
->get("/api/3/accounts/$account_id/accountCustomFieldData");

$json_response = $req->getBody()->getContents();

return json_decode($json_response, true)['customerAccountCustomFieldData'];
}


/**
* List all accounts
*
Expand Down

0 comments on commit 7a98b25

Please sign in to comment.