Skip to content

Commit

Permalink
Release 2.0.12
Browse files Browse the repository at this point in the history
  • Loading branch information
vttn committed Apr 2, 2020
1 parent ba0877b commit 25405be
Show file tree
Hide file tree
Showing 31 changed files with 3,674 additions and 358 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The PostFinance Checkout PHP library wraps around the PostFinance Checkout API.

## Documentation

[PostFinance Checkout Web Service API](https://www.postfinance-checkout.ch/doc/api/web-service)
[PostFinance Checkout Web Service API](https://checkout.postfinance.ch/doc/api/web-service)

## Requirements

Expand Down Expand Up @@ -41,7 +41,7 @@ require_once '/path/to/php-sdk/autoload.php';

## Usage
The library needs to be configured with your account's space id, user id, and secret key which are available in your [PostFinance Checkout
account dashboard](https://www.postfinance-checkout.ch/account/select). Set `space_id`, `user_id`, and `api_secret` to their values.
account dashboard](https://checkout.postfinance.ch/account/select). Set `space_id`, `user_id`, and `api_secret` to their values.

### Configuring a Service

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.0.11",
"version": "2.0.12",
"description": "PostFinance Checkout SDK for PHP",
"keywords": [
"postfinancecheckout",
Expand Down
6 changes: 3 additions & 3 deletions lib/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ final class ApiClient {
*
* @var string
*/
private $basePath = 'https://www.postfinance-checkout.ch:443/api';
private $basePath = 'https://checkout.postfinance.ch:443/api';

/**
* An array of headers that are added to every request.
Expand All @@ -54,7 +54,7 @@ final class ApiClient {
*
* @var string
*/
private $userAgent = 'PHP-Client/2.0.11/php';
private $userAgent = 'PHP-Client/2.0.12/php';

/**
* The path to the certificate authority file.
Expand Down Expand Up @@ -456,7 +456,7 @@ public function callApi($resourcePath, $method, $queryParams, $postData, $header
}
} else {
if ($response->getStatusCode() == 409) {
throw new VersioningException();
throw new VersioningException($resourcePath);
}

$data = json_decode($response->getBody());
Expand Down
8 changes: 4 additions & 4 deletions lib/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ class Configuration
*
* @var string
*/
protected $host = 'https://www.postfinance-checkout.ch:443/api';
protected $host = 'https://checkout.postfinance.ch:443/api';

/**
* User agent of the HTTP request, set to "PostFinanceCheckout\Sdk" by default
*
* @var string
*/
protected $userAgent = 'PostFinanceCheckout\Sdk/2.0.11/php';
protected $userAgent = 'PostFinanceCheckout\Sdk/2.0.12/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.0.11' . PHP_EOL;
$report .= ' SDK Package Version: 2.0.11' . PHP_EOL;
$report .= ' OpenAPI Spec Version: 2.0.12' . PHP_EOL;
$report .= ' SDK Package Version: 2.0.12' . PHP_EOL;
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;

return $report;
Expand Down
42 changes: 21 additions & 21 deletions lib/Model/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ class Address implements ModelInterface, ArrayAccess
'mobile_phone_number' => 'string',
'organization_name' => 'string',
'phone_number' => 'string',
'post_code' => 'string',
'postal_state' => 'string',
'postcode' => 'string',
'sales_tax_number' => 'string',
'salutation' => 'string',
'social_security_number' => 'string',
Expand All @@ -90,8 +90,8 @@ class Address implements ModelInterface, ArrayAccess
'mobile_phone_number' => null,
'organization_name' => null,
'phone_number' => null,
'post_code' => null,
'postal_state' => null,
'postcode' => null,
'sales_tax_number' => null,
'salutation' => null,
'social_security_number' => null,
Expand Down Expand Up @@ -119,8 +119,8 @@ class Address implements ModelInterface, ArrayAccess
'mobile_phone_number' => 'mobilePhoneNumber',
'organization_name' => 'organizationName',
'phone_number' => 'phoneNumber',
'post_code' => 'postCode',
'postal_state' => 'postalState',
'postcode' => 'postcode',
'sales_tax_number' => 'salesTaxNumber',
'salutation' => 'salutation',
'social_security_number' => 'socialSecurityNumber',
Expand All @@ -147,8 +147,8 @@ class Address implements ModelInterface, ArrayAccess
'mobile_phone_number' => 'setMobilePhoneNumber',
'organization_name' => 'setOrganizationName',
'phone_number' => 'setPhoneNumber',
'post_code' => 'setPostCode',
'postal_state' => 'setPostalState',
'postcode' => 'setPostcode',
'sales_tax_number' => 'setSalesTaxNumber',
'salutation' => 'setSalutation',
'social_security_number' => 'setSocialSecurityNumber',
Expand All @@ -175,8 +175,8 @@ class Address implements ModelInterface, ArrayAccess
'mobile_phone_number' => 'getMobilePhoneNumber',
'organization_name' => 'getOrganizationName',
'phone_number' => 'getPhoneNumber',
'post_code' => 'getPostCode',
'postal_state' => 'getPostalState',
'postcode' => 'getPostcode',
'sales_tax_number' => 'getSalesTaxNumber',
'salutation' => 'getSalutation',
'social_security_number' => 'getSocialSecurityNumber',
Expand Down Expand Up @@ -228,10 +228,10 @@ public function __construct(array $data = null)

$this->container['phone_number'] = isset($data['phone_number']) ? $data['phone_number'] : null;

$this->container['post_code'] = isset($data['post_code']) ? $data['post_code'] : null;

$this->container['postal_state'] = isset($data['postal_state']) ? $data['postal_state'] : null;

$this->container['postcode'] = isset($data['postcode']) ? $data['postcode'] : null;

$this->container['sales_tax_number'] = isset($data['sales_tax_number']) ? $data['sales_tax_number'] : null;

$this->container['salutation'] = isset($data['salutation']) ? $data['salutation'] : null;
Expand Down Expand Up @@ -659,50 +659,50 @@ public function setPhoneNumber($phone_number)


/**
* Gets post_code
* Gets postal_state
*
* @return string
*/
public function getPostCode()
public function getPostalState()
{
return $this->container['post_code'];
return $this->container['postal_state'];
}

/**
* Sets post_code
* Sets postal_state
*
* @param string $post_code
* @param string $postal_state
*
* @return $this
*/
public function setPostCode($post_code)
public function setPostalState($postal_state)
{
$this->container['post_code'] = $post_code;
$this->container['postal_state'] = $postal_state;

return $this;
}


/**
* Gets postal_state
* Gets postcode
*
* @return string
*/
public function getPostalState()
public function getPostcode()
{
return $this->container['postal_state'];
return $this->container['postcode'];
}

/**
* Sets postal_state
* Sets postcode
*
* @param string $postal_state
* @param string $postcode
*
* @return $this
*/
public function setPostalState($postal_state)
public function setPostcode($postcode)
{
$this->container['postal_state'] = $postal_state;
$this->container['postcode'] = $postcode;

return $this;
}
Expand Down
42 changes: 21 additions & 21 deletions lib/Model/AddressCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ class AddressCreate implements ModelInterface, ArrayAccess
'mobile_phone_number' => 'string',
'organization_name' => 'string',
'phone_number' => 'string',
'post_code' => 'string',
'postal_state' => 'string',
'postcode' => 'string',
'sales_tax_number' => 'string',
'salutation' => 'string',
'social_security_number' => 'string',
Expand All @@ -90,8 +90,8 @@ class AddressCreate implements ModelInterface, ArrayAccess
'mobile_phone_number' => null,
'organization_name' => null,
'phone_number' => null,
'post_code' => null,
'postal_state' => null,
'postcode' => null,
'sales_tax_number' => null,
'salutation' => null,
'social_security_number' => null,
Expand Down Expand Up @@ -119,8 +119,8 @@ class AddressCreate implements ModelInterface, ArrayAccess
'mobile_phone_number' => 'mobilePhoneNumber',
'organization_name' => 'organizationName',
'phone_number' => 'phoneNumber',
'post_code' => 'postCode',
'postal_state' => 'postalState',
'postcode' => 'postcode',
'sales_tax_number' => 'salesTaxNumber',
'salutation' => 'salutation',
'social_security_number' => 'socialSecurityNumber',
Expand All @@ -147,8 +147,8 @@ class AddressCreate implements ModelInterface, ArrayAccess
'mobile_phone_number' => 'setMobilePhoneNumber',
'organization_name' => 'setOrganizationName',
'phone_number' => 'setPhoneNumber',
'post_code' => 'setPostCode',
'postal_state' => 'setPostalState',
'postcode' => 'setPostcode',
'sales_tax_number' => 'setSalesTaxNumber',
'salutation' => 'setSalutation',
'social_security_number' => 'setSocialSecurityNumber',
Expand All @@ -175,8 +175,8 @@ class AddressCreate implements ModelInterface, ArrayAccess
'mobile_phone_number' => 'getMobilePhoneNumber',
'organization_name' => 'getOrganizationName',
'phone_number' => 'getPhoneNumber',
'post_code' => 'getPostCode',
'postal_state' => 'getPostalState',
'postcode' => 'getPostcode',
'sales_tax_number' => 'getSalesTaxNumber',
'salutation' => 'getSalutation',
'social_security_number' => 'getSocialSecurityNumber',
Expand Down Expand Up @@ -228,10 +228,10 @@ public function __construct(array $data = null)

$this->container['phone_number'] = isset($data['phone_number']) ? $data['phone_number'] : null;

$this->container['post_code'] = isset($data['post_code']) ? $data['post_code'] : null;

$this->container['postal_state'] = isset($data['postal_state']) ? $data['postal_state'] : null;

$this->container['postcode'] = isset($data['postcode']) ? $data['postcode'] : null;

$this->container['sales_tax_number'] = isset($data['sales_tax_number']) ? $data['sales_tax_number'] : null;

$this->container['salutation'] = isset($data['salutation']) ? $data['salutation'] : null;
Expand Down Expand Up @@ -659,50 +659,50 @@ public function setPhoneNumber($phone_number)


/**
* Gets post_code
* Gets postal_state
*
* @return string
*/
public function getPostCode()
public function getPostalState()
{
return $this->container['post_code'];
return $this->container['postal_state'];
}

/**
* Sets post_code
* Sets postal_state
*
* @param string $post_code
* @param string $postal_state
*
* @return $this
*/
public function setPostCode($post_code)
public function setPostalState($postal_state)
{
$this->container['post_code'] = $post_code;
$this->container['postal_state'] = $postal_state;

return $this;
}


/**
* Gets postal_state
* Gets postcode
*
* @return string
*/
public function getPostalState()
public function getPostcode()
{
return $this->container['postal_state'];
return $this->container['postcode'];
}

/**
* Sets postal_state
* Sets postcode
*
* @param string $postal_state
* @param string $postcode
*
* @return $this
*/
public function setPostalState($postal_state)
public function setPostcode($postcode)
{
$this->container['postal_state'] = $postal_state;
$this->container['postcode'] = $postcode;

return $this;
}
Expand Down
Loading

0 comments on commit 25405be

Please sign in to comment.