Skip to content

Commit 3755c0d

Browse files
authored
Pcib (#11)
* PCI Bridge Tokenizer * Use the public api
1 parent 69a5321 commit 3755c0d

11 files changed

+318
-4
lines changed

generated/Model/ChargehiveMethodTokenizeRequest.php

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ class ChargehiveMethodTokenizeRequest implements \JsonSerializable
5858
* @var ChtypeChargeMeta
5959
*/
6060
protected $chargeMeta;
61+
/**
62+
*
63+
*
64+
* @var string
65+
*/
66+
protected $billingProfileId;
6167
/**
6268
*
6369
*
@@ -247,8 +253,29 @@ public function setChargeMeta(ChtypeChargeMeta $chargeMeta)
247253
$this->chargeMeta = $chargeMeta;
248254
return $this;
249255
}
256+
/**
257+
*
258+
*
259+
* @return string
260+
*/
261+
public function getBillingProfileId()
262+
{
263+
return $this->billingProfileId;
264+
}
265+
/**
266+
*
267+
*
268+
* @param string $billingProfileId
269+
*
270+
* @return self
271+
*/
272+
public function setBillingProfileId(string $billingProfileId)
273+
{
274+
$this->billingProfileId = $billingProfileId;
275+
return $this;
276+
}
250277
public function jsonSerialize()
251278
{
252-
return ['dataLocation' => $this->dataLocation, 'method' => $this->method, 'displayName' => $this->displayName, 'paymentMethodVerification' => $this->paymentMethodVerification, 'references' => $this->references, 'labels' => $this->labels, 'verifyChargeId' => $this->verifyChargeId, 'additionalData' => $this->additionalData, 'chargeMeta' => $this->chargeMeta];
279+
return ['dataLocation' => $this->dataLocation, 'method' => $this->method, 'displayName' => $this->displayName, 'paymentMethodVerification' => $this->paymentMethodVerification, 'references' => $this->references, 'labels' => $this->labels, 'verifyChargeId' => $this->verifyChargeId, 'additionalData' => $this->additionalData, 'chargeMeta' => $this->chargeMeta, 'billingProfileId' => $this->billingProfileId];
253280
}
254281
}

generated/Model/ChargehiveMethodTokenizeResponse.php

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ class ChargehiveMethodTokenizeResponse implements \JsonSerializable
4040
* @var string
4141
*/
4242
protected $merchantMessage;
43+
/**
44+
*
45+
*
46+
* @var ChargehivePCIBTokenizeResponse
47+
*/
48+
protected $tokenizeResponse;
4349
/**
4450
*
4551
*
@@ -166,8 +172,29 @@ public function setMerchantMessage(string $merchantMessage)
166172
$this->merchantMessage = $merchantMessage;
167173
return $this;
168174
}
175+
/**
176+
*
177+
*
178+
* @return ChargehivePCIBTokenizeResponse
179+
*/
180+
public function getTokenizeResponse()
181+
{
182+
return $this->tokenizeResponse;
183+
}
184+
/**
185+
*
186+
*
187+
* @param ChargehivePCIBTokenizeResponse $tokenizeResponse
188+
*
189+
* @return self
190+
*/
191+
public function setTokenizeResponse(ChargehivePCIBTokenizeResponse $tokenizeResponse)
192+
{
193+
$this->tokenizeResponse = $tokenizeResponse;
194+
return $this;
195+
}
169196
public function jsonSerialize()
170197
{
171-
return ['success' => $this->success, 'token' => $this->token, 'info' => $this->info, 'additionalData' => $this->additionalData, 'customerMessage' => $this->customerMessage, 'merchantMessage' => $this->merchantMessage];
198+
return ['success' => $this->success, 'token' => $this->token, 'info' => $this->info, 'additionalData' => $this->additionalData, 'customerMessage' => $this->customerMessage, 'merchantMessage' => $this->merchantMessage, 'tokenizeResponse' => $this->tokenizeResponse];
172199
}
173200
}

generated/Model/ChargehiveMethodVerifyRequest.php

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ class ChargehiveMethodVerifyRequest implements \JsonSerializable
2828
* @var string
2929
*/
3030
protected $chargeId;
31+
/**
32+
*
33+
*
34+
* @var string
35+
*/
36+
protected $billingProfileId;
3137
/**
3238
*
3339
*
@@ -112,8 +118,29 @@ public function setChargeId(string $chargeId)
112118
$this->chargeId = $chargeId;
113119
return $this;
114120
}
121+
/**
122+
*
123+
*
124+
* @return string
125+
*/
126+
public function getBillingProfileId()
127+
{
128+
return $this->billingProfileId;
129+
}
130+
/**
131+
*
132+
*
133+
* @param string $billingProfileId
134+
*
135+
* @return self
136+
*/
137+
public function setBillingProfileId(string $billingProfileId)
138+
{
139+
$this->billingProfileId = $billingProfileId;
140+
return $this;
141+
}
115142
public function jsonSerialize()
116143
{
117-
return ['token' => $this->token, 'amount' => $this->amount, 'connectorId' => $this->connectorId, 'chargeId' => $this->chargeId];
144+
return ['token' => $this->token, 'amount' => $this->amount, 'connectorId' => $this->connectorId, 'chargeId' => $this->chargeId, 'billingProfileId' => $this->billingProfileId];
118145
}
119146
}

