From 1b3de4541123d21603e2d992860f9f6bd78a9f13 Mon Sep 17 00:00:00 2001 From: Okechukwu Ugwu Date: Mon, 13 May 2024 13:47:29 +0100 Subject: [PATCH] update sdk to support repairing refreshed methods (#18) --- .../Model/ChargehiveMethodRepairRequest.php | 56 ++++++++++++++++++- ...hargehiveMethodRepairRequestNormalizer.php | 12 ++++ 2 files changed, 67 insertions(+), 1 deletion(-) diff --git a/generated/Model/ChargehiveMethodRepairRequest.php b/generated/Model/ChargehiveMethodRepairRequest.php index e7d564c..0a0d03c 100644 --- a/generated/Model/ChargehiveMethodRepairRequest.php +++ b/generated/Model/ChargehiveMethodRepairRequest.php @@ -58,6 +58,18 @@ class ChargehiveMethodRepairRequest implements \JsonSerializable * @var string */ protected $tokenExpiry; + /** + * + * + * @var string + */ + protected $previousMethodId; + /** + * + * + * @var string + */ + protected $refreshReason; /** * * @@ -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]; } } \ No newline at end of file diff --git a/generated/Normalizer/ChargehiveMethodRepairRequestNormalizer.php b/generated/Normalizer/ChargehiveMethodRepairRequestNormalizer.php index 555c2f0..5471652 100644 --- a/generated/Normalizer/ChargehiveMethodRepairRequestNormalizer.php +++ b/generated/Normalizer/ChargehiveMethodRepairRequestNormalizer.php @@ -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()) @@ -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; } } \ No newline at end of file