Skip to content

Commit

Permalink
Regen (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jleagle authored Jun 23, 2021
1 parent 6874448 commit 491b05f
Show file tree
Hide file tree
Showing 7 changed files with 258 additions and 0 deletions.
12 changes: 12 additions & 0 deletions generated/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,18 @@ public function chargeResume(string $chargeId, \ChargeHive\Php\Sdk\Generated\Mod
{
return $this->executePsr7Endpoint(new \ChargeHive\Php\Sdk\Generated\Endpoint\ChargeResume($chargeId, $body), $fetch);
}
/**
*
*
* @param string $chargeId
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @return null|\ChargeHive\Php\Sdk\Generated\Model\ChargehiveChargeSummaryRetrieveResponse|\ChargeHive\Php\Sdk\Generated\Model\RuntimeError|\Psr\Http\Message\ResponseInterface
*/
public function chargeSummaryRetrieve(string $chargeId, string $fetch = self::FETCH_OBJECT)
{
return $this->executePsr7Endpoint(new \ChargeHive\Php\Sdk\Generated\Endpoint\ChargeSummaryRetrieve($chargeId), $fetch);
}
/**
*
*
Expand Down
47 changes: 47 additions & 0 deletions generated/Endpoint/ChargeSummaryRetrieve.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php

namespace ChargeHive\Php\Sdk\Generated\Endpoint;

class ChargeSummaryRetrieve extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7HttplugEndpoint
{
protected $charge_id;
/**
*
*
* @param string $chargeId
*/
public function __construct(string $chargeId)
{
$this->charge_id = $chargeId;
}
use \Jane\OpenApiRuntime\Client\Psr7HttplugEndpointTrait;
public function getMethod() : string
{
return 'GET';
}
public function getUri() : string
{
return str_replace(array('{charge_id}'), array($this->charge_id), '/v1/charge/{charge_id}/summary');
}
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, \Http\Message\StreamFactory $streamFactory = null) : array
{
return array(array(), null);
}
public function getExtraHeaders() : array
{
return array('Accept' => array('application/json'));
}
/**
* {@inheritdoc}
*
*
* @return null|\ChargeHive\Php\Sdk\Generated\Model\ChargehiveChargeSummaryRetrieveResponse|\ChargeHive\Php\Sdk\Generated\Model\RuntimeError
*/
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
{
if (200 === $status) {
return $serializer->deserialize($body, 'ChargeHive\\Php\\Sdk\\Generated\\Model\\ChargehiveChargeSummaryRetrieveResponse', 'json');
}
return $serializer->deserialize($body, 'ChargeHive\\Php\\Sdk\\Generated\\Model\\RuntimeError', 'json');
}
}
38 changes: 38 additions & 0 deletions generated/Model/ChargehiveChargeSummaryRetrieveResponse.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

namespace ChargeHive\Php\Sdk\Generated\Model;

class ChargehiveChargeSummaryRetrieveResponse implements \JsonSerializable
{
/**
*
*
* @var ChtypeChargeSummary
*/
protected $chargeSummary;
/**
*
*
* @return ChtypeChargeSummary
*/
public function getChargeSummary()
{
return $this->chargeSummary;
}
/**
*
*
* @param ChtypeChargeSummary $chargeSummary
*
* @return self
*/
public function setChargeSummary(ChtypeChargeSummary $chargeSummary)
{
$this->chargeSummary = $chargeSummary;
return $this;
}
public function jsonSerialize()
{
return ['chargeSummary' => $this->chargeSummary];
}
}
65 changes: 65 additions & 0 deletions generated/Model/ChtypeChargeSummary.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<?php

namespace ChargeHive\Php\Sdk\Generated\Model;

