-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
191 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<?php | ||
|
||
namespace ChargeHive\Php\Sdk\Generated\Model; | ||
|
||
class ChtypeInitialTransactionData implements \JsonSerializable | ||
{ | ||
/** | ||
* | ||
* | ||
* @var string | ||
*/ | ||
protected $chargeId; | ||
/** | ||
* | ||
* | ||
* @var string | ||
*/ | ||
protected $transactionId; | ||
/** | ||
* | ||
* | ||
* @var string | ||
*/ | ||
protected $connectorId; | ||
/** | ||
* | ||
* | ||
* @return string | ||
*/ | ||
public function getChargeId() | ||
{ | ||
return $this->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]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
generated/Normalizer/ChtypeInitialTransactionDataNormalizer.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?php | ||
|
||
namespace ChargeHive\Php\Sdk\Generated\Normalizer; | ||
|
||
use Jane\JsonSchemaRuntime\Reference; | ||
use Symfony\Component\Serializer\Exception\InvalidArgumentException; | ||
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface; | ||
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait; | ||
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; | ||
use Symfony\Component\Serializer\Normalizer\NormalizerAwareInterface; | ||
use Symfony\Component\Serializer\Normalizer\NormalizerAwareTrait; | ||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface; | ||
class ChtypeInitialTransactionDataNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface | ||
{ | ||
use DenormalizerAwareTrait; | ||
use NormalizerAwareTrait; | ||
public function supportsDenormalization($data, $type, $format = null) | ||
{ | ||
return $type === 'ChargeHive\\Php\\Sdk\\Generated\\Model\\ChtypeInitialTransactionData'; | ||
} | ||
public function supportsNormalization($data, $format = null) | ||
{ | ||
return get_class($data) === 'ChargeHive\\Php\\Sdk\\Generated\\Model\\ChtypeInitialTransactionData'; | ||
} | ||
public function denormalize($data, $class, $format = null, array $context = array()) | ||
{ | ||
if (!is_object($data)) { | ||
throw new InvalidArgumentException(); | ||
} | ||
$object = new \ChargeHive\Php\Sdk\Generated\Model\ChtypeInitialTransactionData(); | ||
if (property_exists($data, 'charge_id')) { | ||
$object->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; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters