mirror of
https://github.com/anikeen-com/id.git
synced 2026-11-01 05:09:35 +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
@@ -341,10 +341,41 @@ public function retrievingToken(string $grantType, array $attributes): Result
|
||||
public function createOrderPreview(array $attributes = []): Result
|
||||
```
|
||||
|
||||
### ManagesProducts
|
||||
|
||||
```php
|
||||
public function products(): Result
|
||||
public function boxes(): Result
|
||||
```
|
||||
|
||||
### ManagesShippingLabels
|
||||
|
||||
```php
|
||||
public function shippingLabels(array $parameters = []): Result
|
||||
public function shippingLabel(string $id): Result
|
||||
public function shippingLabelPdf(string $id): ?string
|
||||
public function issueShippingLabel(array $attributes): Result
|
||||
public function shipShippingLabel(array $hex): Result
|
||||
public function shippingPriceList(): Result
|
||||
```
|
||||
|
||||
### ManagesUserBilling
|
||||
|
||||
```php
|
||||
public function createOrderForUser(string $userId, array $attributes): Result
|
||||
public function createTransactionForUser(string $userId, array $attributes): Result
|
||||
```
|
||||
|
||||
### ManagesSocialiteUsers
|
||||
|
||||
```php
|
||||
public function socialiteUsers(): SocialiteUsers
|
||||
```
|
||||
|
||||
### ManagesSshKeys
|
||||
|
||||
```php
|
||||
public function sshKeysByUserId(string $sskKeyId): SshKeys
|
||||
public function sshKeysByUserId(string $userId): SshKeys
|
||||
```
|
||||
|
||||
### ManagesUsers
|
||||
@@ -352,8 +383,10 @@ public function sshKeysByUserId(string $sskKeyId): SshKeys
|
||||
```php
|
||||
public function getAuthedUser(): Result
|
||||
public function createUser(array $attributes): Result
|
||||
public function findOrCreateSocialiteUser(string $provider, string $providerId, ?string $email = null, ?string $name = null): Result
|
||||
public function refreshToken(string $storedRefreshToken, string $scope = ''): Result
|
||||
public function isEmailExisting(string $email): Result
|
||||
public function setParent(?mixed $parent): self
|
||||
public function setParent(mixed $parent): self
|
||||
public function getParent()
|
||||
```
|
||||
|
||||
@@ -365,6 +398,8 @@ public function getParent()
|
||||
```php
|
||||
public function addresses(): Addresses
|
||||
public function hasDefaultBillingAddress(): bool
|
||||
public function setBillable(Billable|Model $billable): self
|
||||
public function getBillable(): Billable
|
||||
```
|
||||
|
||||
### ManagesBalance
|
||||
@@ -372,25 +407,34 @@ public function hasDefaultBillingAddress(): bool
|
||||
```php
|
||||
public function balance(): float
|
||||
public function charges(): float
|
||||
public function charge(float $amount, string $paymentMethodId, array $options = []): Transaction
|
||||
public function billingOverview(): object
|
||||
public function charge(string|float $amount, string $paymentMethodId, array $options = []): Transaction
|
||||
public function setBillable(Billable|Model $billable): self
|
||||
public function getBillable(): Billable
|
||||
```
|
||||
|
||||
### ManagesCountries
|
||||
|
||||
```php
|
||||
public function countries(): Countries
|
||||
public function setBillable(Billable|Model $billable): self
|
||||
public function getBillable(): Billable
|
||||
```
|
||||
|
||||
### ManagesInvoices
|
||||
|
||||
```php
|
||||
public function invoices(array $parameters = []): Invoices
|
||||
public function setBillable(Billable|Model $billable): self
|
||||
public function getBillable(): Billable
|
||||
```
|
||||
|
||||
### ManagesOrders
|
||||
|
||||
```php
|
||||
public function orders(array $parameters = []): Orders
|
||||
public function setBillable(Billable|Model $billable): self
|
||||
public function getBillable(): Billable
|
||||
```
|
||||
|
||||
### ManagesPaymentMethods
|
||||
@@ -400,32 +444,52 @@ public function paymentMethods(): PaymentMethods
|
||||
public function hasPaymentMethod(): ?PaymentMethod
|
||||
public function defaultPaymentMethod(): ?PaymentMethod
|
||||
public function hasDefaultPaymentMethod(): bool
|
||||
public function setDefaultPaymentMethod(string $id): PaymentMethod
|
||||
public function billingPortalUrl(?string $returnUrl = null, array $options = []): string
|
||||
public function createSetupIntent(array $options = []): Result
|
||||
public function setBillable(Billable|Model $billable): self
|
||||
public function getBillable(): Billable
|
||||
```
|
||||
|
||||
### ManagesProfile
|
||||
|
||||
```php
|
||||
public function profilePortalUrl(?string $returnUrl = null, array $options = []): string
|
||||
public function setBillable(Billable|Model $billable): self
|
||||
public function getBillable(): Billable
|
||||
```
|
||||
|
||||
### ManagesSubscriptions
|
||||
|
||||
```php
|
||||
public function subscriptions(): Subscriptions
|
||||
public function appSubscriptions(): AppSubscriptions
|
||||
public function setBillable(Billable|Model $billable): self
|
||||
public function getBillable(): Billable
|
||||
```
|
||||
|
||||
### ManagesTaxation
|
||||
|
||||
```php
|
||||
public function vat(): float
|
||||
public function vatRate(): float
|
||||
public function setBillable(Billable|Model $billable): self
|
||||
public function getBillable(): Billable
|
||||
```
|
||||
|
||||
### ManagesTransactions
|
||||
|
||||
```php
|
||||
public function transactions(): Transactions
|
||||
public function setBillable(Billable|Model $billable): self
|
||||
public function getBillable(): Billable
|
||||
```
|
||||
|
||||
### ManagesUserSshKeys
|
||||
|
||||
```php
|
||||
public function sshKeys(): SshKeys
|
||||
public function setBillable(Billable|Model $billable): self
|
||||
public function getBillable(): Billable
|
||||
```
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user