-
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.
- Loading branch information
1 parent
06e0981
commit 53e338a
Showing
12 changed files
with
507 additions
and
0 deletions.
There are no files selected for viewing
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 | ||
--- | ||
|
||
feat(experimental): Add declined transactions report Rebilly/api-definitions#1570 |
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 usage limits events Rebilly/api-definitions#1701 |
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 usage limits configuration to the change items operation Rebilly/api-definitions#1706 |
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 usage limit configuration Rebilly/api-definitions#1650 |
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 |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<?php | ||
/** | ||
* This source file is proprietary and part of Rebilly. | ||
* | ||
* (c) Rebilly SRL | ||
* Rebilly Ltd. | ||
* Rebilly Inc. | ||
* | ||
* @see https://www.rebilly.com | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rebilly\Sdk\Model; | ||
|
||
use JsonSerializable; | ||
|
||
class OrderItemUsageLimits implements JsonSerializable | ||
{ | ||
private array $fields = []; | ||
|
||
public function __construct(array $data = []) | ||
{ | ||
if (array_key_exists('softLimit', $data)) { | ||
$this->setSoftLimit($data['softLimit']); | ||
} | ||
if (array_key_exists('hardLimit', $data)) { | ||
$this->setHardLimit($data['hardLimit']); | ||
} | ||
} | ||
|
||
public static function from(array $data = []): self | ||
{ | ||
return new self($data); | ||
} | ||
|
||
public function getSoftLimit(): ?OrderItemUsageLimitsSoftLimit | ||
{ | ||
return $this->fields['softLimit'] ?? null; | ||
} | ||
|
||
public function setSoftLimit(null|OrderItemUsageLimitsSoftLimit|array $softLimit): static | ||
{ | ||
if ($softLimit !== null && !($softLimit instanceof OrderItemUsageLimitsSoftLimit)) { | ||
$softLimit = OrderItemUsageLimitsSoftLimit::from($softLimit); | ||
} | ||
|
||
$this->fields['softLimit'] = $softLimit; | ||
|
||
return $this; | ||
} | ||
|
||
public function getHardLimit(): ?OrderItemUsageLimitsHardLimit | ||
{ | ||
return $this->fields['hardLimit'] ?? null; | ||
} | ||
|
||
public function setHardLimit(null|OrderItemUsageLimitsHardLimit|array $hardLimit): static | ||
{ | ||
if ($hardLimit !== null && !($hardLimit instanceof OrderItemUsageLimitsHardLimit)) { | ||
$hardLimit = OrderItemUsageLimitsHardLimit::from($hardLimit); | ||
} | ||
|
||
$this->fields['hardLimit'] = $hardLimit; | ||
|
||
return $this; | ||
} | ||
|
||
public function jsonSerialize(): array | ||
{ | ||
$data = []; | ||
if (array_key_exists('softLimit', $this->fields)) { | ||
$data['softLimit'] = $this->fields['softLimit']?->jsonSerialize(); | ||
} | ||
if (array_key_exists('hardLimit', $this->fields)) { | ||
$data['hardLimit'] = $this->fields['hardLimit']?->jsonSerialize(); | ||
} | ||
|
||
return $data; | ||
} | ||
} |
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,77 @@ | ||
<?php | ||
/** | ||
* This source file is proprietary and part of Rebilly. | ||
* | ||
* (c) Rebilly SRL | ||
* Rebilly Ltd. | ||
* Rebilly Inc. | ||
* | ||
* @see https://www.rebilly.com | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rebilly\Sdk\Model; | ||
|
||
use JsonSerializable; | ||
|
||
class OrderItemUsageLimitsHardLimit implements JsonSerializable | ||
{ | ||
private array $fields = []; | ||
|
||
public function __construct(array $data = []) | ||
{ | ||
if (array_key_exists('quantity', $data)) { | ||
$this->setQuantity($data['quantity']); | ||
} | ||
if (array_key_exists('amount', $data)) { | ||
$this->setAmount($data['amount']); | ||
} | ||
} | ||
|
||
public static function from(array $data = []): self | ||
{ | ||
return new self($data); | ||
} | ||
|
||
public function getQuantity(): ?int | ||
{ | ||
return $this->fields['quantity'] ?? null; | ||
} | ||
|
||
public function setQuantity(null|int $quantity): static | ||
{ | ||
$this->fields['quantity'] = $quantity; | ||
|
||
return $this; | ||
} | ||
|
||
public function getAmount(): ?float | ||
{ | ||
return $this->fields['amount'] ?? null; | ||
} | ||
|
||
public function setAmount(null|float|string $amount): static | ||
{ | ||
if (is_string($amount)) { | ||
$amount = (float) $amount; | ||
} | ||
|
||
$this->fields['amount'] = $amount; | ||
|
||
return $this; | ||
} | ||
|
||
public function jsonSerialize(): array | ||
{ | ||
$data = []; | ||
if (array_key_exists('quantity', $this->fields)) { | ||
$data['quantity'] = $this->fields['quantity']; | ||
} | ||
if (array_key_exists('amount', $this->fields)) { | ||
$data['amount'] = $this->fields['amount']; | ||
} | ||
|
||
return $data; | ||
} | ||
} |
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,77 @@ | ||
<?php | ||
/** | ||
* This source file is proprietary and part of Rebilly. | ||
* | ||
* (c) Rebilly SRL | ||
* Rebilly Ltd. | ||
* Rebilly Inc. | ||
* | ||
* @see https://www.rebilly.com | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rebilly\Sdk\Model; | ||
|
||
use JsonSerializable; | ||
|
||
class OrderItemUsageLimitsSoftLimit implements JsonSerializable | ||
{ | ||
private array $fields = []; | ||
|
||
public function __construct(array $data = []) | ||
{ | ||
if (array_key_exists('quantity', $data)) { | ||
$this->setQuantity($data['quantity']); | ||
} | ||
if (array_key_exists('amount', $data)) { | ||
$this->setAmount($data['amount']); | ||
} | ||
} | ||
|
||
public static function from(array $data = []): self | ||
{ | ||
return new self($data); | ||
} | ||
|
||
public function getQuantity(): ?int | ||
{ | ||
return $this->fields['quantity'] ?? null; | ||
} | ||
|
||
public function setQuantity(null|int $quantity): static | ||
{ | ||
$this->fields['quantity'] = $quantity; | ||
|
||
return $this; | ||
} | ||
|
||
public function getAmount(): ?float | ||
{ | ||
return $this->fields['amount'] ?? null; | ||
} | ||
|
||
public function setAmount(null|float|string $amount): static | ||
{ | ||
if (is_string($amount)) { | ||
$amount = (float) $amount; | ||
} | ||
|
||
$this->fields['amount'] = $amount; | ||
|
||
return $this; | ||
} | ||
|
||
public function jsonSerialize(): array | ||
{ | ||
$data = []; | ||
if (array_key_exists('quantity', $this->fields)) { | ||
$data['quantity'] = $this->fields['quantity']; | ||
} | ||
if (array_key_exists('amount', $this->fields)) { | ||
$data['amount'] = $this->fields['amount']; | ||
} | ||
|
||
return $data; | ||
} | ||
} |
Oops, something went wrong.