Skip to content

Commit a2a2e1c

Browse files
author
Sunny Raj Rathod
committed
Merge pull request #124 from AuthorizeNet/future
Future to master
2 parents cb9cb0c + da90643 commit a2a2e1c

26 files changed

Lines changed: 633 additions & 12 deletions

.scrutinizer.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
checks:
2+
php:
3+
code_rating: true
4+
duplication: true
5+
16
tools:
27
php_mess_detector: true
38
php_code_sniffer: true

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ script:
1919

2020
after_script:
2121
- wget https://scrutinizer-ci.com/ocular.phar
22-
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
22+
# - php ocular.phar code-coverage:upload --format=php-clover coverage.clover

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
Authorize.Net PHP SDK
22
======================
33

4-
[![Build Status] (https://travis-ci.org/AuthorizeNet/sdk-php.png?branch=future)]
4+
[![Travis](https://img.shields.io/travis/AuthorizeNet/sdk-php/master.svg)]
55
(https://travis-ci.org/AuthorizeNet/sdk-php)
6+
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/AuthorizeNet/sdk-php/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/AuthorizeNet/sdk-php/?branch=master)
7+
[![Packagist](https://img.shields.io/packagist/v/authorizenet/authorizenet.svg)](https://packagist.org/packages/authorizenet/authorizenet)
68

79

810
## License

classmap.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,9 @@
182182
'PhpOption\None' => $vendorDir . '/phpoption/phpoption/src/PhpOption/None.php',
183183
'PhpOption\Option' => $vendorDir . '/phpoption/phpoption/src/PhpOption/Option.php',
184184
'PhpOption\Some' => $vendorDir . '/phpoption/phpoption/src/PhpOption/Some.php',
185-
'Symfony\Component\Yaml\Yaml' => $vendorDir . '/Symfony/Yaml/Yaml.php',
186-
'Symfony\Component\Yaml\Parser' => $vendorDir . '/Symfony/Yaml/Parser.php',
187-
'Symfony\Component\Yaml\Inline' => $vendorDir . '/Symfony/Yaml/Inline.php',
185+
'Symfony\Component\Yaml\Yaml' => $vendorDir . '/symfony/yaml/Yaml.php',
186+
'Symfony\Component\Yaml\Parser' => $vendorDir . '/symfony/yaml/Parser.php',
187+
'Symfony\Component\Yaml\Inline' => $vendorDir . '/symfony/yaml/Inline.php',
188188

189189
'AuthorizeNetAIM' => $libDir . 'AuthorizeNetAIM.php',
190190
'AuthorizeNetAIM_Response' => $libDir . 'AuthorizeNetAIM.php',
@@ -281,6 +281,7 @@
281281
'net\authorize\api\contract\v1\CustomerAddressExType' => $libDir . 'net/authorize/api/contract/v1/CustomerAddressExType.php',
282282
'net\authorize\api\contract\v1\CustomerAddressType' => $libDir . 'net/authorize/api/contract/v1/CustomerAddressType.php',
283283
'net\authorize\api\contract\v1\CustomerDataType' => $libDir . 'net/authorize/api/contract/v1/CustomerDataType.php',
284+
'net\authorize\api\contract\v1\CustomerProfileIdType' => $libDir . 'net/authorize/api/contract/v1/CustomerProfileIdType.php',
284285
'net\authorize\api\contract\v1\CustomerPaymentProfileBaseType' => $libDir . 'net/authorize/api/contract/v1/CustomerPaymentProfileBaseType.php',
285286
'net\authorize\api\contract\v1\CustomerPaymentProfileExType' => $libDir . 'net/authorize/api/contract/v1/CustomerPaymentProfileExType.php',
286287
'net\authorize\api\contract\v1\CustomerPaymentProfileListItemType' => $libDir . 'net/authorize/api/contract/v1/CustomerPaymentProfileListItemType.php',
@@ -415,6 +416,7 @@
415416
'net\authorize\api\contract\v1\TransactionResponseType\MessagesAType\MessageAType' => $libDir . 'net/authorize/api/contract/v1/TransactionResponseType/MessagesAType/MessageAType.php',
416417
'net\authorize\api\contract\v1\TransactionResponseType\SplitTenderPaymentsAType\SplitTenderPaymentAType' => $libDir . 'net/authorize/api/contract/v1/TransactionResponseType/SplitTenderPaymentsAType/SplitTenderPaymentAType.php',
417418

419+
418420
//Controllers
419421
'net\authorize\api\controller\ARBCancelSubscriptionController' => $libDir . 'net/authorize/api/controller/ARBCancelSubscriptionController.php',
420422
'net\authorize\api\controller\ARBCreateSubscriptionController' => $libDir . 'net/authorize/api/controller/ARBCreateSubscriptionController.php',
@@ -455,4 +457,4 @@
455457
'net\authorize\api\controller\UpdateSplitTenderGroupController' => $libDir . 'net/authorize/api/controller/UpdateSplitTenderGroupController.php',
456458
'net\authorize\api\controller\ValidateCustomerPaymentProfileController' => $libDir . 'net/authorize/api/controller/ValidateCustomerPaymentProfileController.php',
457459

458-
);
460+
);

lib/AuthorizeNetCIM.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,14 +193,19 @@ public function getCustomerProfile($customerProfileId)
193193
*
194194
* @param int $customerProfileId
195195
* @param int $customerPaymentProfileId
196+
* @param boolean $unmaskExpirationDate
196197
*
197198
* @return AuthorizeNetCIM_Response
198199
*/
199-
public function getCustomerPaymentProfile($customerProfileId, $customerPaymentProfileId)
200+
public function getCustomerPaymentProfile($customerProfileId, $customerPaymentProfileId, $unmaskExpirationDate = false)
200201
{
201202
$this->_constructXml("getCustomerPaymentProfileRequest");
202203
$this->_xml->addChild("customerProfileId", $customerProfileId);
203204
$this->_xml->addChild("customerPaymentProfileId", $customerPaymentProfileId);
205+
if ( $unmaskExpirationDate ) {
206+
$this->_xml->addChild("unmaskExpirationDate", true);
207+
}
208+
204209
return $this->_sendRequest();
205210
}
206211

lib/net/authorize/api/contract/v1/ARBCreateSubscriptionResponse.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ class ARBCreateSubscriptionResponse extends ANetApiResponseType
1313
*/
1414
private $subscriptionId = null;
1515

16+
/**
17+
* @property \net\authorize\api\contract\v1\CustomerProfileIdType $profile
18+
*/
19+
private $profile = null;
20+
1621
/**
1722
* Gets as subscriptionId
1823
*
@@ -35,6 +40,28 @@ public function setSubscriptionId($subscriptionId)
3540
return $this;
3641
}
3742

43+
/**
44+
* Gets as profile
45+
*
46+
* @return \net\authorize\api\contract\v1\CustomerProfileIdType
47+
*/
48+
public function getProfile()
49+
{
50+
return $this->profile;
51+
}
52+
53+
/**
54+
* Sets a new profile
55+
*
56+
* @param \net\authorize\api\contract\v1\CustomerProfileIdType $profile
57+
* @return self
58+
*/
59+
public function setProfile(\net\authorize\api\contract\v1\CustomerProfileIdType $profile)
60+
{
61+
$this->profile = $profile;
62+
return $this;
63+
}
64+
3865

3966
}
4067

lib/net/authorize/api/contract/v1/ARBSubscriptionType.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ class ARBSubscriptionType
5656
*/
5757
private $shipTo = null;
5858

59+
/**
60+
* @property \net\authorize\api\contract\v1\CustomerProfileIdType $profile
61+
*/
62+
private $profile = null;
63+
5964
/**
6065
* Gets as name
6166
*
@@ -254,6 +259,28 @@ public function setShipTo(\net\authorize\api\contract\v1\NameAndAddressType $shi
254259
return $this;
255260
}
256261

262+
/**
263+
* Gets as profile
264+
*
265+
* @return \net\authorize\api\contract\v1\CustomerProfileIdType
266+
*/
267+
public function getProfile()
268+
{
269+
return $this->profile;
270+
}
271+
272+
/**
273+
* Sets a new profile
274+
*
275+
* @param \net\authorize\api\contract\v1\CustomerProfileIdType $profile
276+
* @return self
277+
*/
278+
public function setProfile(\net\authorize\api\contract\v1\CustomerProfileIdType $profile)
279+
{
280+
$this->profile = $profile;
281+
return $this;
282+
}
283+
257284

258285
}
259286

lib/net/authorize/api/contract/v1/ARBUpdateSubscriptionResponse.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,33 @@
88
class ARBUpdateSubscriptionResponse extends ANetApiResponseType
99
{
1010

11+
/**
12+
* @property \net\authorize\api\contract\v1\CustomerProfileIdType $profile
13+
*/
14+
private $profile = null;
15+
16+
/**
17+
* Gets as profile
18+
*
19+
* @return \net\authorize\api\contract\v1\CustomerProfileIdType
20+
*/
21+
public function getProfile()
22+
{
23+
return $this->profile;
24+
}
25+
26+
/**
27+
* Sets a new profile
28+
*
29+
* @param \net\authorize\api\contract\v1\CustomerProfileIdType $profile
30+
* @return self
31+
*/
32+
public function setProfile(\net\authorize\api\contract\v1\CustomerProfileIdType $profile)
33+
{
34+
$this->profile = $profile;
35+
return $this;
36+
}
37+
1138

1239
}
1340

lib/net/authorize/api/contract/v1/CreateCustomerProfileFromTransactionRequest.php

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ class CreateCustomerProfileFromTransactionRequest extends ANetApiRequestType
1313
*/
1414
private $transId = null;
1515

16+
/**
17+
* @property \net\authorize\api\contract\v1\CustomerProfileBaseType $customer
18+
*/
19+
private $customer = null;
20+
21+
/**
22+
* @property string $customerProfileId
23+
*/
24+
private $customerProfileId = null;
25+
1626
/**
1727
* Gets as transId
1828
*
@@ -35,6 +45,50 @@ public function setTransId($transId)
3545
return $this;
3646
}
3747

48+
/**
49+
* Gets as customer
50+
*
51+
* @return \net\authorize\api\contract\v1\CustomerProfileBaseType
52+
*/
53+
public function getCustomer()
54+
{
55+
return $this->customer;
56+
}
57+
58+
/**
59+
* Sets a new customer
60+
*
61+
* @param \net\authorize\api\contract\v1\CustomerProfileBaseType $customer
62+
* @return self
63+
*/
64+
public function setCustomer(\net\authorize\api\contract\v1\CustomerProfileBaseType $customer)
65+
{
66+
$this->customer = $customer;
67+
return $this;
68+
}
69+
70+
/**
71+
* Gets as customerProfileId
72+
*
73+
* @return string
74+
*/
75+
public function getCustomerProfileId()
76+
{
77+
return $this->customerProfileId;
78+
}
79+
80+
/**
81+
* Sets a new customerProfileId
82+
*
83+
* @param string $customerProfileId
84+
* @return self
85+
*/
86+
public function setCustomerProfileId($customerProfileId)
87+
{
88+
$this->customerProfileId = $customerProfileId;
89+
return $this;
90+
}
91+
3892

3993
}
4094

lib/net/authorize/api/contract/v1/CustomerPaymentProfileMaskedType.php

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ class CustomerPaymentProfileMaskedType extends CustomerPaymentProfileBaseType
3737
*/
3838
private $taxId = null;
3939

40+
/**
41+
* @property string[] $subscriptionIds
42+
*/
43+
private $subscriptionIds = null;
44+
4045
/**
4146
* Gets as customerProfileId
4247
*
@@ -147,6 +152,62 @@ public function setTaxId($taxId)
147152
return $this;
148153
}
149154

155+
/**
156+
* Adds as subscriptionId
157+
*
158+
* @return self
159+
* @param string $subscriptionId
160+
*/
161+
public function addToSubscriptionIds($subscriptionId)
162+
{
163+
$this->subscriptionIds[] = $subscriptionId;
164+
return $this;
165+
}
166+
167+
/**
168+
* isset subscriptionIds
169+
*
170+
* @param scalar $index
171+
* @return boolean
172+
*/
173+
public function issetSubscriptionIds($index)
174+
{
175+
return isset($this->subscriptionIds[$index]);
176+
}
177+
178+
/**
179+
* unset subscriptionIds
180+
*
181+
* @param scalar $index
182+
* @return void
183+
*/
184+
public function unsetSubscriptionIds($index)
185+
{
186+
unset($this->subscriptionIds[$index]);
187+
}
188+
189+
/**
190+
* Gets as subscriptionIds
191+
*
192+
* @return string[]
193+
*/
194+
public function getSubscriptionIds()
195+
{
196+
return $this->subscriptionIds;
197+
}
198+
199+
/**
200+
* Sets a new subscriptionIds
201+
*
202+
* @param string $subscriptionIds
203+
* @return self
204+
*/
205+
public function setSubscriptionIds(array $subscriptionIds)
206+
{
207+
$this->subscriptionIds = $subscriptionIds;
208+
return $this;
209+
}
210+
150211

151212
}
152213

0 commit comments

Comments
 (0)