Skip to content

Commit

Permalink
Release 2.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
vttn committed Jul 25, 2020
1 parent a7df6f7 commit 7a945c5
Show file tree
Hide file tree
Showing 149 changed files with 4,646 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ $userId = 512;
$secret = 'FKrO76r5VwJtBrqZawBspljbBNOxp5veKQQkOnZxucQ=';

// Setup API client
$client = new \PostFinanceCheckout\Sdk\Sdk\ApiClient($userId, $secret);
$client = new \PostFinanceCheckout\Sdk\ApiClient($userId, $secret);

$httpClientType = \PostFinanceCheckout\Sdk\Sdk\Http\HttpClientFactory::TYPE_CURL; // or \PostFinanceCheckout\Sdk\Sdk\Http\HttpClientFactory::TYPE_SOCKET
$httpClientType = \PostFinanceCheckout\Sdk\Http\HttpClientFactory::TYPE_CURL; // or \PostFinanceCheckout\Sdk\Http\HttpClientFactory::TYPE_SOCKET

$client->setHttpClientType($httpClientType);
```
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postfinancecheckout/sdk",
"version": "2.1.0",
"version": "2.1.1",
"description": "PostFinance Checkout SDK for PHP",
"keywords": [
"postfinancecheckout",
Expand Down
14 changes: 13 additions & 1 deletion lib/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ final class ApiClient {
*
* @var string
*/
private $userAgent = 'PHP-Client/2.1.0/php';
private $userAgent = 'PHP-Client/2.1.1/php';

/**
* The path to the certificate authority file.
Expand Down Expand Up @@ -895,6 +895,18 @@ public function getRefundService() {
return $this->refundService;
}

protected $shopifyTransactionService;

/**
* @return \PostFinanceCheckout\Sdk\Service\ShopifyTransactionService
*/
public function getShopifyTransactionService() {
if(is_null($this->shopifyTransactionService)){
$this->shopifyTransactionService = new \PostFinanceCheckout\Sdk\Service\ShopifyTransactionService($this);
}
return $this->shopifyTransactionService;
}

protected $spaceService;

/**
Expand Down
6 changes: 3 additions & 3 deletions lib/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class Configuration
*
* @var string
*/
protected $userAgent = 'PostFinanceCheckout\Sdk/2.1.0/php';
protected $userAgent = 'PostFinanceCheckout\Sdk/2.1.1/php';

/**
* Debug switch (default set to false)
Expand Down Expand Up @@ -388,8 +388,8 @@ public static function toDebugReport()
$report = 'PHP SDK (PostFinanceCheckout\Sdk) Debug Report:' . PHP_EOL;
$report .= ' OS: ' . php_uname() . PHP_EOL;
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
$report .= ' OpenAPI Spec Version: 2.1.0' . PHP_EOL;
$report .= ' SDK Package Version: 2.1.0' . PHP_EOL;
$report .= ' OpenAPI Spec Version: 2.1.1' . PHP_EOL;
$report .= ' SDK Package Version: 2.1.1' . PHP_EOL;
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;

return $report;
Expand Down
15 changes: 15 additions & 0 deletions lib/Model/AbstractAccountUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,14 @@ public function listInvalidProperties()
{
$invalidProperties = [];

if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 200)) {
$invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 200.";
}

if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) < 3)) {
$invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 3.";
}

return $invalidProperties;
}

Expand Down Expand Up @@ -225,6 +233,13 @@ public function getName()
*/
public function setName($name)
{
if (!is_null($name) && (mb_strlen($name) > 200)) {
throw new \InvalidArgumentException('invalid length for $name when calling AbstractAccountUpdate., must be smaller than or equal to 200.');
}
if (!is_null($name) && (mb_strlen($name) < 3)) {
throw new \InvalidArgumentException('invalid length for $name when calling AbstractAccountUpdate., must be bigger than or equal to 3.');
}

$this->container['name'] = $name;

return $this;
Expand Down
8 changes: 8 additions & 0 deletions lib/Model/AbstractApplicationUserUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ public function listInvalidProperties()
{
$invalidProperties = [];

if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 256)) {
$invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 256.";
}

return $invalidProperties;
}

Expand Down Expand Up @@ -232,6 +236,10 @@ public function getName()
*/
public function setName($name)
{
if (!is_null($name) && (mb_strlen($name) > 256)) {
throw new \InvalidArgumentException('invalid length for $name when calling AbstractApplicationUserUpdate., must be smaller than or equal to 256.');
}

$this->container['name'] = $name;

return $this;
Expand Down
32 changes: 32 additions & 0 deletions lib/Model/AbstractCustomerActive.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,22 @@ public function listInvalidProperties()
{
$invalidProperties = [];

if (!is_null($this->container['customer_id']) && (mb_strlen($this->container['customer_id']) > 100)) {
$invalidProperties[] = "invalid value for 'customer_id', the character length must be smaller than or equal to 100.";
}

if (!is_null($this->container['email_address']) && (mb_strlen($this->container['email_address']) > 254)) {
$invalidProperties[] = "invalid value for 'email_address', the character length must be smaller than or equal to 254.";
}

if (!is_null($this->container['family_name']) && (mb_strlen($this->container['family_name']) > 100)) {
$invalidProperties[] = "invalid value for 'family_name', the character length must be smaller than or equal to 100.";
}

if (!is_null($this->container['given_name']) && (mb_strlen($this->container['given_name']) > 100)) {
$invalidProperties[] = "invalid value for 'given_name', the character length must be smaller than or equal to 100.";
}

return $invalidProperties;
}

Expand Down Expand Up @@ -260,6 +276,10 @@ public function getCustomerId()
*/
public function setCustomerId($customer_id)
{
if (!is_null($customer_id) && (mb_strlen($customer_id) > 100)) {
throw new \InvalidArgumentException('invalid length for $customer_id when calling AbstractCustomerActive., must be smaller than or equal to 100.');
}

$this->container['customer_id'] = $customer_id;

return $this;
Expand All @@ -285,6 +305,10 @@ public function getEmailAddress()
*/
public function setEmailAddress($email_address)
{
if (!is_null($email_address) && (mb_strlen($email_address) > 254)) {
throw new \InvalidArgumentException('invalid length for $email_address when calling AbstractCustomerActive., must be smaller than or equal to 254.');
}

$this->container['email_address'] = $email_address;

return $this;
Expand All @@ -310,6 +334,10 @@ public function getFamilyName()
*/
public function setFamilyName($family_name)
{
if (!is_null($family_name) && (mb_strlen($family_name) > 100)) {
throw new \InvalidArgumentException('invalid length for $family_name when calling AbstractCustomerActive., must be smaller than or equal to 100.');
}

$this->container['family_name'] = $family_name;

return $this;
Expand All @@ -335,6 +363,10 @@ public function getGivenName()
*/
public function setGivenName($given_name)
{
if (!is_null($given_name) && (mb_strlen($given_name) > 100)) {
throw new \InvalidArgumentException('invalid length for $given_name when calling AbstractCustomerActive., must be smaller than or equal to 100.');
}

$this->container['given_name'] = $given_name;

return $this;
Expand Down
8 changes: 8 additions & 0 deletions lib/Model/AbstractCustomerCommentActive.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ public function listInvalidProperties()
{
$invalidProperties = [];

if (!is_null($this->container['content']) && (mb_strlen($this->container['content']) > 262144)) {
$invalidProperties[] = "invalid value for 'content', the character length must be smaller than or equal to 262144.";
}

return $invalidProperties;
}

Expand Down Expand Up @@ -218,6 +222,10 @@ public function getContent()
*/
public function setContent($content)
{
if (!is_null($content) && (mb_strlen($content) > 262144)) {
throw new \InvalidArgumentException('invalid length for $content when calling AbstractCustomerCommentActive., must be smaller than or equal to 262144.');
}

$this->container['content'] = $content;

return $this;
Expand Down
32 changes: 32 additions & 0 deletions lib/Model/AbstractHumanUserUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,22 @@ public function listInvalidProperties()
{
$invalidProperties = [];

if (!is_null($this->container['email_address']) && (mb_strlen($this->container['email_address']) > 128)) {
$invalidProperties[] = "invalid value for 'email_address', the character length must be smaller than or equal to 128.";
}

if (!is_null($this->container['firstname']) && (mb_strlen($this->container['firstname']) > 100)) {
$invalidProperties[] = "invalid value for 'firstname', the character length must be smaller than or equal to 100.";
}

if (!is_null($this->container['lastname']) && (mb_strlen($this->container['lastname']) > 100)) {
$invalidProperties[] = "invalid value for 'lastname', the character length must be smaller than or equal to 100.";
}

if (!is_null($this->container['mobile_phone_number']) && (mb_strlen($this->container['mobile_phone_number']) > 30)) {
$invalidProperties[] = "invalid value for 'mobile_phone_number', the character length must be smaller than or equal to 30.";
}

return $invalidProperties;
}

Expand Down Expand Up @@ -267,6 +283,10 @@ public function getEmailAddress()
*/
public function setEmailAddress($email_address)
{
if (!is_null($email_address) && (mb_strlen($email_address) > 128)) {
throw new \InvalidArgumentException('invalid length for $email_address when calling AbstractHumanUserUpdate., must be smaller than or equal to 128.');
}

$this->container['email_address'] = $email_address;

return $this;
Expand All @@ -292,6 +312,10 @@ public function getFirstname()
*/
public function setFirstname($firstname)
{
if (!is_null($firstname) && (mb_strlen($firstname) > 100)) {
throw new \InvalidArgumentException('invalid length for $firstname when calling AbstractHumanUserUpdate., must be smaller than or equal to 100.');
}

$this->container['firstname'] = $firstname;

return $this;
Expand Down Expand Up @@ -342,6 +366,10 @@ public function getLastname()
*/
public function setLastname($lastname)
{
if (!is_null($lastname) && (mb_strlen($lastname) > 100)) {
throw new \InvalidArgumentException('invalid length for $lastname when calling AbstractHumanUserUpdate., must be smaller than or equal to 100.');
}

$this->container['lastname'] = $lastname;

return $this;
Expand All @@ -367,6 +395,10 @@ public function getMobilePhoneNumber()
*/
public function setMobilePhoneNumber($mobile_phone_number)
{
if (!is_null($mobile_phone_number) && (mb_strlen($mobile_phone_number) > 30)) {
throw new \InvalidArgumentException('invalid length for $mobile_phone_number when calling AbstractHumanUserUpdate., must be smaller than or equal to 30.');
}

$this->container['mobile_phone_number'] = $mobile_phone_number;

return $this;
Expand Down
8 changes: 8 additions & 0 deletions lib/Model/AbstractRefundCommentActive.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ public function listInvalidProperties()
{
$invalidProperties = [];

if (!is_null($this->container['content']) && (mb_strlen($this->container['content']) > 262144)) {
$invalidProperties[] = "invalid value for 'content', the character length must be smaller than or equal to 262144.";
}

return $invalidProperties;
}

Expand Down Expand Up @@ -218,6 +222,10 @@ public function getContent()
*/
public function setContent($content)
{
if (!is_null($content) && (mb_strlen($content) > 262144)) {
throw new \InvalidArgumentException('invalid length for $content when calling AbstractRefundCommentActive., must be smaller than or equal to 262144.');
}

$this->container['content'] = $content;

return $this;
Expand Down
15 changes: 15 additions & 0 deletions lib/Model/AbstractSpaceUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,14 @@ public function listInvalidProperties()
{
$invalidProperties = [];

if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) > 200)) {
$invalidProperties[] = "invalid value for 'name', the character length must be smaller than or equal to 200.";
}

if (!is_null($this->container['name']) && (mb_strlen($this->container['name']) < 3)) {
$invalidProperties[] = "invalid value for 'name', the character length must be bigger than or equal to 3.";
}

return $invalidProperties;
}

Expand Down Expand Up @@ -260,6 +268,13 @@ public function getName()
*/
public function setName($name)
{
if (!is_null($name) && (mb_strlen($name) > 200)) {
throw new \InvalidArgumentException('invalid length for $name when calling AbstractSpaceUpdate., must be smaller than or equal to 200.');
}
if (!is_null($name) && (mb_strlen($name) < 3)) {
throw new \InvalidArgumentException('invalid length for $name when calling AbstractSpaceUpdate., must be bigger than or equal to 3.');
}

$this->container['name'] = $name;

return $this;
Expand Down
8 changes: 8 additions & 0 deletions lib/Model/AbstractTransactionCommentActive.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ public function listInvalidProperties()
{
$invalidProperties = [];

if (!is_null($this->container['content']) && (mb_strlen($this->container['content']) > 262144)) {
$invalidProperties[] = "invalid value for 'content', the character length must be smaller than or equal to 262144.";
}

return $invalidProperties;
}

Expand Down Expand Up @@ -218,6 +222,10 @@ public function getContent()
*/
public function setContent($content)
{
if (!is_null($content) && (mb_strlen($content) > 262144)) {
throw new \InvalidArgumentException('invalid length for $content when calling AbstractTransactionCommentActive., must be smaller than or equal to 262144.');
}

$this->container['content'] = $content;

return $this;
Expand Down
8 changes: 8 additions & 0 deletions lib/Model/AbstractTransactionInvoiceCommentActive.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ public function listInvalidProperties()
{
$invalidProperties = [];

if (!is_null($this->container['content']) && (mb_strlen($this->container['content']) > 262144)) {
$invalidProperties[] = "invalid value for 'content', the character length must be smaller than or equal to 262144.";
}

return $invalidProperties;
}

Expand Down Expand Up @@ -218,6 +222,10 @@ public function getContent()
*/
public function setContent($content)
{
if (!is_null($content) && (mb_strlen($content) > 262144)) {
throw new \InvalidArgumentException('invalid length for $content when calling AbstractTransactionInvoiceCommentActive., must be smaller than or equal to 262144.');
}

$this->container['content'] = $content;

return $this;
Expand Down
Loading

0 comments on commit 7a945c5

Please sign in to comment.