Skip to content

Commit

Permalink
Release 4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
wallee-deployment-user committed Jul 20, 2023
1 parent 278ee4d commit 39c68c8
Show file tree
Hide file tree
Showing 106 changed files with 3,943 additions and 611 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ sudo: false
php:
- 8.0
- 8.1
- 8.2
before_install: "composer install"
script: "phpunit --bootstrap autoload.php test/"
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": "3.2.0",
"version": "4.0.0",
"description": "PostFinance Checkout SDK for PHP",
"keywords": [
"postfinancecheckout",
Expand Down
16 changes: 14 additions & 2 deletions lib/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ final class ApiClient {
* @var array
*/
private $defaultHeaders = [
'x-meta-sdk-version' => "3.2.0",
'x-meta-sdk-version' => "4.0.0",
'x-meta-sdk-language' => 'php',
'x-meta-sdk-provider' => "PostFinance Checkout",
];
Expand All @@ -58,7 +58,7 @@ final class ApiClient {
*
* @var string
*/
private $userAgent = 'PHP-Client/3.2.0/php';
private $userAgent = 'PHP-Client/4.0.0/php';

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

protected $cardProcessingService;

/**
* @return \PostFinanceCheckout\Sdk\Service\CardProcessingService
*/
public function getCardProcessingService() {
if(is_null($this->cardProcessingService)){
$this->cardProcessingService = new \PostFinanceCheckout\Sdk\Service\CardProcessingService($this);
}
return $this->cardProcessingService;
}

protected $chargeAttemptService;

/**
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/3.2.0/php';
protected $userAgent = 'PostFinanceCheckout\Sdk/4.0.0/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: 3.2.0' . PHP_EOL;
$report .= ' SDK Package Version: 3.2.0' . PHP_EOL;
$report .= ' OpenAPI Spec Version: 4.0.0' . PHP_EOL;
$report .= ' SDK Package Version: 4.0.0' . PHP_EOL;
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;

return $report;
Expand Down
4 changes: 2 additions & 2 deletions lib/Model/AbstractAccountUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ public function getName()
/**
* Sets name
*
* @param string $name The name of the account identifies the account within the administrative interface.
* @param string $name The name used to identify the account.
*
* @return $this
*/
Expand Down Expand Up @@ -291,7 +291,7 @@ public function getSubaccountLimit()
/**
* Sets subaccount_limit
*
* @param int $subaccount_limit This property restricts the number of subaccounts which can be created within this account.
* @param int $subaccount_limit The number of sub-accounts that can be created within this account.
*
* @return $this
*/
Expand Down
4 changes: 2 additions & 2 deletions lib/Model/AbstractApplicationUserUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public function getName()
/**
* Sets name
*
* @param string $name The user name is used to identify the application user in administrative interfaces.
* @param string $name The name used to identify the application user.
*
* @return $this
*/
Expand Down Expand Up @@ -259,7 +259,7 @@ public function getRequestLimit()
/**
* Sets request_limit
*
* @param int $request_limit The request limit defines the maximum number of API request accepted within 2 minutes. This limit can only be changed with special privileges.
* @param int $request_limit The maximum number of API requests that are accepted every 2 minutes.
*
* @return $this
*/
Expand Down
12 changes: 6 additions & 6 deletions lib/Model/AbstractCustomerActive.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public function getCustomerId()
/**
* Sets customer_id
*
* @param string $customer_id
* @param string $customer_id The customer's ID in the merchant's system.
*
* @return $this
*/
Expand Down Expand Up @@ -299,7 +299,7 @@ public function getEmailAddress()
/**
* Sets email_address
*
* @param string $email_address
* @param string $email_address The customer's email address.
*
* @return $this
*/
Expand Down Expand Up @@ -328,7 +328,7 @@ public function getFamilyName()
/**
* Sets family_name
*
* @param string $family_name
* @param string $family_name The customer's family or last name.
*
* @return $this
*/
Expand Down Expand Up @@ -357,7 +357,7 @@ public function getGivenName()
/**
* Sets given_name
*
* @param string $given_name
* @param string $given_name The customer's given or first name.
*
* @return $this
*/
Expand Down Expand Up @@ -411,7 +411,7 @@ public function getMetaData()
/**
* Sets meta_data
*
* @param map[string,string] $meta_data Meta data allow to store additional data along the object.
* @param map[string,string] $meta_data Allow to store additional information about the object.
*
* @return $this
*/
Expand All @@ -436,7 +436,7 @@ public function getPreferredCurrency()
/**
* Sets preferred_currency
*
* @param string $preferred_currency
* @param string $preferred_currency The customer's preferred currency.
*
* @return $this
*/
Expand Down
4 changes: 2 additions & 2 deletions lib/Model/AbstractCustomerAddressActive.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public function getAddress()
/**
* Sets address
*
* @param \PostFinanceCheckout\Sdk\Model\CustomerPostalAddressCreate $address
* @param \PostFinanceCheckout\Sdk\Model\CustomerPostalAddressCreate $address The actual postal address.
*
* @return $this
*/
Expand All @@ -244,7 +244,7 @@ public function getAddressType()
/**
* Sets address_type
*
* @param \PostFinanceCheckout\Sdk\Model\CustomerAddressType $address_type
* @param \PostFinanceCheckout\Sdk\Model\CustomerAddressType $address_type Whether the address is for billing or shipping or both.
*
* @return $this
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/AbstractCustomerCommentActive.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public function getContent()
/**
* Sets content
*
* @param string $content
* @param string $content The comment's actual content.
*
* @return $this
*/
Expand Down
14 changes: 7 additions & 7 deletions lib/Model/AbstractHumanUserUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public function getEmailAddress()
/**
* Sets email_address
*
* @param string $email_address The email address of the user.
* @param string $email_address The user's email address.
*
* @return $this
*/
Expand Down Expand Up @@ -306,7 +306,7 @@ public function getFirstname()
/**
* Sets firstname
*
* @param string $firstname The first name of the user.
* @param string $firstname The user's first name.
*
* @return $this
*/
Expand Down Expand Up @@ -335,7 +335,7 @@ public function getLanguage()
/**
* Sets language
*
* @param string $language The preferred language of the user.
* @param string $language The user's preferred language.
*
* @return $this
*/
Expand All @@ -360,7 +360,7 @@ public function getLastname()
/**
* Sets lastname
*
* @param string $lastname The last name of the user.
* @param string $lastname The user's last name.
*
* @return $this
*/
Expand Down Expand Up @@ -389,7 +389,7 @@ public function getMobilePhoneNumber()
/**
* Sets mobile_phone_number
*
* @param string $mobile_phone_number
* @param string $mobile_phone_number The user's mobile phone number.
*
* @return $this
*/
Expand Down Expand Up @@ -443,7 +443,7 @@ public function getTimeZone()
/**
* Sets time_zone
*
* @param string $time_zone The time zone which is applied for the user. If no timezone is specified the browser is used to determine an appropriate time zone.
* @param string $time_zone The user's time zone. If none is specified, the one provided by the browser will be used.
*
* @return $this
*/
Expand All @@ -468,7 +468,7 @@ public function getTwoFactorEnabled()
/**
* Sets two_factor_enabled
*
* @param bool $two_factor_enabled Defines whether two-factor authentication is enabled for this user.
* @param bool $two_factor_enabled Whether two-factor authentication is enabled for this user.
*
* @return $this
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/AbstractRefundCommentActive.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public function getContent()
/**
* Sets content
*
* @param string $content
* @param string $content The comment's actual content.
*
* @return $this
*/
Expand Down
12 changes: 6 additions & 6 deletions lib/Model/AbstractSpaceUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ public function getName()
/**
* Sets name
*
* @param string $name The space name is used internally to identify the space in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive.
* @param string $name The name used to identify the space.
*
* @return $this
*/
Expand Down Expand Up @@ -326,7 +326,7 @@ public function getPostalAddress()
/**
* Sets postal_address
*
* @param \PostFinanceCheckout\Sdk\Model\SpaceAddressCreate $postal_address The address to use in communication with clients for example in email, documents etc.
* @param \PostFinanceCheckout\Sdk\Model\SpaceAddressCreate $postal_address The address that is used in communication with clients for example in emails, documents, etc.
*
* @return $this
*/
Expand All @@ -351,7 +351,7 @@ public function getPrimaryCurrency()
/**
* Sets primary_currency
*
* @param string $primary_currency This is the currency that is used to display aggregated amounts in the space.
* @param string $primary_currency The currency that is used to display aggregated amounts in the space.
*
* @return $this
*/
Expand All @@ -376,7 +376,7 @@ public function getRequestLimit()
/**
* Sets request_limit
*
* @param int $request_limit The request limit defines the maximum number of API request accepted within 2 minutes for this space. This limit can only be changed with special privileges.
* @param int $request_limit The maximum number of API requests that are accepted within two minutes. This limit can only be changed with special privileges.
*
* @return $this
*/
Expand Down Expand Up @@ -426,7 +426,7 @@ public function getTechnicalContactAddresses()
/**
* Sets technical_contact_addresses
*
* @param string[] $technical_contact_addresses The email address provided as contact addresses will be informed about technical issues or errors triggered by the space.
* @param string[] $technical_contact_addresses The email address that will receive messages about technical issues and errors that occur in the space.
*
* @return $this
*/
Expand All @@ -451,7 +451,7 @@ public function getTimeZone()
/**
* Sets time_zone
*
* @param string $time_zone The time zone assigned to the space determines the time offset for calculating dates within the space. This is typically used for background processed which needs to be triggered on a specific hour within the day. Changing the space time zone will not change the display of dates.
* @param string $time_zone The time zone that is used to schedule and run background processes. This does not affect the formatting of dates in the user interface.
*
* @return $this
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/AbstractTransactionCommentActive.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public function getContent()
/**
* Sets content
*
* @param string $content
* @param string $content The comment's actual content.
*
* @return $this
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/AbstractTransactionInvoiceCommentActive.php
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public function getContent()
/**
* Sets content
*
* @param string $content
* @param string $content The comment's actual content.
*
* @return $this
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/Model/AbstractTransactionPending.php
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ public function getMetaData()
/**
* Sets meta_data
*
* @param map[string,string] $meta_data Meta data allow to store additional data along the object.
* @param map[string,string] $meta_data Allow to store additional information about the object.
*
* @return $this
*/
Expand Down
6 changes: 3 additions & 3 deletions lib/Model/AbstractWebhookListenerUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ public function getEntityStates()
/**
* Sets entity_states
*
* @param string[] $entity_states The target state identifies the state into which entities need to move into to trigger the webhook listener.
* @param string[] $entity_states The entity's target states that are to be monitored.
*
* @return $this
*/
Expand All @@ -262,7 +262,7 @@ public function getName()
/**
* Sets name
*
* @param string $name The webhook listener name is used internally to identify the webhook listener in administrative interfaces.For example it is used within search fields and hence it should be distinct and descriptive.
* @param string $name The name used to identify the webhook listener.
*
* @return $this
*/
Expand Down Expand Up @@ -291,7 +291,7 @@ public function getNotifyEveryChange()
/**
* Sets notify_every_change
*
* @param bool $notify_every_change Defines whether the webhook listener is to be informed about every change made to the entity in contrast to state transitions only.
* @param bool $notify_every_change Whether every update of the entity or only state changes are to be monitored.
*
* @return $this
*/
Expand Down
4 changes: 2 additions & 2 deletions lib/Model/AbstractWebhookUrlUpdate.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ public function getName()
/**
* Sets name
*
* @param string $name The URL name is used internally to identify the URL in administrative interfaces. For example it is used within search fields and hence it should be distinct and descriptive.
* @param string $name The name used to identify the webhook URL.
*
* @return $this
*/
Expand Down Expand Up @@ -292,7 +292,7 @@ public function getUrl()
/**
* Sets url
*
* @param string $url The URL to which the HTTP requests are sent to. An example URL could look like https://www.example.com/some/path?some-query-parameter=value.
* @param string $url The actual URL where notifications about entity changes are sent to.
*
* @return $this
*/
Expand Down
Loading

0 comments on commit 39c68c8

Please sign in to comment.