Skip to content

Commit

Permalink
Release 1.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoEigenmannCW committed Jul 19, 2018
1 parent 96286d5 commit a7d80c1
Show file tree
Hide file tree
Showing 20 changed files with 2,484 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ try {

## License

Please see the [license file](LICENSE) for more information.
Please see the [license file](LICENSE) for more information.
6 changes: 5 additions & 1 deletion lib/Http/SocketHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,11 @@ private function createSocketStream(ApiClient $apiClient, HttpRequest $request)
$host = ($request->isSecureConnection() ? $this->getSslProtocol() . '://' : '') . $request->getHost();
$port = $request->getPort();
}
$socket = $host . ':' . $port;

$socket = $host;
if(!empty($port)){
$socket .= ':' . $port;
}

$filePointer = @stream_socket_client($socket, $errno, $errstr, $apiClient->getConnectionTimeout(), STREAM_CLIENT_CONNECT,
$this->createStreamContext($apiClient, $request));
Expand Down
244 changes: 244 additions & 0 deletions lib/Model/AbstractSubscriptionAffiliateUpdate.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,244 @@
<?php
/**
* wallee SDK
*
* This library allows to interact with the wallee payment service.
* wallee SDK: 1.0.0
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

namespace Wallee\Sdk\Model;

use Wallee\Sdk\ValidationException;

/**
* AbstractSubscriptionAffiliateUpdate model
*
* @category Class
* @package Wallee\Sdk
* @author customweb GmbH
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache License v2
*/
class AbstractSubscriptionAffiliateUpdate {

/**
* The original name of the model.
*
* @var string
*/
private static $swaggerModelName = 'Abstract.SubscriptionAffiliate.Update';

/**
* An array of property to type mappings. Used for (de)serialization.
*
* @var string[]
*/
private static $swaggerTypes = array(
'language' => 'string',
'metaData' => 'map[string,string]',
'name' => 'string',
'state' => '\Wallee\Sdk\Model\CreationEntityState' );

/**
* Returns an array of property to type mappings.
*
* @return string[]
*/
public static function swaggerTypes() {
return self::$swaggerTypes;
}



/**
*
*
* @var string
*/
private $language;

/**
* Meta data allow to store additional data along the object.
*
* @var map[string,string]
*/
private $metaData;

/**
*
*
* @var string
*/
private $name;

/**
*
*
* @var \Wallee\Sdk\Model\CreationEntityState
*/
private $state;


/**
* Constructor.
*
* @param mixed[] $data an associated array of property values initializing the model
*/
public function __construct(array $data = null) {
if (isset($data['language'])) {
$this->setLanguage($data['language']);
}
if (isset($data['metaData'])) {
$this->setMetaData($data['metaData']);
}
if (isset($data['name'])) {
$this->setName($data['name']);
}
if (isset($data['state'])) {
$this->setState($data['state']);
}
}


/**
* Returns language.
*
*
*
* @return string
*/
public function getLanguage() {
return $this->language;
}

/**
* Sets language.
*
* @param string $language
* @return AbstractSubscriptionAffiliateUpdate
*/
public function setLanguage($language) {
$this->language = $language;

return $this;
}

/**
* Returns metaData.
*
* Meta data allow to store additional data along the object.
*
* @return map[string,string]
*/
public function getMetaData() {
return $this->metaData;
}

/**
* Sets metaData.
*
* @param map[string,string] $metaData
* @return AbstractSubscriptionAffiliateUpdate
*/
public function setMetaData($metaData) {
$this->metaData = $metaData;

return $this;
}

/**
* Returns name.
*
*
*
* @return string
*/
public function getName() {
return $this->name;
}

/**
* Sets name.
*
* @param string $name
* @return AbstractSubscriptionAffiliateUpdate
*/
public function setName($name) {
$this->name = $name;

return $this;
}

/**
* Returns state.
*
*
*
* @return \Wallee\Sdk\Model\CreationEntityState
*/
public function getState() {
return $this->state;
}

/**
* Sets state.
*
* @param \Wallee\Sdk\Model\CreationEntityState $state
* @return AbstractSubscriptionAffiliateUpdate
*/
public function setState($state) {
$this->state = $state;

return $this;
}

/**
* Validates the model's properties and throws a ValidationException if the validation fails.
*
* @throws ValidationException
*/
public function validate() {

}

/**
* Returns true if all the properties in the model are valid.
*
* @return boolean
*/
public function isValid() {
try {
$this->validate();
return true;
} catch (ValidationException $e) {
return false;
}
}

/**
* Returns the string presentation of the object.
*
* @return string
*/
public function __toString() {
if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print
return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);
}