class ChtypeChargeSummary implements \JsonSerializable
{
/**
*
*
* @var ChtypeAmount
*/
protected $amount;
/**
*
*
* @var string
*/
protected $status = 'STATUS_INVALID';
/**
*
*
* @return ChtypeAmount
*/
public function getAmount()
{
return $this->amount;
}
/**
*
*
* @param ChtypeAmount $amount
*
* @return self
*/
public function setAmount(ChtypeAmount $amount)
{
$this->amount = $amount;
return $this;
}
/**
*
*
* @return string
*/
public function getStatus()
{
return $this->status;
}
/**
*
*
* @param string $status
*
* @return self
*/
public function setStatus(string $status)
{
$this->status = $status;
return $this;
}
public function jsonSerialize()
{
return ['amount' => $this->amount, 'status' => $this->status];
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?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 ChargehiveChargeSummaryRetrieveResponseNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface
{
use DenormalizerAwareTrait;
use NormalizerAwareTrait;
public function supportsDenormalization($data, $type, $format = null)
{
return $type === 'ChargeHive\\Php\\Sdk\\Generated\\Model\\ChargehiveChargeSummaryRetrieveResponse';
}
public function supportsNormalization($data, $format = null)
{
return get_class($data) === 'ChargeHive\\Php\\Sdk\\Generated\\Model\\ChargehiveChargeSummaryRetrieveResponse';
}
public function denormalize($data, $class, $format = null, array $context = array())
{
if (!is_object($data)) {
throw new InvalidArgumentException();
}
$object = new \ChargeHive\Php\Sdk\Generated\Model\ChargehiveChargeSummaryRetrieveResponse();
if (property_exists($data, 'chargeSummary')) {
$object->setChargeSummary($this->denormalizer->denormalize($data->{'chargeSummary'}, 'ChargeHive\\Php\\Sdk\\Generated\\Model\\ChtypeChargeSummary', 'json', $context));
}
return $object;
}
public function normalize($object, $format = null, array $context = array())
{
$data = new \stdClass();
if (null !== $object->getChargeSummary()) {
$data->{'chargeSummary'} = $this->normalizer->normalize($object->getChargeSummary(), 'json', $context);
}
return $data;
}
}
50 changes: 50 additions & 0 deletions generated/Normalizer/ChtypeChargeSummaryNormalizer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?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 ChtypeChargeSummaryNormalizer implements DenormalizerInterface, NormalizerInterface, DenormalizerAwareInterface, NormalizerAwareInterface
{
use DenormalizerAwareTrait;
use NormalizerAwareTrait;
public function supportsDenormalization($data, $type, $format = null)
{
return $type === 'ChargeHive\\Php\\Sdk\\Generated\\Model\\ChtypeChargeSummary';
}
public function supportsNormalization($data, $format = null)
{
return get_class($data) === 'ChargeHive\\Php\\Sdk\\Generated\\Model\\ChtypeChargeSummary';
}
public function denormalize($data, $class, $format = null, array $context = array())
{
if (!is_object($data)) {
throw new InvalidArgumentException();
}
$object = new \ChargeHive\Php\Sdk\Generated\Model\ChtypeChargeSummary();
if (property_exists($data, 'amount')) {
$object->setAmount($this->denormalizer->denormalize($data->{'amount'}, 'ChargeHive\\Php\\Sdk\\Generated\\Model\\ChtypeAmount', 'json', $context));
}
if (property_exists($data, 'status')) {
$object->setStatus($data->{'status'});
}
return $object;
}
public function normalize($object, $format = null, array $context = array())
{
$data = new \stdClass();
if (null !== $object->getAmount()) {
$data->{'amount'} = $this->normalizer->normalize($object->getAmount(), 'json', $context);
}
if (null !== $object->getStatus()) {
$data->{'status'} = $object->getStatus();
}
return $data;
}
}
2 changes: 2 additions & 0 deletions generated/Normalizer/NormalizerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public static function create()
$normalizers[] = new ChargehiveChargeRefundTransactionNormalizer();
$normalizers[] = new ChargehiveChargeResumeRequestNormalizer();
$normalizers[] = new ChargehiveChargeResumeResponseNormalizer();
$normalizers[] = new ChargehiveChargeSummaryRetrieveResponseNormalizer();
$normalizers[] = new ChargehiveChargeSuspendRequestNormalizer();
$normalizers[] = new ChargehiveChargeSuspendResponseNormalizer();
$normalizers[] = new ChargehiveConfigurationApplyRequestNormalizer();
Expand Down Expand Up @@ -64,6 +65,7 @@ public static function create()
$normalizers[] = new ChtypeAttemptDetailNormalizer();
$normalizers[] = new ChtypeChargeItemNormalizer();
$normalizers[] = new ChtypeChargeMetaNormalizer();
$normalizers[] = new ChtypeChargeSummaryNormalizer();
$normalizers[] = new ChtypeCompanyNormalizer();
$normalizers[] = new ChtypeDeliveryNormalizer();
$normalizers[] = new ChtypeDeviceNormalizer();
Expand Down

0 comments on commit 491b05f

Please sign in to comment.