|
| 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 | + * Get all Prana dashas for a Mahadasha, Antardasha, Pratyantardasha and Sookshma |
| 19 | + * |
| 20 | + * Prana dasha API. Returns the 9 Prana periods inside a chosen Sookshma dasha, the fifth and |
| 21 | + * finest level of the Vimshottari dasha hierarchy. Completes the full vimshottari drill down |
| 22 | + * from the 120-year cycle to hour level timing, typically 20 minutes to 4 days per period |
| 23 | + * depending on the parent Mahadasha. Built for five column dasha drill down tables, muhurta |
| 24 | + * selection, and pinpointing the trigger moment inside an event window already found at the |
| 25 | + * Sookshma level. |
| 26 | + * |
| 27 | + * POST /vedic-astrology/dasha/sub/{mahadasha}/{antardasha}/{pratyantardasha}/{sookshma} |
| 28 | + */ |
| 29 | +class GetPranaDashasRequest extends Request implements HasBody |
| 30 | +{ |
| 31 | + use HasJsonBody; |
| 32 | + |
| 33 | + protected Method $method = Method::POST; |
| 34 | + |
| 35 | + public function __construct( |
| 36 | + public readonly string $mahadasha, |
| 37 | + public readonly string $antardasha, |
| 38 | + public readonly string $pratyantardasha, |
| 39 | + public readonly string $sookshma, |
| 40 | + public readonly string $date, |
| 41 | + public readonly float $latitude, |
| 42 | + public readonly float $longitude, |
| 43 | + public readonly string $time, |
| 44 | + public readonly ?string $ayanamsa = null, |
| 45 | + public readonly ?string $nodeType = null, |
| 46 | + public readonly ?bool $significators = null, |
| 47 | + public readonly mixed $timezone = null, |
| 48 | + public readonly ?string $lang = null, |
| 49 | + ) { |
| 50 | + } |
| 51 | + |
| 52 | + public function resolveEndpoint(): string |
| 53 | + { |
| 54 | + return "/vedic-astrology/dasha/sub/{$this->mahadasha}/{$this->antardasha}/{$this->pratyantardasha}/{$this->sookshma}"; |
| 55 | + } |
| 56 | + |
| 57 | + /** |
| 58 | + * @return array<string, mixed> |
| 59 | + */ |
| 60 | + protected function defaultBody(): array |
| 61 | + { |
| 62 | + $body = []; |
| 63 | + if ($this->ayanamsa !== null) { |
| 64 | + $body['ayanamsa'] = $this->ayanamsa; |
| 65 | + } |
| 66 | + $body['date'] = $this->date; |
| 67 | + $body['latitude'] = $this->latitude; |
| 68 | + $body['longitude'] = $this->longitude; |
| 69 | + if ($this->nodeType !== null) { |
| 70 | + $body['nodeType'] = $this->nodeType; |
| 71 | + } |
| 72 | + if ($this->significators !== null) { |
| 73 | + $body['significators'] = $this->significators; |
| 74 | + } |
| 75 | + $body['time'] = $this->time; |
| 76 | + if ($this->timezone !== null) { |
| 77 | + $body['timezone'] = $this->timezone; |
| 78 | + } |
| 79 | + |
| 80 | + return $body; |
| 81 | + } |
| 82 | + |
| 83 | + /** |
| 84 | + * @return array<string, mixed> |
| 85 | + */ |
| 86 | + protected function defaultQuery(): array |
| 87 | + { |
| 88 | + $query = []; |
| 89 | + if ($this->lang !== null) { |
| 90 | + $query['lang'] = $this->lang; |
| 91 | + } |
| 92 | + |
| 93 | + return $query; |
| 94 | + } |
| 95 | +} |
0 commit comments