File tree Expand file tree Collapse file tree 1 file changed +51
-1
lines changed
Expand file tree Collapse file tree 1 file changed +51
-1
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,57 @@ From `$client` object, you can access the full Private Packagist Api.
3232
3333## Documentation
3434
35- TODO
35+ #### Customer
36+
37+ ##### List all customers for the organization
38+ ``` php
39+ $customers = $client->customers()->all();
40+ ```
41+ Returns an array of customers.
42+
43+
44+ ##### Create a customer
45+ ``` php
46+ $customer = $client->customers()->create('New customer name');
47+ ```
48+ Returns the customer.
49+
50+ ##### Delete a customer
51+ ``` php
52+ $customerId = 42;
53+ $client->customers()->remove($customerId);
54+ ```
55+
56+ ##### List all packages a customer
57+ ``` php
58+ $packages = $client->customers()->listPackages();
59+ ```
60+ Returns an array of customer packages.
61+
62+ ##### Add packages to a customer
63+ ``` php
64+ $customerId = 42;
65+ $packages = [
66+ ['id' => 12],
67+ ];
68+ $packages = $client->customers()->addPackages($customerId, $packages);
69+ ```
70+ Returns an array of added customer packages.
71+
72+ ##### Remove a package from a customer
73+ ``` php
74+ $customerId = 42;
75+ $packageId = 12;
76+ $client->customers()->removePackage($customerId, $packageId);
77+ ```
78+
79+ #### Package
80+
81+ ##### List all packages for the organization
82+ ``` php
83+ $packages = $client->packages()->all();
84+ ```
85+ Returns an array of packages.
3686
3787## License
3888
You can’t perform that action at this time.
0 commit comments