return json_encode(\Wallee\Sdk\ObjectSerializer::sanitizeForSerialization($this));
}

}

34 changes: 34 additions & 0 deletions lib/Model/PaymentLink.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class PaymentLink {
'maximalNumberOfTransactions' => 'int',
'name' => 'string',
'plannedPurgeDate' => '\DateTime',
'protectionMode' => '\Wallee\Sdk\Model\PaymentLinkProtectionMode',
'shippingAddressRequired' => 'bool',
'state' => '\Wallee\Sdk\Model\CreationEntityState',
'url' => 'string',
Expand Down Expand Up @@ -175,6 +176,13 @@ public static function swaggerTypes() {
*/
private $plannedPurgeDate;

/**
* The protection mode determines if the payment link is protected against tampering and in what way.
*
* @var \Wallee\Sdk\Model\PaymentLinkProtectionMode
*/
private $protectionMode;

/**
* By making the shipping address required the transaction can only be created when a shipping address is provided within the request.
*
Expand Down Expand Up @@ -219,6 +227,9 @@ public function __construct(array $data = null) {
if (isset($data['lineItems'])) {
$this->setLineItems($data['lineItems']);
}
if (isset($data['protectionMode'])) {
$this->setProtectionMode($data['protectionMode']);
}
if (isset($data['state'])) {
$this->setState($data['state']);
}
Expand Down Expand Up @@ -550,6 +561,29 @@ protected function setPlannedPurgeDate($plannedPurgeDate) {
return $this;
}

/**
* Returns protectionMode.
*
* The protection mode determines if the payment link is protected against tampering and in what way.
*
* @return \Wallee\Sdk\Model\PaymentLinkProtectionMode
*/
public function getProtectionMode() {
return $this->protectionMode;
}

/**
* Sets protectionMode.
*
* @param \Wallee\Sdk\Model\PaymentLinkProtectionMode $protectionMode
* @return PaymentLink
*/
public function setProtectionMode($protectionMode) {
$this->protectionMode = $protectionMode;

return $this;
}

/**
* Returns shippingAddressRequired.
*
Expand Down
36 changes: 35 additions & 1 deletion lib/Model/PaymentLinkCreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ class PaymentLinkCreate extends AbstractPaymentLinkUpdate {
*/
private static $swaggerTypes = array(
'state' => '\Wallee\Sdk\Model\CreationEntityState',
'externalId' => 'string' );
'externalId' => 'string',
'protectionMode' => '\Wallee\Sdk\Model\PaymentLinkProtectionMode' );

/**
* Returns an array of property to type mappings.
Expand All @@ -75,6 +76,13 @@ public static function swaggerTypes() {
*/
private $externalId;

/**
* The protection mode determines if the payment link is protected against tampering and in what way.
*
* @var \Wallee\Sdk\Model\PaymentLinkProtectionMode
*/
private $protectionMode;


/**
* Constructor.
Expand All @@ -90,6 +98,9 @@ public function __construct(array $data = null) {
if (isset($data['externalId'])) {
$this->setExternalId($data['externalId']);
}
if (isset($data['protectionMode'])) {
$this->setProtectionMode($data['protectionMode']);
}
}


Expand Down Expand Up @@ -139,6 +150,29 @@ public function setExternalId($externalId) {
return $this;
}

/**
* Returns protectionMode.
*
* The protection mode determines if the payment link is protected against tampering and in what way.
*
* @return \Wallee\Sdk\Model\PaymentLinkProtectionMode
*/
public function getProtectionMode() {
return $this->protectionMode;
}

/**
* Sets protectionMode.
*
* @param \Wallee\Sdk\Model\PaymentLinkProtectionMode $protectionMode
* @return PaymentLinkCreate
*/
public function setProtectionMode($protectionMode) {
$this->protectionMode = $protectionMode;

return $this;
}

/**
* Validates the model's properties and throws a ValidationException if the validation fails.
*
Expand Down
Loading

0 comments on commit a7d80c1

Please sign in to comment.