generated/Model/ChargehiveMethodVerifyResponse.php

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,12 @@ class ChargehiveMethodVerifyResponse implements \JsonSerializable
2828
* @var ChtypeTransaction
2929
*/
3030
protected $transaction;
31+
/**
32+
*
33+
*
34+
* @var ChargehivePCIBTokenizeResponse
35+
*/
36+
protected $tokenizeResponse;
3137
/**
3238
*
3339
*
@@ -112,8 +118,29 @@ public function setTransaction(ChtypeTransaction $transaction)
112118
$this->transaction = $transaction;
113119
return $this;
114120
}
121+
/**
122+
*
123+
*
124+
* @return ChargehivePCIBTokenizeResponse
125+
*/
126+
public function getTokenizeResponse()
127+
{
128+
return $this->tokenizeResponse;
129+
}
130+
/**
131+
*
132+
*
133+
* @param ChargehivePCIBTokenizeResponse $tokenizeResponse
134+
*
135+
* @return self
136+
*/
137+
public function setTokenizeResponse(ChargehivePCIBTokenizeResponse $tokenizeResponse)
138+
{
139+
$this->tokenizeResponse = $tokenizeResponse;
140+
return $this;
141+
}
115142
public function jsonSerialize()
116143
{
117-
return ['verified' => $this->verified, 'authed' => $this->authed, 'info' => $this->info, 'transaction' => $this->transaction];
144+
return ['verified' => $this->verified, 'authed' => $this->authed, 'info' => $this->info, 'transaction' => $this->transaction, 'tokenizeResponse' => $this->tokenizeResponse];
118145
}
119146
}
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
<?php
2+
3+
namespace ChargeHive\Php\Sdk\Generated\Model;
4+
5+
class ChargehivePCIBTokenizeResponse implements \JsonSerializable
6+
{
7+
/**
8+
*
9+
*
10+
* @var string
11+
*/
12+
protected $tokenID;
13+
/**
14+
*
15+
*
16+
* @var string
17+
*/
18+
protected $token;
19+
/**
20+
*
21+
*
22+
* @var string
23+
*/
24+
protected $profileFingerprint;
25+
/**
26+
*
27+
*
28+
* @var string
29+
*/
30+
protected $merchantFingerprint;
31+
/**
32+
*
33+
*
34+
* @return string
35+
*/
36+
public function getTokenID()
37+
{
38+
return $this->tokenID;
39+
}
40+
/**
41+
*
42+
*
43+
* @param string $tokenID
44+
*
45+
* @return self
46+
*/
47+
public function setTokenID(string $tokenID)
48+
{
49+
$this->tokenID = $tokenID;
50+
return $this;
51+
}
52+
/**
53+
*
54+
*
55+
* @return string
56+
*/
57+
public function getToken()
58+
{
59+
return $this->token;
60+
}
61+
/**
62+
*
63+
*
64+
* @param string $token
65+
*
66+
* @return self
67+
*/
68+
public function setToken(string $token)
69+
{
70+
$this->token = $token;
71+
return $this;
72+
}
73+
/**
74+
*
75+
*
76+
* @return string
77+
*/
78+
public function getProfileFingerprint()
79+
{
80+
return $this->profileFingerprint;
81+
}
82+
/**
83+
*
84+
*
85+
* @param string $profileFingerprint
86+
*
87+
* @return self
88+
*/
89+
public function setProfileFingerprint(string $profileFingerprint)
90+
{
91+
$this->profileFingerprint = $profileFingerprint;
92+
return $this;
93+
}
94+
/**
95+
*
96+
*
97+
* @return string
98+
*/
99+
public function getMerchantFingerprint()
100+
{
101+
return $this->merchantFingerprint;
102+
}
103+
/**
104+
*
105+
*
106+
* @param string $merchantFingerprint
107+
*
108+
* @return self
109+
*/
110+
public function setMerchantFingerprint(string $merchantFingerprint)
111+
{
112+
$this->merchantFingerprint = $merchantFingerprint;
113+
return $this;
114+
}
115+
public function jsonSerialize()
116+
{
117+
return ['tokenID' => $this->tokenID, 'token' => $this->token, 'profileFingerprint' => $this->profileFingerprint, 'merchantFingerprint' => $this->merchantFingerprint];
118+
}
119+
}

