Skip to content

Commit

Permalink
Update (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jleagle authored Apr 26, 2021
1 parent 791a56a commit b62a91b
Show file tree
Hide file tree
Showing 36 changed files with 2,077 additions and 39 deletions.
47 changes: 47 additions & 0 deletions generated/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,32 @@ public function chargeRefund(string $chargeId, \ChargeHive\Php\Sdk\Generated\Mod
{
return $this->executePsr7Endpoint(new \ChargeHive\Php\Sdk\Generated\Endpoint\ChargeRefund($chargeId, $body), $fetch);
}
/**
*
*
* @param string $chargeId
* @param \ChargeHive\Php\Sdk\Generated\Model\ChargehiveChargeResumeRequest $body
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @return null|\ChargeHive\Php\Sdk\Generated\Model\ChargehiveChargeResumeResponse|\ChargeHive\Php\Sdk\Generated\Model\RuntimeError|\Psr\Http\Message\ResponseInterface
*/
public function chargeResume(string $chargeId, \ChargeHive\Php\Sdk\Generated\Model\ChargehiveChargeResumeRequest $body, string $fetch = self::FETCH_OBJECT)
{
return $this->executePsr7Endpoint(new \ChargeHive\Php\Sdk\Generated\Endpoint\ChargeResume($chargeId, $body), $fetch);
}
/**
*
*
* @param string $chargeId
* @param \ChargeHive\Php\Sdk\Generated\Model\ChargehiveChargeSuspendRequest $body
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @return null|\ChargeHive\Php\Sdk\Generated\Model\ChargehiveChargeSuspendResponse|\ChargeHive\Php\Sdk\Generated\Model\RuntimeError|\Psr\Http\Message\ResponseInterface
*/
public function chargeSuspend(string $chargeId, \ChargeHive\Php\Sdk\Generated\Model\ChargehiveChargeSuspendRequest $body, string $fetch = self::FETCH_OBJECT)
{
return $this->executePsr7Endpoint(new \ChargeHive\Php\Sdk\Generated\Endpoint\ChargeSuspend($chargeId, $body), $fetch);
}
/**
*
*
Expand Down Expand Up @@ -177,6 +203,27 @@ public function methodAvailableUpdateSchemas(string $fetch = self::FETCH_OBJECT)
{
return $this->executePsr7Endpoint(new \ChargeHive\Php\Sdk\Generated\Endpoint\MethodAvailableUpdateSchemas(), $fetch);
}
/**
*
*
* @param \ChargeHive\Php\Sdk\Generated\Model\ChargehiveMethodTokenizeRequest $body
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @return null|\ChargeHive\Php\Sdk\Generated\Model\ChargehiveMethodTokenizeResponse|\ChargeHive\Php\Sdk\Generated\Model\RuntimeError|\Psr\Http\Message\ResponseInterface
*/
public function methodTokenize(\ChargeHive\Php\Sdk\Generated\Model\ChargehiveMethodTokenizeRequest $body, string $fetch = self::FETCH_OBJECT)
{
return $this->executePsr7Endpoint(new \ChargeHive\Php\Sdk\Generated\Endpoint\MethodTokenize($body), $fetch);
}
/**
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
*
* @return null|\ChargeHive\Php\Sdk\Generated\Model\ChargehiveTransportKeyRetrieveResponse|\ChargeHive\Php\Sdk\Generated\Model\RuntimeError|\Psr\Http\Message\ResponseInterface
*/
public function transportKeyRetrieve(string $fetch = self::FETCH_OBJECT)
{
return $this->executePsr7Endpoint(new \ChargeHive\Php\Sdk\Generated\Endpoint\TransportKeyRetrieve(), $fetch);
}
/**
*
*
Expand Down
49 changes: 49 additions & 0 deletions generated/Endpoint/ChargeResume.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php

namespace ChargeHive\Php\Sdk\Generated\Endpoint;

class ChargeResume extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7HttplugEndpoint
{
protected $charge_id;
/**
*
*
* @param string $chargeId
* @param \ChargeHive\Php\Sdk\Generated\Model\ChargehiveChargeResumeRequest $body
*/
public function __construct(string $chargeId, \ChargeHive\Php\Sdk\Generated\Model\ChargehiveChargeResumeRequest $body)
{
$this->charge_id = $chargeId;
$this->body = $body;
}
use \Jane\OpenApiRuntime\Client\Psr7HttplugEndpointTrait;
public function getMethod() : string
{
return 'POST';
}
public function getUri() : string
{
return str_replace(array('{charge_id}'), array($this->charge_id), '/v1/charge/{charge_id}/resume');
}
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, \Http\Message\StreamFactory $streamFactory = null) : array
{
return $this->getSerializedBody($serializer);
}
public function getExtraHeaders() : array
{
return array('Accept' => array('application/json'));
}
/**
* {@inheritdoc}
*
*
* @return null|\ChargeHive\Php\Sdk\Generated\Model\ChargehiveChargeResumeResponse|\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\\ChargehiveChargeResumeResponse', 'json');
}
return $serializer->deserialize($body, 'ChargeHive\\Php\\Sdk\\Generated\\Model\\RuntimeError', 'json');
}
}
49 changes: 49 additions & 0 deletions generated/Endpoint/ChargeSuspend.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php

namespace ChargeHive\Php\Sdk\Generated\Endpoint;

class ChargeSuspend extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7HttplugEndpoint
{
protected $charge_id;
/**
*
*
* @param string $chargeId
* @param \ChargeHive\Php\Sdk\Generated\Model\ChargehiveChargeSuspendRequest $body
*/
public function __construct(string $chargeId, \ChargeHive\Php\Sdk\Generated\Model\ChargehiveChargeSuspendRequest $body)
{
$this->charge_id = $chargeId;
$this->body = $body;
}
use \Jane\OpenApiRuntime\Client\Psr7HttplugEndpointTrait;
public function getMethod() : string
{
return 'POST';
}
public function getUri() : string
{
return str_replace(array('{charge_id}'), array($this->charge_id), '/v1/charge/{charge_id}/suspend');
}
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, \Http\Message\StreamFactory $streamFactory = null) : array
{
return $this->getSerializedBody($serializer);
}
public function getExtraHeaders() : array
{
return array('Accept' => array('application/json'));
}
/**
* {@inheritdoc}
*
*
* @return null|\ChargeHive\Php\Sdk\Generated\Model\ChargehiveChargeSuspendResponse|\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\\ChargehiveChargeSuspendResponse', 'json');
}
return $serializer->deserialize($body, 'ChargeHive\\Php\\Sdk\\Generated\\Model\\RuntimeError', 'json');
}
}
46 changes: 46 additions & 0 deletions generated/Endpoint/MethodTokenize.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?php

namespace ChargeHive\Php\Sdk\Generated\Endpoint;

class MethodTokenize extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7HttplugEndpoint
{
/**
*
*
* @param \ChargeHive\Php\Sdk\Generated\Model\ChargehiveMethodTokenizeRequest $body
*/
public function __construct(\ChargeHive\Php\Sdk\Generated\Model\ChargehiveMethodTokenizeRequest $body)
{
$this->body = $body;
}
use \Jane\OpenApiRuntime\Client\Psr7HttplugEndpointTrait;
public function getMethod() : string
{
return 'POST';
}
public function getUri() : string
{
return '/v1/method/tokenize';
}
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, \Http\Message\StreamFactory $streamFactory = null) : array
{
return $this->getSerializedBody($serializer);
}
public function getExtraHeaders() : array
{
return array('Accept' => array('application/json'));
}
/**
* {@inheritdoc}
*
*
* @return null|\ChargeHive\Php\Sdk\Generated\Model\ChargehiveMethodTokenizeResponse|\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\\ChargehiveMethodTokenizeResponse', 'json');
}
return $serializer->deserialize($body, 'ChargeHive\\Php\\Sdk\\Generated\\Model\\RuntimeError', 'json');
}
}
37 changes: 37 additions & 0 deletions generated/Endpoint/TransportKeyRetrieve.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

namespace ChargeHive\Php\Sdk\Generated\Endpoint;

class TransportKeyRetrieve extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7HttplugEndpoint
{
use \Jane\OpenApiRuntime\Client\Psr7HttplugEndpointTrait;
public function getMethod() : string
{
return 'GET';
}
public function getUri() : string
{
return '/v1/method/transport-key';
}
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\ChargehiveTransportKeyRetrieveResponse|\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\\ChargehiveTransportKeyRetrieveResponse', 'json');
}
return $serializer->deserialize($body, 'ChargeHive\\Php\\Sdk\\Generated\\Model\\RuntimeError', 'json');
}
}
38 changes: 38 additions & 0 deletions generated/Model/ChargehiveChargeResumeRequest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

namespace ChargeHive\Php\Sdk\Generated\Model;

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

namespace ChargeHive\Php\Sdk\Generated\Model;

class ChargehiveChargeResumeResponse implements \JsonSerializable
{
/**
*
*
* @var bool
*/
protected $success;
/**
*
*
* @var string
*/
protected $message;
/**
*
*
* @return bool
*/
public function getSuccess()
{
return $this->success;
}
/**
*
*
* @param bool $success
*
* @return self
*/
public function setSuccess(bool $success)
{
$this->success = $success;
return $this;
}
/**
*
*
* @return string
*/
public function getMessage()
{
return $this->message;
}
/**
*
*
* @param string $message
*
* @return self
*/
public function setMessage(string $message)
{
$this->message = $message;
return $this;
}
public function jsonSerialize()
{
return ['success' => $this->success, 'message' => $this->message];
}
}
38 changes: 38 additions & 0 deletions generated/Model/ChargehiveChargeSuspendRequest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?php

namespace ChargeHive\Php\Sdk\Generated\Model;

class ChargehiveChargeSuspendRequest implements \JsonSerializable
{
/**
*
*
* @var string
*/
protected $chargeId;
/**
*
*
* @return string
*/
public function getChargeId()
{
return $this->chargeId;
}
/**
*
*
* @param string $chargeId
*
* @return self
*/
public function setChargeId(string $chargeId)
{
$this->chargeId = $chargeId;
return $this;
}
public function jsonSerialize()
{
return ['chargeId' => $this->chargeId];
}
}
Loading

0 comments on commit b62a91b

Please sign in to comment.