Skip to content

Commit

Permalink
update sdk to support repairing refreshed methods (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
fobilow authored May 13, 2024
1 parent 15c0da2 commit 1b3de45
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 1 deletion.
56 changes: 55 additions & 1 deletion generated/Model/ChargehiveMethodRepairRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,18 @@ class ChargehiveMethodRepairRequest implements \JsonSerializable
* @var string
*/
protected $tokenExpiry;
/**
*
*
* @var string
*/
protected $previousMethodId;
/**
*
*
* @var string
*/
protected $refreshReason;
/**
*
*
Expand Down Expand Up @@ -247,8 +259,50 @@ public function setTokenExpiry(string $tokenExpiry)
$this->tokenExpiry = $tokenExpiry;
return $this;
}
/**
*
*
* @return string
*/
public function getPreviousMethodId()
{
return $this->previousMethodId;
}
/**
*
*
* @param string $previousMethodId
*
* @return self
*/
public function setPreviousMethodId(string $previousMethodId)
{
$this->previousMethodId = $previousMethodId;
return $this;
}
/**
*
*
* @return string
*/
public function getRefreshReason()
{
return $this->refreshReason;
}
/**
*
*
* @param string $refreshReason
*
* @return self
*/
public function setRefreshReason(string $refreshReason)
{
$this->refreshReason = $refreshReason;
return $this;
}
public function jsonSerialize()
{
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];
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];
}
}
12 changes: 12 additions & 0 deletions generated/Normalizer/ChargehiveMethodRepairRequestNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ public function denormalize($data, $class, $format = null, array $context = arra
if (property_exists($data, 'token_expiry')) {
$object->setTokenExpiry($data->{'token_expiry'});
}
if (property_exists($data, 'previous_method_id')) {
$object->setPreviousMethodId($data->{'previous_method_id'});
}
if (property_exists($data, 'refresh_reason')) {
$object->setRefreshReason($data->{'refresh_reason'});
}
return $object;
}
public function normalize($object, $format = null, array $context = array())
Expand Down Expand Up @@ -87,6 +93,12 @@ public function normalize($object, $format = null, array $context = array())
if (null !== $object->getTokenExpiry()) {
$data->{'token_expiry'} = $object->getTokenExpiry();
}
if (null !== $object->getPreviousMethodId()) {
$data->{'previous_method_id'} = $object->getPreviousMethodId();
}
if (null !== $object->getRefreshReason()) {
$data->{'refresh_reason'} = $object->getRefreshReason();
}
return $data;
}
}

0 comments on commit 1b3de45

Please sign in to comment.