Skip to content

Commit 1b3de45

Browse files
authored
update sdk to support repairing refreshed methods (#18)
1 parent 15c0da2 commit 1b3de45

File tree

2 files changed

+67
-1
lines changed

2 files changed

+67
-1
lines changed

generated/Model/ChargehiveMethodRepairRequest.php

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,18 @@ class ChargehiveMethodRepairRequest implements \JsonSerializable
5858
* @var string
5959
*/
6060
protected $tokenExpiry;
61+
/**
62+
*
63+
*
64+
* @var string
65+
*/
66+
protected $previousMethodId;
67+
/**
68+
*
69+
*
70+
* @var string
71+
*/
72+
protected $refreshReason;
6173
/**
6274
*
6375
*
@@ -247,8 +259,50 @@ public function setTokenExpiry(string $tokenExpiry)
247259
$this->tokenExpiry = $tokenExpiry;
248260
return $this;
249261
}
262+
/**
263+
*
264+
*
265+
* @return string
266+
*/
267+
public function getPreviousMethodId()
268+
{
269+
return $this->previousMethodId;
270+
}
271+
/**
272+
*
273+
*
274+
* @param string $previousMethodId
275+
*
276+
* @return self
277+
*/
278+
public function setPreviousMethodId(string $previousMethodId)
279+
{
280+
$this->previousMethodId = $previousMethodId;
281+
return $this;
282+
}
283+
/**
284+
*
285+
*
286+
* @return string
287+
*/
288+
public function getRefreshReason()
289+
{
290+
return $this->refreshReason;
291+
}
292+
/**
293+
*
294+
*
295+
* @param string $refreshReason
296+
*
297+
* @return self
298+
*/
299+
public function setRefreshReason(string $refreshReason)
300+
{
301+
$this->refreshReason = $refreshReason;
302+
return $this;
303+
}
250304
public function jsonSerialize()
251305
{
252-
return ['paymentMethodId' => $this->paymentMethodId, 'bpid' => $this->bpid, 'mfp' => $this->mfp, 'name' => $this->name, 'pfp' => $this->pfp, 'paymentScheme' => $this->paymentScheme, 'tokenId' => $this->tokenId, 'tokenType' => $this->tokenType, 'tokenExpiry' => $this->tokenExpiry];
306+
return ['paymentMethodId' => $this->paymentMethodId, 'bpid' => $this->bpid, 'mfp' => $this->mfp, 'name' => $this->name, 'pfp' => $this->pfp, 'paymentScheme' => $this->paymentScheme, 'tokenId' => $this->tokenId, 'tokenType' => $this->tokenType, 'tokenExpiry' => $this->tokenExpiry, 'previousMethodId' => $this->previousMethodId, 'refreshReason' => $this->refreshReason];
253307
}
254308
}

generated/Normalizer/ChargehiveMethodRepairRequestNormalizer.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ public function denormalize($data, $class, $format = null, array $context = arra
5555
if (property_exists($data, 'token_expiry')) {
5656
$object->setTokenExpiry($data->{'token_expiry'});
5757
}
58+
if (property_exists($data, 'previous_method_id')) {
59+
$object->setPreviousMethodId($data->{'previous_method_id'});
60+
}
61+
if (property_exists($data, 'refresh_reason')) {
62+
$object->setRefreshReason($data->{'refresh_reason'});
63+
}
5864
return $object;
5965
}
6066
public function normalize($object, $format = null, array $context = array())
@@ -87,6 +93,12 @@ public function normalize($object, $format = null, array $context = array())
8793
if (null !== $object->getTokenExpiry()) {
8894
$data->{'token_expiry'} = $object->getTokenExpiry();
8995
}
96+
if (null !== $object->getPreviousMethodId()) {
97+
$data->{'previous_method_id'} = $object->getPreviousMethodId();
98+
}
99+
if (null !== $object->getRefreshReason()) {
100+
$data->{'refresh_reason'} = $object->getRefreshReason();
101+
}
90102
return $data;
91103
}
92104
}

0 commit comments

Comments
 (0)