Skip to content

Commit 13dc5a2

Browse files
authored
update sdk to support MethodRepair endpoint (#16)
1 parent 9ab2a48 commit 13dc5a2

File tree

7 files changed

+488
-0
lines changed

7 files changed

+488
-0
lines changed

generated/Client.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,18 @@ public function methodAvailableUpdateSchemas(string $fetch = self::FETCH_OBJECT)
239239
{
240240
return $this->executePsr7Endpoint(new \ChargeHive\Php\Sdk\Generated\Endpoint\MethodAvailableUpdateSchemas(), $fetch);
241241
}
242+
/**
243+
*
244+
*
245+
* @param \ChargeHive\Php\Sdk\Generated\Model\ChargehiveMethodRepairRequest $body
246+
* @param string $fetch Fetch mode to use (can be OBJECT or RESPONSE)
247+
*
248+
* @return null|\ChargeHive\Php\Sdk\Generated\Model\ChargehiveMethodRepairResponse|\ChargeHive\Php\Sdk\Generated\Model\RuntimeError|\Psr\Http\Message\ResponseInterface
249+
*/
250+
public function methodRepair(\ChargeHive\Php\Sdk\Generated\Model\ChargehiveMethodRepairRequest $body, string $fetch = self::FETCH_OBJECT)
251+
{
252+
return $this->executePsr7Endpoint(new \ChargeHive\Php\Sdk\Generated\Endpoint\MethodRepair($body), $fetch);
253+
}
242254
/**
243255
*
244256
*
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?php
2+
3+
namespace ChargeHive\Php\Sdk\Generated\Endpoint;
4+
5+
class MethodRepair extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Psr7HttplugEndpoint
6+
{
7+
/**
8+
*
9+
*
10+
* @param \ChargeHive\Php\Sdk\Generated\Model\ChargehiveMethodRepairRequest $body
11+
*/
12+
public function __construct(\ChargeHive\Php\Sdk\Generated\Model\ChargehiveMethodRepairRequest $body)
13+
{
14+
$this->body = $body;
15+
}
16+
use \Jane\OpenApiRuntime\Client\Psr7HttplugEndpointTrait;
17+
public function getMethod() : string
18+
{
19+
return 'PUT';
20+
}
21+
public function getUri() : string
22+
{
23+
return '/v1/method/repair';
24+
}
25+
public function getBody(\Symfony\Component\Serializer\SerializerInterface $serializer, \Http\Message\StreamFactory $streamFactory = null) : array
26+
{
27+
return $this->getSerializedBody($serializer);
28+
}
29+
public function getExtraHeaders() : array
30+
{
31+
return array('Accept' => array('application/json'));
32+
}
33+
/**
34+
* {@inheritdoc}
35+
*
36+
*
37+
* @return null|\ChargeHive\Php\Sdk\Generated\Model\ChargehiveMethodRepairResponse|\ChargeHive\Php\Sdk\Generated\Model\RuntimeError
38+
*/
39+
protected function transformResponseBody(string $body, int $status, \Symfony\Component\Serializer\SerializerInterface $serializer, ?string $contentType = null)
40+
{
41+
if (200 === $status) {
42+
return $serializer->deserialize($body, 'ChargeHive\\Php\\Sdk\\Generated\\Model\\ChargehiveMethodRepairResponse', 'json');
43+
}
44+
return $serializer->deserialize($body, 'ChargeHive\\Php\\Sdk\\Generated\\Model\\RuntimeError', 'json');
45+
}
46+
}
Lines changed: 254 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,254 @@
1+
<?php
2+
3+
namespace ChargeHive\Php\Sdk\Generated\Model;
4+
5+
class ChargehiveMethodRepairRequest implements \JsonSerializable
6+
{
7+
/**
8+
*
9+
*
10+
* @var string
11+
*/
12+
protected $paymentMethodId;
13+
/**
14+
*
15+
*
16+
* @var string
17+
*/
18+
protected $bpid;
19+
/**
20+
*
21+
*
22+
* @var string
23+
*/
24+
protected $mfp;
25+
/**
26+
*
27+
*
28+
* @var string
29+
*/
30+
protected $name;
31+
/**
32+
*
33+
*
34+
* @var string
35+
*/
36+
protected $pfp;
37+
/**
38+
*
39+
*
40+
* @var string
41+
*/
42+
protected $paymentScheme;
43+
/**
44+
*
45+
*
46+
* @var string
47+
*/
48+
protected $tokenId;
49+
/**
50+
*
51+
*
52+
* @var string
53+
*/
54+
protected $tokenType;
55+
/**
56+
*
57+
*
58+
* @var string
59+
*/
60+
protected $tokenExpiry;
61+
/**
62+
*
63+
*
64+
* @return string
65+
*/
66+
public function getPaymentMethodId()
67+
{
68+
return $this->paymentMethodId;
69+
}
70+
/**
71+
*
72+
*
73+
* @param string $paymentMethodId
74+
*
75+
* @return self
76+
*/
77+
public function setPaymentMethodId(string $paymentMethodId)
78+
{
79+
$this->paymentMethodId = $paymentMethodId;
80+
return $this;
81+
}
82+
/**
83+
*
84+
*
85+
* @return string
86+
*/
87+
public function getBpid()
88+
{
89+
return $this->bpid;
90+
}
91+
/**
92+
*
93+
*
94+
* @param string $bpid
95+
*
96+
* @return self
97+
*/
98+
public function setBpid(string $bpid)
99+
{
100+
$this->bpid = $bpid;
101+
return $this;
102+
}
103+
/**
104+
*
105+
*
106+
* @return string
107+
*/
108+
public function getMfp()
109+
{
110+
return $this->mfp;
111+
}
112+
/**
113+
*
114+
*
115+
* @param string $mfp
116+
*
117+
* @return self
118+
*/
119+
public function setMfp(string $mfp)
120+
{
121+
$this->mfp = $mfp;
122+
return $this;
123+
}
124+
/**
125+
*
126+
*
127+
* @return string
128+
*/
129+
public function getName()
130+
{
131+
return $this->name;
132+
}
133+
/**
134+
*
135+
*
136+
* @param string $name
137+
*
138+
* @return self
139+
*/
140+
public function setName(string $name)
141+
{
142+
$this->name = $name;
143+
return $this;
144+
}
145+
/**
146+
*
147+
*
148+
* @return string
149+
*/
150+
public function getPfp()
151+
{
152+
return $this->pfp;
153+
}
154+
/**
155+
*
156+
*
157+
* @param string $pfp
158+
*
159+
* @return self
160+
*/
161+
public function setPfp(string $pfp)
162+
{
163+
$this->pfp = $pfp;
164+
return $this;
165+
}
166+
/**
167+
*
168+
*
169+
* @return string
170+
*/
171+
public function getPaymentScheme()
172+
{
173+
return $this->paymentScheme;
174+
}
175+
/**
176+
*
177+
*
178+
* @param string $paymentScheme
179+
*
180+
* @return self
181+
*/
182+
public function setPaymentScheme(string $paymentScheme)
183+
{
184+
$this->paymentScheme = $paymentScheme;
185+
return $this;
186+
}
187+
/**
188+
*
189+
*
190+
* @return string
191+
*/
192+
public function getTokenId()
193+
{
194+
return $this->tokenId;
195+
}
196+
/**
197+
*
198+
*
199+
* @param string $tokenId
200+
*
201+
* @return self
202+
*/
203+
public function setTokenId(string $tokenId)
204+
{
205+
$this->tokenId = $tokenId;
206+
return $this;
207+
}
208+
/**
209+
*
210+
*
211+
* @return string
212+
*/
213+
public function getTokenType()
214+
{
215+
return $this->tokenType;
216+
}
217+
/**
218+
*
219+
*
220+
* @param string $tokenType
221+
*
222+
* @return self
223+
*/
224+
public function setTokenType(string $tokenType)
225+
{
226+
$this->tokenType = $tokenType;
227+
return $this;
228+
}
229+
/**
230+
*
231+
*
232+
* @return string
233+
*/
234+
public function getTokenExpiry()
235+
{
236+
return $this->tokenExpiry;
237+
}
238+
/**
239+
*
240+
*
241+
* @param string $tokenExpiry
242+
*
243+
* @return self
244+
*/
245+
public function setTokenExpiry(string $tokenExpiry)
246+
{
247+
$this->tokenExpiry = $tokenExpiry;
248+
return $this;
249+
}
250+
public function jsonSerialize()
251+
{
252+
return ['paymentMethodId' => $this->paymentMethodId, 'bpid' => $this->bpid, 'mfp' => $this->mfp, 'name' => $this->name, 'pfp' => $this->pfp, 'paymentScheme' => $this->paymentScheme, 'tokenId' => $this->tokenId, 'tokenType' => $this->tokenType, 'tokenExpiry' => $this->tokenExpiry];
253+
}
254+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
3+
namespace ChargeHive\Php\Sdk\Generated\Model;
4+
5+
class ChargehiveMethodRepairResponse implements \JsonSerializable
6+
{
7+
/**
8+
*
9+
*
10+
* @var bool
11+
*/
12+
protected $success;
13+
/**
14+
*
15+
*
16+
* @return bool
17+
*/
18+
public function getSuccess()
19+
{
20+
return $this->success;
21+
}
22+
/**
23+
*
24+
*
25+
* @param bool $success
26+
*
27+
* @return self
28+
*/
29+
public function setSuccess(bool $success)
30+
{
31+
$this->success = $success;
32+
return $this;
33+
}
34+
public function jsonSerialize()
35+
{
36+
return ['success' => $this->success];
37+
}
38+
}

0 commit comments

Comments
 (0)