-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update SDK from api-definitions (#679)
Co-authored-by: rebilly-machine-user <[email protected]> Co-authored-by: Arif Kurkchi <[email protected]>
- Loading branch information
1 parent
111b3ed
commit b12425b
Showing
476 changed files
with
23,771 additions
and
22,659 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rebilly/client-php": patch | ||
--- | ||
|
||
Allow negative risk score rule values Rebilly/api-definitions#1865 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rebilly/client-php": patch | ||
--- | ||
|
||
Add riskMetadata field Rebilly/api-definitions#1860 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rebilly/client-php": patch | ||
--- | ||
|
||
Rename orderId to subscriptionId in quotes Rebilly/api-definitions#1856 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rebilly/client-php": patch | ||
--- | ||
|
||
Add orderId to Subscription and OneTimeSale yaml files Rebilly/api-definitions#1849 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rebilly/client-php": patch | ||
--- | ||
|
||
Add detail to default instrument description Rebilly/api-definitions#1846 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rebilly/client-php": patch | ||
--- | ||
|
||
Update subscription/one-time-sale prefix examples Rebilly/api-definitions#1863 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rebilly/client-php": patch | ||
--- | ||
|
||
Add BVNK gateway config Rebilly/api-definitions#1857 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rebilly/client-php": patch | ||
--- | ||
|
||
Rename Quote embedded order to subscription Rebilly/api-definitions#1862 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rebilly/client-php": patch | ||
--- | ||
|
||
Add field to RiskMetadata.extraData Rebilly/api-definitions#1858 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rebilly/client-php": patch | ||
--- | ||
|
||
Add 409 response KYC verification finish endpoint Rebilly/api-definitions#1867 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rebilly/client-php": patch | ||
--- | ||
|
||
Update orderId description Rebilly/api-definitions#1853 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rebilly/client-php": patch | ||
--- | ||
|
||
Add LaCore integration Rebilly/api-definitions#1851 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rebilly/client-php": patch | ||
--- | ||
|
||
Add deposit-request customFields Rebilly/api-definitions#1841 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rebilly/client-php": patch | ||
--- | ||
|
||
Update subscription/one-time-sale prefix examples Rebilly/api-definitions#1824 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rebilly/client-php": patch | ||
--- | ||
|
||
Add payout settings to BVNK Rebilly/api-definitions#1861 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rebilly/client-php": patch | ||
--- | ||
|
||
Add churnTimePolicy to subscription cancellation Rebilly/api-definitions#1839 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rebilly/client-php": patch | ||
--- | ||
|
||
Update patch subscription item status code Rebilly/api-definitions#1854 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
/** | ||
* This source file is proprietary and part of Rebilly. | ||
* | ||
|
@@ -10,22 +11,21 @@ | |
*/ | ||
|
||
use Rebilly\Sdk\Client; | ||
use Rebilly\Sdk\CoreService; | ||
use Rebilly\Sdk\Exception\DataValidationException; | ||
use Rebilly\Sdk\Model\ContactObject; | ||
use Rebilly\Sdk\Model\Customer; | ||
use Rebilly\Sdk\Model\OriginalPlan; | ||
use Rebilly\Sdk\Model\PaymentCardToken; | ||
use Rebilly\Sdk\Model\PaymentInstructionToken; | ||
use Rebilly\Sdk\Model\Plan; | ||
use Rebilly\Sdk\Model\PlanFormulaFlatRate; | ||
use Rebilly\Sdk\Model\PostTransactionRequest; | ||
use Rebilly\Sdk\Model\Product; | ||
use Rebilly\Sdk\Model\Subscription; | ||
use Rebilly\Sdk\Model\SubscriptionOrOneTimeSaleItem; | ||
use Rebilly\Sdk\Model\SubscriptionOrOneTimeSaleItemPlan; | ||
use Rebilly\Sdk\Model\SubscriptionPlan; | ||
use Rebilly\Sdk\Model\SubscriptionPlanRecurringInterval; | ||
use Rebilly\Sdk\Model\Website; | ||
use Rebilly\Sdk\UsersService; | ||
use Rebilly\Sdk\Service; | ||
|
||
require_once __DIR__ . '/../vendor/autoload.php'; | ||
|
||
|
@@ -34,8 +34,7 @@ | |
'organizationId' => '{organizationId}', | ||
'apiKey' => '{secretKey}', | ||
]); | ||
$coreService = new CoreService(client: $client); | ||
$usersService = new UsersService(client: $client); | ||
$service = new Service(client: $client); | ||
|
||
function printEntity(mixed $entity): void | ||
{ | ||
|
@@ -52,7 +51,7 @@ function printEntity(mixed $entity): void | |
->setServicePhone('1234567890') | ||
->setServiceEmail('[email protected]'); | ||
|
||
$website = $usersService->websites()->create($website); | ||
$website = $service->websites()->create($website); | ||
$websiteId = $website->getId(); | ||
|
||
// Create customer | ||
|
@@ -67,7 +66,7 @@ function printEntity(mixed $entity): void | |
|
||
printEntity($customer); | ||
|
||
$customer = $coreService->customers()->create($customer); | ||
$customer = $service->customers()->create($customer); | ||
|
||
echo 'Customer: ' . $customer->getId() . PHP_EOL; | ||
printEntity($customer); | ||
|
@@ -80,14 +79,14 @@ function printEntity(mixed $entity): void | |
|
||
printEntity($product); | ||
|
||
$product = $coreService->products()->create($product); | ||
$product = $service->products()->create($product); | ||
|
||
echo 'Product: ' . $product->getId() . PHP_EOL; | ||
printEntity($product); | ||
|
||
// Create plan | ||
|
||
$plan = Plan::from([]) | ||
$plan = SubscriptionPlan::from([]) | ||
->setProductId($product->getId()) | ||
->setName('Test plan') | ||
->setCurrency('USD') | ||
|
@@ -103,7 +102,7 @@ function printEntity(mixed $entity): void | |
|
||
printEntity($plan); | ||
|
||
$plan = $coreService->plans()->create($plan); | ||
$plan = $service->plans()->create($plan); | ||
|
||
echo 'Plan: ' . $plan->getId() . PHP_EOL; | ||
printEntity($plan); | ||
|
@@ -116,21 +115,21 @@ function printEntity(mixed $entity): void | |
->setItems([ | ||
SubscriptionOrOneTimeSaleItem::from() | ||
->setPlan( | ||
SubscriptionOrOneTimeSaleItemPlan::from() | ||
OriginalPlan::from() | ||
->setId($plan->getId()) | ||
) | ||
->setQuantity(1), | ||
->setQuantity(1), | ||
]); | ||
|
||
printEntity($subscription); | ||
|
||
/** @var Subscription $subscription */ | ||
$subscription = $coreService->subscriptions()->create($subscription); | ||
$subscription = $service->subscriptions()->create($subscription); | ||
|
||
echo 'Subscription: ' . $subscription->getId() . PHP_EOL; | ||
printEntity($subscription); | ||
|
||
$invoice = $coreService->invoices()->get($subscription->getInitialInvoiceId()); | ||
$invoice = $service->invoices()->get($subscription->getInitialInvoiceId()); | ||
|
||
echo 'Initial invoice: ' . $invoice->getId() . PHP_EOL; | ||
printEntity($invoice); | ||
|
@@ -148,7 +147,7 @@ function printEntity(mixed $entity): void | |
|
||
printEntity($token); | ||
|
||
$token = $coreService->paymentTokens()->create($token); | ||
$token = $service->paymentTokens()->create($token); | ||
|
||
echo 'Token: ' . $token->getId() . PHP_EOL; | ||
printEntity($token); | ||
|
@@ -172,12 +171,12 @@ function printEntity(mixed $entity): void | |
|
||
printEntity($transactionRequest); | ||
|
||
$transaction = $coreService->transactions()->create($transactionRequest); | ||
$transaction = $service->transactions()->create($transactionRequest); | ||
|
||
echo 'Transaction: ' . $transaction->getId() . PHP_EOL; | ||
printEntity($transaction); | ||
|
||
$subscription = $coreService->subscriptions()->get($subscription->getId()); | ||
$subscription = $service->subscriptions()->get($subscription->getId()); | ||
|
||
printEntity($subscription); | ||
} catch (DataValidationException $e) { | ||
|
Oops, something went wrong.