|
| 1 | +<?php |
| 2 | + |
| 3 | +declare(strict_types=1); |
| 4 | + |
| 5 | +/** |
| 6 | + * AUTO-GENERATED by scripts/generate.mjs from the live OpenAPI spec. |
| 7 | + * Do not edit this file by hand. Regenerate with: node scripts/generate.mjs |
| 8 | + */ |
| 9 | + |
| 10 | +namespace RoxyAPI\Sdk\Generated\Requests; |
| 11 | + |
| 12 | +use Saloon\Enums\Method; |
| 13 | +use Saloon\Http\Request; |
| 14 | +use Saloon\Contracts\Body\HasBody; |
| 15 | +use Saloon\Traits\Body\HasJsonBody; |
| 16 | + |
| 17 | +/** |
| 18 | + * Calculate the defined Human Design channels |
| 19 | + * |
| 20 | + * Calculate the defined channels for a birth moment. A channel is defined when both of its |
| 21 | + * gates are activated, and it wires together the two centers it connects. Returns each defined |
| 22 | + * channel with its gates, name, circuit family, and connected centers, plus the full set of |
| 23 | + * centers those channels define. Built for bodygraph rendering and definition analysis. |
| 24 | + * |
| 25 | + * POST /human-design/channels |
| 26 | + */ |
| 27 | +class CalculateChannelsRequest extends Request implements HasBody |
| 28 | +{ |
| 29 | + use HasJsonBody; |
| 30 | + |
| 31 | + protected Method $method = Method::POST; |
| 32 | + |
| 33 | + public function __construct( |
| 34 | + public readonly string $date, |
| 35 | + public readonly string $time, |
| 36 | + public readonly mixed $timezone, |
| 37 | + public readonly ?float $latitude = null, |
| 38 | + public readonly ?float $longitude = null, |
| 39 | + public readonly ?string $lang = null, |
| 40 | + ) { |
| 41 | + } |
| 42 | + |
| 43 | + public function resolveEndpoint(): string |
| 44 | + { |
| 45 | + return "/human-design/channels"; |
| 46 | + } |
| 47 | + |
| 48 | + /** |
| 49 | + * @return array<string, mixed> |
| 50 | + */ |
| 51 | + protected function defaultBody(): array |
| 52 | + { |
| 53 | + $body = []; |
| 54 | + $body['date'] = $this->date; |
| 55 | + if ($this->latitude !== null) { |
| 56 | + $body['latitude'] = $this->latitude; |
| 57 | + } |
| 58 | + if ($this->longitude !== null) { |
| 59 | + $body['longitude'] = $this->longitude; |
| 60 | + } |
| 61 | + $body['time'] = $this->time; |
| 62 | + $body['timezone'] = $this->timezone; |
| 63 | + |
| 64 | + return $body; |
| 65 | + } |
| 66 | + |
| 67 | + /** |
| 68 | + * @return array<string, mixed> |
| 69 | + */ |
| 70 | + protected function defaultQuery(): array |
| 71 | + { |
| 72 | + $query = []; |
| 73 | + if ($this->lang !== null) { |
| 74 | + $query['lang'] = $this->lang; |
| 75 | + } |
| 76 | + |
| 77 | + return $query; |
| 78 | + } |
| 79 | +} |
0 commit comments