Skip to content

Commit

Permalink
update package based on PackageGenerator@3.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelcom committed Aug 19, 2019
1 parent 31c761f commit 86e9d37
Show file tree
Hide file tree
Showing 515 changed files with 7,822 additions and 3,913 deletions.
3 changes: 2 additions & 1 deletion composer.json
Expand Up @@ -4,7 +4,8 @@
"require": {
"php": ">=5.3.3",
"ext-soap": "*",
"wsdltophp/packagebase": "~1.0"
"ext-mbstring": "*",
"wsdltophp/packagebase": "~2.0"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions generate.sh
Expand Up @@ -14,7 +14,7 @@ rm -rf $DEST/src/ \
$DEST/composer.lock;

# package informations
php wsdltophp.phar generate:package \
php-7.2 wsdltophp.phar generate:package \
--urlorpath="https://www.paypalobjects.com/wsdl/PayPalSvc.wsdl" \
--destination=$DEST \
--composer-name="wsdltophp/package-paypal" \
Expand All @@ -24,7 +24,7 @@ php wsdltophp.phar generate:package \
--namespace="PayPal";

# generate package
php wsdltophp.phar generate:package \
php-7.2 -dmemory_limit=-1 wsdltophp.phar generate:package \
--urlorpath="https://www.paypalobjects.com/wsdl/PayPalSvc.wsdl" \
--destination=$DEST \
--composer-name="wsdltophp/package-paypal" \
Expand Down
34 changes: 27 additions & 7 deletions src/ArrayType/CategoryArrayType.php
Expand Up @@ -13,7 +13,7 @@ class CategoryArrayType extends AbstractStructArrayBase
{
/**
* The Category
* Meta informations extracted from the WSDL
* Meta information extracted from the WSDL
* - maxOccurs: unbounded
* - minOccurs: 0
* - ref: ns:Category
Expand All @@ -38,6 +38,28 @@ public function getCategory()
{
return $this->Category;
}
/**
* This method is responsible for validating the values passed to the setCategory method
* This method is willingly generated in order to preserve the one-line inline validation within the setCategory method
* @param array $values
* @return string A non-empty message if the values does not match the validation rules
*/
public static function validateCategoryForArrayConstraintsFromSetCategory(array $values = array())
{
$message = '';
$invalidValues = [];
foreach ($values as $categoryArrayTypeCategoryItem) {
// validation for constraint: itemType
if (!$categoryArrayTypeCategoryItem instanceof \PayPal\StructType\CategoryType) {
$invalidValues[] = is_object($categoryArrayTypeCategoryItem) ? get_class($categoryArrayTypeCategoryItem) : sprintf('%s(%s)', gettype($categoryArrayTypeCategoryItem), var_export($categoryArrayTypeCategoryItem, true));
}
}
if (!empty($invalidValues)) {
$message = sprintf('The Category property can only contain items of type \PayPal\StructType\CategoryType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
}
unset($invalidValues);
return $message;
}
/**
* Set Category value
* @throws \InvalidArgumentException
Expand All @@ -46,11 +68,9 @@ public function getCategory()
*/
public function setCategory(array $category = array())
{
foreach ($category as $categoryArrayTypeCategoryItem) {
// validation for constraint: itemType
if (!$categoryArrayTypeCategoryItem instanceof \PayPal\StructType\CategoryType) {
throw new \InvalidArgumentException(sprintf('The Category property can only contain items of \PayPal\StructType\CategoryType, "%s" given', is_object($categoryArrayTypeCategoryItem) ? get_class($categoryArrayTypeCategoryItem) : gettype($categoryArrayTypeCategoryItem)), __LINE__);
}
// validation for constraint: array
if ('' !== ($categoryArrayErrorMessage = self::validateCategoryForArrayConstraintsFromSetCategory($category))) {
throw new \InvalidArgumentException($categoryArrayErrorMessage, __LINE__);
}
$this->Category = $category;
return $this;
Expand All @@ -65,7 +85,7 @@ public function addToCategory(\PayPal\StructType\CategoryType $item)
{
// validation for constraint: itemType
if (!$item instanceof \PayPal\StructType\CategoryType) {
throw new \InvalidArgumentException(sprintf('The Category property can only contain items of \PayPal\StructType\CategoryType, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);
throw new \InvalidArgumentException(sprintf('The Category property can only contain items of type \PayPal\StructType\CategoryType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
}
$this->Category[] = $item;
return $this;
Expand Down
34 changes: 27 additions & 7 deletions src/ArrayType/ItemArrayType.php
Expand Up @@ -13,7 +13,7 @@ class ItemArrayType extends AbstractStructArrayBase
{
/**
* The Item
* Meta informations extracted from the WSDL
* Meta information extracted from the WSDL
* - maxOccurs: unbounded
* - minOccurs: 0
* - ref: ns:Item
Expand All @@ -38,6 +38,28 @@ public function getItem()
{
return $this->Item;
}
/**
* This method is responsible for validating the values passed to the setItem method
* This method is willingly generated in order to preserve the one-line inline validation within the setItem method
* @param array $values
* @return string A non-empty message if the values does not match the validation rules
*/
public static function validateItemForArrayConstraintsFromSetItem(array $values = array())
{
$message = '';
$invalidValues = [];
foreach ($values as $itemArrayTypeItemItem) {
// validation for constraint: itemType
if (!$itemArrayTypeItemItem instanceof \PayPal\StructType\ItemType) {
$invalidValues[] = is_object($itemArrayTypeItemItem) ? get_class($itemArrayTypeItemItem) : sprintf('%s(%s)', gettype($itemArrayTypeItemItem), var_export($itemArrayTypeItemItem, true));
}
}
if (!empty($invalidValues)) {
$message = sprintf('The Item property can only contain items of type \PayPal\StructType\ItemType, %s given', is_object($invalidValues) ? get_class($invalidValues) : (is_array($invalidValues) ? implode(', ', $invalidValues) : gettype($invalidValues)));
}
unset($invalidValues);
return $message;
}
/**
* Set Item value
* @throws \InvalidArgumentException
Expand All @@ -46,11 +68,9 @@ public function getItem()
*/
public function setItem(array $item = array())
{
foreach ($item as $itemArrayTypeItemItem) {
// validation for constraint: itemType
if (!$itemArrayTypeItemItem instanceof \PayPal\StructType\ItemType) {
throw new \InvalidArgumentException(sprintf('The Item property can only contain items of \PayPal\StructType\ItemType, "%s" given', is_object($itemArrayTypeItemItem) ? get_class($itemArrayTypeItemItem) : gettype($itemArrayTypeItemItem)), __LINE__);
}
// validation for constraint: array
if ('' !== ($itemArrayErrorMessage = self::validateItemForArrayConstraintsFromSetItem($item))) {
throw new \InvalidArgumentException($itemArrayErrorMessage, __LINE__);
}
$this->Item = $item;
return $this;
Expand All @@ -65,7 +85,7 @@ public function addToItem(\PayPal\StructType\ItemType $item)
{
// validation for constraint: itemType
if (!$item instanceof \PayPal\StructType\ItemType) {
throw new \InvalidArgumentException(sprintf('The Item property can only contain items of \PayPal\StructType\ItemType, "%s" given', is_object($item) ? get_class($item) : gettype($item)), __LINE__);
throw new \InvalidArgumentException(sprintf('The Item property can only contain items of type \PayPal\StructType\ItemType, %s given', is_object($item) ? get_class($item) : (is_array($item) ? implode(', ', $item) : gettype($item))), __LINE__);
}
$this->Item[] = $item;
return $this;
Expand Down
2 changes: 1 addition & 1 deletion src/EnumType/APIAuthenticationType.php
Expand Up @@ -4,7 +4,7 @@

/**
* This class stands for APIAuthenticationType EnumType
* Meta informations extracted from the WSDL
* Meta information extracted from the WSDL
* - documentation: API Authentication Type
* @subpackage Enumerations
* @author WsdlToPhp <contact@wsdltophp.com>
Expand Down
8 changes: 7 additions & 1 deletion src/EnumType/APIType.php
Expand Up @@ -4,7 +4,7 @@

/**
* This class stands for APIType EnumType
* Meta informations extracted from the WSDL
* Meta information extracted from the WSDL
* - documentation: Supported API Types for DoCancel operation
* - type: ns:APIType
* @subpackage Enumerations
Expand All @@ -14,16 +14,22 @@ class APIType
{
/**
* Constant for value 'CHECKOUT_AUTHORIZATION'
* Meta information extracted from the WSDL
* - documentation: POS CHECKOUT AUTHORIZATION
* @return string 'CHECKOUT_AUTHORIZATION'
*/
const VALUE_CHECKOUT_AUTHORIZATION = 'CHECKOUT_AUTHORIZATION';
/**
* Constant for value 'CHECKOUT_SALE'
* Meta information extracted from the WSDL
* - documentation: POS CHECKOUT SALE
* @return string 'CHECKOUT_SALE'
*/
const VALUE_CHECKOUT_SALE = 'CHECKOUT_SALE';
/**
* Constant for value 'REFUND_TRANSACTION'
* Meta information extracted from the WSDL
* - documentation: REFUND TRANSACTION
* @return string 'REFUND_TRANSACTION'
*/
const VALUE_REFUND_TRANSACTION = 'REFUND_TRANSACTION';
Expand Down
10 changes: 9 additions & 1 deletion src/EnumType/AccountStateCodeType.php
Expand Up @@ -4,7 +4,7 @@

/**
* This class stands for AccountStateCodeType EnumType
* Meta informations extracted from the WSDL
* Meta information extracted from the WSDL
* - documentation: AccountStateCodeType These are the possible codes to describe the state of an account of an eBay user.
* @subpackage Enumerations
* @author WsdlToPhp <contact@wsdltophp.com>
Expand All @@ -13,21 +13,29 @@ class AccountStateCodeType
{
/**
* Constant for value 'Active'
* Meta information extracted from the WSDL
* - documentation: Amex
* @return string 'Active'
*/
const VALUE_ACTIVE = 'Active';
/**
* Constant for value 'Pending'
* Meta information extracted from the WSDL
* - documentation: Visa
* @return string 'Pending'
*/
const VALUE_PENDING = 'Pending';
/**
* Constant for value 'Inactive'
* Meta information extracted from the WSDL
* - documentation: Mastercard
* @return string 'Inactive'
*/
const VALUE_INACTIVE = 'Inactive';
/**
* Constant for value 'CustomCode'
* Meta information extracted from the WSDL
* - documentation: Reserved for internal or future use.
* @return string 'CustomCode'
*/
const VALUE_CUSTOM_CODE = 'CustomCode';
Expand Down
16 changes: 15 additions & 1 deletion src/EnumType/AckCodeType.php
Expand Up @@ -4,7 +4,7 @@

/**
* This class stands for AckCodeType EnumType
* Meta informations extracted from the WSDL
* Meta information extracted from the WSDL
* - documentation: AckCodeType This code identifies the acknowledgement code types that could be used to communicate the status of processing a (request) message to an application. This code would be used as part of a response message that contains an
* application level acknowledgement element.
* @subpackage Enumerations
Expand All @@ -14,36 +14,50 @@ class AckCodeType
{
/**
* Constant for value 'Success'
* Meta information extracted from the WSDL
* - documentation: Request processing succeeded.
* @return string 'Success'
*/
const VALUE_SUCCESS = 'Success';
/**
* Constant for value 'Failure'
* Meta information extracted from the WSDL
* - documentation: Request processing failed.
* @return string 'Failure'
*/
const VALUE_FAILURE = 'Failure';
/**
* Constant for value 'Warning'
* Meta information extracted from the WSDL
* - documentation: Request processing completed with warning information being included in the response message.
* @return string 'Warning'
*/
const VALUE_WARNING = 'Warning';
/**
* Constant for value 'SuccessWithWarning'
* Meta information extracted from the WSDL
* - documentation: Request processing completed successful with some with some warning information that could be useful for the requesting application to process and/or record.
* @return string 'SuccessWithWarning'
*/
const VALUE_SUCCESS_WITH_WARNING = 'SuccessWithWarning';
/**
* Constant for value 'FailureWithWarning'
* Meta information extracted from the WSDL
* - documentation: Request processing failed with some error and warnining information that requesting application should process to determine cause(s) of failure.
* @return string 'FailureWithWarning'
*/
const VALUE_FAILURE_WITH_WARNING = 'FailureWithWarning';
/**
* Constant for value 'PartialSuccess'
* Meta information extracted from the WSDL
* - documentation: Request processing completed with Partial Success.
* @return string 'PartialSuccess'
*/
const VALUE_PARTIAL_SUCCESS = 'PartialSuccess';
/**
* Constant for value 'CustomCode'
* Meta information extracted from the WSDL
* - documentation: Reserved for internal or future use.
* @return string 'CustomCode'
*/
const VALUE_CUSTOM_CODE = 'CustomCode';
Expand Down
2 changes: 1 addition & 1 deletion src/EnumType/AddressNormalizationStatusCodeType.php
Expand Up @@ -4,7 +4,7 @@

/**
* This class stands for AddressNormalizationStatusCodeType EnumType
* Meta informations extracted from the WSDL
* Meta information extracted from the WSDL
* - documentation: Normalization Status of the Address
* @subpackage Enumerations
* @author WsdlToPhp <contact@wsdltophp.com>
Expand Down
8 changes: 7 additions & 1 deletion src/EnumType/AddressOwnerCodeType.php
Expand Up @@ -4,7 +4,7 @@

/**
* This class stands for AddressOwnerCodeType EnumType
* Meta informations extracted from the WSDL
* Meta information extracted from the WSDL
* - documentation: AddressOwnerCodeType This code identifies the AddressOwner code types which indicates who owns the user'a address.
* @subpackage Enumerations
* @author WsdlToPhp <contact@wsdltophp.com>
Expand All @@ -13,16 +13,22 @@ class AddressOwnerCodeType
{
/**
* Constant for value 'PayPal'
* Meta information extracted from the WSDL
* - documentation: PayPal owns address.
* @return string 'PayPal'
*/
const VALUE_PAY_PAL = 'PayPal';
/**
* Constant for value 'eBay'
* Meta information extracted from the WSDL
* - documentation: eBay owns address.
* @return string 'eBay'
*/
const VALUE_E_BAY = 'eBay';
/**
* Constant for value 'CustomCode'
* Meta information extracted from the WSDL
* - documentation: Reserved for internal or future use.
* @return string 'CustomCode'
*/
const VALUE_CUSTOM_CODE = 'CustomCode';
Expand Down
2 changes: 1 addition & 1 deletion src/EnumType/AddressStatusCodeType.php
Expand Up @@ -4,7 +4,7 @@

/**
* This class stands for AddressStatusCodeType EnumType
* Meta informations extracted from the WSDL
* Meta information extracted from the WSDL
* - documentation: AddressStatusCodeType This is the PayPal address status
* @subpackage Enumerations
* @author WsdlToPhp <contact@wsdltophp.com>
Expand Down
2 changes: 1 addition & 1 deletion src/EnumType/AllowedPaymentMethodType.php
Expand Up @@ -4,7 +4,7 @@

/**
* This class stands for AllowedPaymentMethodType EnumType
* Meta informations extracted from the WSDL
* Meta information extracted from the WSDL
* - documentation: AllowedPaymentMethodType This is the payment Solution merchant needs to specify for Autopay (used by Express Checkout) Optional Default indicates that its merchant supports all funding source InstantPaymentOnly indicates that its
* merchant only supports instant payment AnyFundingSource allow all funding methods to be chosen by the buyer irrespective of merchant's profile setting InstantFundingSource allow only instant funding methods, block echeck, meft, elevecheck. This will
* override any merchant profile setting
Expand Down

0 comments on commit 86e9d37

Please sign in to comment.