diff --git a/generated/Model/ChargehiveChargeCreateRequest.php b/generated/Model/ChargehiveChargeCreateRequest.php index 3fcb947..c7d7994 100644 --- a/generated/Model/ChargehiveChargeCreateRequest.php +++ b/generated/Model/ChargehiveChargeCreateRequest.php @@ -52,6 +52,12 @@ class ChargehiveChargeCreateRequest implements \JsonSerializable * @var ChargehivechtypeLabel[] */ protected $labels; + /** + * + * + * @var ChtypeInitialTransactionData[] + */ + protected $initialTransactions; /** * * @@ -220,8 +226,29 @@ public function setLabels(array $labels) $this->labels = $labels; return $this; } + /** + * + * + * @return ChtypeInitialTransactionData[] + */ + public function getInitialTransactions() + { + return $this->initialTransactions; + } + /** + * + * + * @param ChtypeInitialTransactionData[] $initialTransactions + * + * @return self + */ + public function setInitialTransactions(array $initialTransactions) + { + $this->initialTransactions = $initialTransactions; + return $this; + } public function jsonSerialize() { - return ['merchantReference' => $this->merchantReference, 'amount' => $this->amount, 'paymentMethodIds' => $this->paymentMethodIds, 'expiryTime' => $this->expiryTime, 'contractType' => $this->contractType, 'environment' => $this->environment, 'chargeMeta' => $this->chargeMeta, 'labels' => $this->labels]; + return ['merchantReference' => $this->merchantReference, 'amount' => $this->amount, 'paymentMethodIds' => $this->paymentMethodIds, 'expiryTime' => $this->expiryTime, 'contractType' => $this->contractType, 'environment' => $this->environment, 'chargeMeta' => $this->chargeMeta, 'labels' => $this->labels, 'initialTransactions' => $this->initialTransactions]; } } \ No newline at end of file diff --git a/generated/Model/ChtypeInitialTransactionData.php b/generated/Model/ChtypeInitialTransactionData.php new file mode 100644 index 0000000..cc7156e --- /dev/null +++ b/generated/Model/ChtypeInitialTransactionData.php @@ -0,0 +1,92 @@ +chargeId; + } + /** + * + * + * @param string $chargeId + * + * @return self + */ + public function setChargeId(string $chargeId) + { + $this->chargeId = $chargeId; + return $this; + } + /** + * + * + * @return string + */ + public function getTransactionId() + { + return $this->transactionId; + } + /** + * + * + * @param string $transactionId + * + * @return self + */ + public function setTransactionId(string $transactionId) + { + $this->transactionId = $transactionId; + return $this; + } + /** + * + * + * @return string + */ + public function getConnectorId() + { + return $this->connectorId; + } + /** + * + * + * @param string $connectorId + * + * @return self + */ + public function setConnectorId(string $connectorId) + { + $this->connectorId = $connectorId; + return $this; + } + public function jsonSerialize() + { + return ['chargeId' => $this->chargeId, 'transactionId' => $this->transactionId, 'connectorId' => $this->connectorId]; + } +} \ No newline at end of file diff --git a/generated/Normalizer/ChargehiveChargeCreateRequestNormalizer.php b/generated/Normalizer/ChargehiveChargeCreateRequestNormalizer.php index c187503..154f2e7 100644 --- a/generated/Normalizer/ChargehiveChargeCreateRequestNormalizer.php +++ b/generated/Normalizer/ChargehiveChargeCreateRequestNormalizer.php @@ -60,6 +60,13 @@ public function denormalize($data, $class, $format = null, array $context = arra } $object->setLabels($values_1); } + if (property_exists($data, 'initial_transactions')) { + $values_2 = array(); + foreach ($data->{'initial_transactions'} as $value_2) { + $values_2[] = $this->denormalizer->denormalize($value_2, 'ChargeHive\\Php\\Sdk\\Generated\\Model\\ChtypeInitialTransactionData', 'json', $context); + } + $object->setInitialTransactions($values_2); + } return $object; } public function normalize($object, $format = null, array $context = array()) @@ -97,6 +104,13 @@ public function normalize($object, $format = null, array $context = array()) } $data->{'labels'} = $values_1; } + if (null !== $object->getInitialTransactions()) { + $values_2 = array(); + foreach ($object->getInitialTransactions() as $value_2) { + $values_2[] = $this->normalizer->normalize($value_2, 'json', $context); + } + $data->{'initial_transactions'} = $values_2; + } return $data; } } \ No newline at end of file diff --git a/generated/Normalizer/ChtypeInitialTransactionDataNormalizer.php b/generated/Normalizer/ChtypeInitialTransactionDataNormalizer.php new file mode 100644 index 0000000..5597d68 --- /dev/null +++ b/generated/Normalizer/ChtypeInitialTransactionDataNormalizer.php @@ -0,0 +1,56 @@ +setChargeId($data->{'charge_id'}); + } + if (property_exists($data, 'transaction_id')) { + $object->setTransactionId($data->{'transaction_id'}); + } + if (property_exists($data, 'connector_id')) { + $object->setConnectorId($data->{'connector_id'}); + } + return $object; + } + public function normalize($object, $format = null, array $context = array()) + { + $data = new \stdClass(); + if (null !== $object->getChargeId()) { + $data->{'charge_id'} = $object->getChargeId(); + } + if (null !== $object->getTransactionId()) { + $data->{'transaction_id'} = $object->getTransactionId(); + } + if (null !== $object->getConnectorId()) { + $data->{'connector_id'} = $object->getConnectorId(); + } + return $data; + } +} \ No newline at end of file diff --git a/generated/Normalizer/NormalizerFactory.php b/generated/Normalizer/NormalizerFactory.php index 375d506..37848e5 100644 --- a/generated/Normalizer/NormalizerFactory.php +++ b/generated/Normalizer/NormalizerFactory.php @@ -74,6 +74,7 @@ public static function create() $normalizers[] = new ChtypeFraudFactorNormalizer(); $normalizers[] = new ChtypeFraudResultNormalizer(); $normalizers[] = new ChtypeFraudScoreNormalizer(); + $normalizers[] = new ChtypeInitialTransactionDataNormalizer(); $normalizers[] = new ChtypePaymentMethodNormalizer(); $normalizers[] = new ChtypePaymentMethodInfoNormalizer(); $normalizers[] = new ChtypePaymentMethodSchemaCardNormalizer();