generated/Normalizer/ChargehiveMethodTokenizeRequestNormalizer.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ public function denormalize($data, $class, $format = null, array $context = arra
7171
if (property_exists($data, 'charge_meta')) {
7272
$object->setChargeMeta($this->denormalizer->denormalize($data->{'charge_meta'}, 'ChargeHive\\Php\\Sdk\\Generated\\Model\\ChtypeChargeMeta', 'json', $context));
7373
}
74+
if (property_exists($data, 'billing_profile_id')) {
75+
$object->setBillingProfileId($data->{'billing_profile_id'});
76+
}
7477
return $object;
7578
}
7679
public function normalize($object, $format = null, array $context = array())
@@ -119,6 +122,9 @@ public function normalize($object, $format = null, array $context = array())
119122
if (null !== $object->getChargeMeta()) {
120123
$data->{'charge_meta'} = $this->normalizer->normalize($object->getChargeMeta(), 'json', $context);
121124
}
125+
if (null !== $object->getBillingProfileId()) {
126+
$data->{'billing_profile_id'} = $object->getBillingProfileId();
127+
}
122128
return $data;
123129
}
124130
}

generated/Normalizer/ChargehiveMethodTokenizeResponseNormalizer.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ public function denormalize($data, $class, $format = null, array $context = arra
5050
if (property_exists($data, 'merchant_message')) {
5151
$object->setMerchantMessage($data->{'merchant_message'});
5252
}
53+
if (property_exists($data, 'tokenize_response')) {
54+
$object->setTokenizeResponse($this->denormalizer->denormalize($data->{'tokenize_response'}, 'ChargeHive\\Php\\Sdk\\Generated\\Model\\ChargehivePCIBTokenizeResponse', 'json', $context));
55+
}
5356
return $object;
5457
}
5558
public function normalize($object, $format = null, array $context = array())
@@ -77,6 +80,9 @@ public function normalize($object, $format = null, array $context = array())
7780
if (null !== $object->getMerchantMessage()) {
7881
$data->{'merchant_message'} = $object->getMerchantMessage();
7982
}
83+
if (null !== $object->getTokenizeResponse()) {
84+
$data->{'tokenize_response'} = $this->normalizer->normalize($object->getTokenizeResponse(), 'json', $context);
85+
}
8086
return $data;
8187
}
8288
}

generated/Normalizer/ChargehiveMethodVerifyRequestNormalizer.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ public function denormalize($data, $class, $format = null, array $context = arra
4040
if (property_exists($data, 'charge_id')) {
4141
$object->setChargeId($data->{'charge_id'});
4242
}
43+
if (property_exists($data, 'billing_profile_id')) {
44+
$object->setBillingProfileId($data->{'billing_profile_id'});
45+
}
4346
return $object;
4447
}
4548
public function normalize($object, $format = null, array $context = array())
@@ -57,6 +60,9 @@ public function normalize($object, $format = null, array $context = array())
5760
if (null !== $object->getChargeId()) {
5861
$data->{'charge_id'} = $object->getChargeId();
5962
}
63+
if (null !== $object->getBillingProfileId()) {
64+
$data->{'billing_profile_id'} = $object->getBillingProfileId();
65+
}
6066
return $data;
6167
}
6268
}

generated/Normalizer/ChargehiveMethodVerifyResponseNormalizer.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ public function denormalize($data, $class, $format = null, array $context = arra
4040
if (property_exists($data, 'transaction')) {
4141
$object->setTransaction($this->denormalizer->denormalize($data->{'transaction'}, 'ChargeHive\\Php\\Sdk\\Generated\\Model\\ChtypeTransaction', 'json', $context));
4242
}
43+
if (property_exists($data, 'tokenize_response')) {
44+
$object->setTokenizeResponse($this->denormalizer->denormalize($data->{'tokenize_response'}, 'ChargeHive\\Php\\Sdk\\Generated\\Model\\ChargehivePCIBTokenizeResponse', 'json', $context));
45+
}
4346
return $object;
4447
}
4548
public function normalize($object, $format = null, array $context = array())
@@ -57,6 +60,9 @@ public function normalize($object, $format = null, array $context = array())
5760
if (null !== $object->getTransaction()) {
5861
$data->{'transaction'} = $this->normalizer->normalize($object->getTransaction(), 'json', $context);
5962
}
63+
if (null !== $object->getTokenizeResponse()) {
64+
$data->{'tokenize_response'} = $this->normalizer->normalize($object->getTokenizeResponse(), 'json', $context);
65+
}
6066
return $data;
6167
}
6268
}

0 commit comments

Comments
 (0)