Skip to content

Commit

Permalink
chore: update SDK from api-definitions (#693)
Browse files Browse the repository at this point in the history
Co-authored-by: rebilly-machine-user <[email protected]>
  • Loading branch information
1 parent 7316cbd commit 0964f18
Show file tree
Hide file tree
Showing 4 changed files with 156 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/four-books-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

Add optional credentials to Buckaroo Rebilly/api-definitions#1884
5 changes: 5 additions & 0 deletions .changeset/lazy-ties-rush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@rebilly/client-php": patch
---

feat: Add new factors to RiskScoreRules Rebilly/api-definitions#1881
36 changes: 36 additions & 0 deletions src/Model/BuckarooCredentials.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ class BuckarooCredentials implements JsonSerializable

public function __construct(array $data = [])
{
if (array_key_exists('debtorCode', $data)) {
$this->setDebtorCode($data['debtorCode']);
}
if (array_key_exists('schemeKey', $data)) {
$this->setSchemeKey($data['schemeKey']);
}
if (array_key_exists('websiteKey', $data)) {
$this->setWebsiteKey($data['websiteKey']);
}
Expand All @@ -34,6 +40,30 @@ public static function from(array $data = []): self
return new self($data);
}

public function getDebtorCode(): ?string
{
return $this->fields['debtorCode'] ?? null;
}

public function setDebtorCode(null|string $debtorCode): static
{
$this->fields['debtorCode'] = $debtorCode;

return $this;
}

public function getSchemeKey(): ?string
{
return $this->fields['schemeKey'] ?? null;
}

public function setSchemeKey(null|string $schemeKey): static
{
$this->fields['schemeKey'] = $schemeKey;

return $this;
}

public function getWebsiteKey(): string
{
return $this->fields['websiteKey'];
Expand Down Expand Up @@ -61,6 +91,12 @@ public function setSecretKey(string $secretKey): static
public function jsonSerialize(): array
{
$data = [];
if (array_key_exists('debtorCode', $this->fields)) {
$data['debtorCode'] = $this->fields['debtorCode'];
}
if (array_key_exists('schemeKey', $this->fields)) {
$data['schemeKey'] = $this->fields['schemeKey'];
}
if (array_key_exists('websiteKey', $this->fields)) {
$data['websiteKey'] = $this->fields['websiteKey'];
}
Expand Down
110 changes: 110 additions & 0 deletions src/Model/RiskScoreRules.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,21 @@ public function __construct(array $data = [])
if (array_key_exists('billingAddressVelocity', $data)) {
$this->setBillingAddressVelocity($data['billingAddressVelocity']);
}
if (array_key_exists('isRebill', $data)) {
$this->setIsRebill($data['isRebill']);
}
if (array_key_exists('isRetry', $data)) {
$this->setIsRetry($data['isRetry']);
}
if (array_key_exists('customerLifetimeValue', $data)) {
$this->setCustomerLifetimeValue($data['customerLifetimeValue']);
}
if (array_key_exists('browserAdBlockEnabled', $data)) {
$this->setBrowserAdBlockEnabled($data['browserAdBlockEnabled']);
}
if (array_key_exists('paymentInstrumentApprovedTransactionCount', $data)) {
$this->setPaymentInstrumentApprovedTransactionCount($data['paymentInstrumentApprovedTransactionCount']);
}
}

public static function from(array $data = []): self
Expand Down Expand Up @@ -332,6 +347,86 @@ public function setBillingAddressVelocity(RiskScoreBracket|array $billingAddress
return $this;
}

public function getIsRebill(): RiskScoreBoolean
{
return $this->fields['isRebill'];
}

public function setIsRebill(RiskScoreBoolean|array $isRebill): static
{
if (!($isRebill instanceof RiskScoreBoolean)) {
$isRebill = RiskScoreBoolean::from($isRebill);
}

$this->fields['isRebill'] = $isRebill;

return $this;
}

public function getIsRetry(): RiskScoreBoolean
{
return $this->fields['isRetry'];
}

public function setIsRetry(RiskScoreBoolean|array $isRetry): static
{
if (!($isRetry instanceof RiskScoreBoolean)) {
$isRetry = RiskScoreBoolean::from($isRetry);
}

$this->fields['isRetry'] = $isRetry;

return $this;
}

public function getCustomerLifetimeValue(): RiskScoreBracket
{
return $this->fields['customerLifetimeValue'];
}

public function setCustomerLifetimeValue(RiskScoreBracket|array $customerLifetimeValue): static
{
if (!($customerLifetimeValue instanceof RiskScoreBracket)) {
$customerLifetimeValue = RiskScoreBracket::from($customerLifetimeValue);
}

$this->fields['customerLifetimeValue'] = $customerLifetimeValue;

return $this;
}

public function getBrowserAdBlockEnabled(): RiskScoreBoolean
{
return $this->fields['browserAdBlockEnabled'];
}

public function setBrowserAdBlockEnabled(RiskScoreBoolean|array $browserAdBlockEnabled): static
{
if (!($browserAdBlockEnabled instanceof RiskScoreBoolean)) {
$browserAdBlockEnabled = RiskScoreBoolean::from($browserAdBlockEnabled);
}

$this->fields['browserAdBlockEnabled'] = $browserAdBlockEnabled;

return $this;
}

public function getPaymentInstrumentApprovedTransactionCount(): RiskScoreBracket
{
return $this->fields['paymentInstrumentApprovedTransactionCount'];
}

public function setPaymentInstrumentApprovedTransactionCount(RiskScoreBracket|array $paymentInstrumentApprovedTransactionCount): static
{
if (!($paymentInstrumentApprovedTransactionCount instanceof RiskScoreBracket)) {
$paymentInstrumentApprovedTransactionCount = RiskScoreBracket::from($paymentInstrumentApprovedTransactionCount);
}

$this->fields['paymentInstrumentApprovedTransactionCount'] = $paymentInstrumentApprovedTransactionCount;

return $this;
}

public function jsonSerialize(): array
{
$data = [];
Expand Down Expand Up @@ -383,6 +478,21 @@ public function jsonSerialize(): array
if (array_key_exists('billingAddressVelocity', $this->fields)) {
$data['billingAddressVelocity'] = $this->fields['billingAddressVelocity']->jsonSerialize();
}
if (array_key_exists('isRebill', $this->fields)) {
$data['isRebill'] = $this->fields['isRebill']->jsonSerialize();
}
if (array_key_exists('isRetry', $this->fields)) {
$data['isRetry'] = $this->fields['isRetry']->jsonSerialize();
}
if (array_key_exists('customerLifetimeValue', $this->fields)) {
$data['customerLifetimeValue'] = $this->fields['customerLifetimeValue']->jsonSerialize();
}
if (array_key_exists('browserAdBlockEnabled', $this->fields)) {
$data['browserAdBlockEnabled'] = $this->fields['browserAdBlockEnabled']->jsonSerialize();
}
if (array_key_exists('paymentInstrumentApprovedTransactionCount', $this->fields)) {
$data['paymentInstrumentApprovedTransactionCount'] = $this->fields['paymentInstrumentApprovedTransactionCount']->jsonSerialize();
}

return $data;
}
Expand Down

0 comments on commit 0964f18

Please sign in to comment.