Skip to content

Commit 61a9889

Browse files
authored
update refundTransaction object in sdk (#14)
1 parent c1f1dd7 commit 61a9889

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

generated/Model/ChargehiveChargeRefundTransaction.php

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ class ChargehiveChargeRefundTransaction implements \JsonSerializable
2222
* @var string
2323
*/
2424
protected $paymentMethodToken;
25+
/**
26+
*
27+
*
28+
* @var string
29+
*/
30+
protected $merchantReference;
2531
/**
2632
*
2733
*
@@ -85,8 +91,29 @@ public function setPaymentMethodToken(string $paymentMethodToken)
8591
$this->paymentMethodToken = $paymentMethodToken;
8692
return $this;
8793
}
94+
/**
95+
*
96+
*
97+
* @return string
98+
*/
99+
public function getMerchantReference()
100+
{
101+
return $this->merchantReference;
102+
}
103+
/**
104+
*
105+
*
106+
* @param string $merchantReference
107+
*
108+
* @return self
109+
*/
110+
public function setMerchantReference(string $merchantReference)
111+
{
112+
$this->merchantReference = $merchantReference;
113+
return $this;
114+
}
88115
public function jsonSerialize()
89116
{
90-
return ['sourceTransactionId' => $this->sourceTransactionId, 'amount' => $this->amount, 'paymentMethodToken' => $this->paymentMethodToken];
117+
return ['sourceTransactionId' => $this->sourceTransactionId, 'amount' => $this->amount, 'paymentMethodToken' => $this->paymentMethodToken, 'merchantReference' => $this->merchantReference];
91118
}
92119
}

generated/Normalizer/ChargehiveChargeRefundTransactionNormalizer.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ public function denormalize($data, $class, $format = null, array $context = arra
3737
if (property_exists($data, 'payment_method_token')) {
3838
$object->setPaymentMethodToken($data->{'payment_method_token'});
3939
}
40+
if (property_exists($data, 'merchant_reference')) {
41+
$object->setMerchantReference($data->{'merchant_reference'});
42+
}
4043
return $object;
4144
}
4245
public function normalize($object, $format = null, array $context = array())
@@ -51,6 +54,9 @@ public function normalize($object, $format = null, array $context = array())
5154
if (null !== $object->getPaymentMethodToken()) {
5255
$data->{'payment_method_token'} = $object->getPaymentMethodToken();
5356
}
57+
if (null !== $object->getMerchantReference()) {
58+
$data->{'merchant_reference'} = $object->getMerchantReference();
59+
}
5460
return $data;
5561
}
5662
}

0 commit comments

Comments
 (0)