mirror of
https://github.com/anikeen-com/id.git
synced 2026-11-03 22:29:33 +00:00
Bring the package up to date with the Anikeen ID API
Fixed (called endpoints that don't exist):
- charge(): POST v1/billing/charge (Stripe options aren't passed through anymore)
- Invoice::getInvoiceTemporaryUrl(): GET instead of a non-existent PUT
- OrderItems::create(): POST v1/orders/{order}/items
- createUser() / isEmailExisting(): admin endpoints with the app token
- sshKeysByUserId(): app endpoint; no longer returns the first user's keys for every user
- createOrderPreview(): country_iso goes into billing_address as the API expects
- public endpoints (products, order preview) work without a token
- SshKeys::find() results can be deleted
Added:
- Billable: sshKeys() (create, update, delete), billingOverview(), PaymentMethod::delete()
- AnikeenId: products(), boxes(), shipping labels (list, show, pdf, issue, ship, price list),
createOrderForUser(), createTransactionForUser(), findOrCreateSocialiteUser()
Requirements: PHP 8.2+, Laravel 11-13 (Laravel 10 and PHP 8.1 are end of life).
Docs generator handles union types; README regenerated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8de737641e
commit
9613d31a8d
22 files changed
+720
-108
No files matched your search
@@ -3,8 +3,11 @@
|
||||
namespace Anikeen\Id;
|
||||
|
||||
use Anikeen\Id\Concerns\ManagesPricing;
|
||||
use Anikeen\Id\Concerns\ManagesProducts;
|
||||
use Anikeen\Id\Concerns\ManagesShippingLabels;
|
||||
use Anikeen\Id\Concerns\ManagesSocialiteUsers;
|
||||
use Anikeen\Id\Concerns\ManagesSshKeys;
|
||||
use Anikeen\Id\Concerns\ManagesUserBilling;
|
||||
use Anikeen\Id\Concerns\ManagesUsers;
|
||||
use Anikeen\Id\Exceptions\RequestRequiresAuthenticationException;
|
||||
use Anikeen\Id\Exceptions\RequestRequiresClientIdException;
|
||||
@@ -21,6 +24,9 @@ class AnikeenId
|
||||
{
|
||||
use OauthTrait;
|
||||
use ManagesPricing;
|
||||
use ManagesProducts;
|
||||
use ManagesShippingLabels;
|
||||
use ManagesUserBilling;
|
||||
use ManagesSocialiteUsers;
|
||||
use ManagesSshKeys;
|
||||
use ManagesUsers;
|
||||
@@ -398,7 +404,8 @@ class AnikeenId
|
||||
'Client-ID' => $this->getClientId(),
|
||||
'Accept' => 'application/json',
|
||||
];
|
||||
if ($bearerToken = $useClientSecret ? $this->getClientSecret() : $this->getToken()) {
|
||||
// public endpoints (products, order preview, …) work without a token
|
||||
if ($bearerToken = $useClientSecret ? $this->getClientSecret() : $this->token) {
|
||||
$headers['Authorization'] = 'Bearer ' . $bearerToken;
|
||||
}
|
||||
if ($json) {
|
||||
|
||||
Reference in new issue
Block a user