|
| 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 | + * Cast a KP horary (Prashna) chart from a number 1-249 - KP Horary API |
| 19 | + * |
| 20 | + * Cast a Krishnamurti Paddhati horary chart, also called Prashna, from a number between 1 and |
| 21 | + * 249 given by the querent plus the moment and place the question is judged. NO BIRTH DETAILS |
| 22 | + * ARE NEEDED, which is what makes horary the KP answer when birth time is unknown or |
| 23 | + * unreliable. The number maps to one of the 249 KP sub divisions and sets the Ascendant; the |
| 24 | + * twelve Placidus cusps follow from that Ascendant at the given latitude, and every planetary |
| 25 | + * position comes from the real sky at the moment of the question. Returns the Ascendant with |
| 26 | + * its sub lord, all twelve cusps with star lord and sub lord, the nine grahas placed against |
| 27 | + * those cusps, the five ruling planets for validating the chart, and four-level significators |
| 28 | + * for judging which houses each graha supports. KP horary API, Prashna kundali calculator, 249 |
| 29 | + * horary number chart, Krishnamurti Paddhati horary, cusp sub lord question answering. |
| 30 | + * |
| 31 | + * POST /vedic-astrology/kp/horary |
| 32 | + */ |
| 33 | +class CastKpHoraryChartRequest extends Request implements HasBody |
| 34 | +{ |
| 35 | + use HasJsonBody; |
| 36 | + |
| 37 | + protected Method $method = Method::POST; |
| 38 | + |
| 39 | + public function __construct( |
| 40 | + public readonly string $date, |
| 41 | + public readonly int $horaryNumber, |
| 42 | + public readonly float $latitude, |
| 43 | + public readonly float $longitude, |
| 44 | + public readonly string $time, |
| 45 | + public readonly ?string $ayanamsa = null, |
| 46 | + public readonly ?float $ayanamsaValue = null, |
| 47 | + public readonly ?string $nodeType = null, |
| 48 | + public readonly mixed $timezone = null, |
| 49 | + public readonly ?string $focus = null, |
| 50 | + public readonly ?string $lang = null, |
| 51 | + ) { |
| 52 | + } |
| 53 | + |
| 54 | + public function resolveEndpoint(): string |
| 55 | + { |
| 56 | + return "/vedic-astrology/kp/horary"; |
| 57 | + } |
| 58 | + |
| 59 | + /** |
| 60 | + * @return array<string, mixed> |
| 61 | + */ |
| 62 | + protected function defaultBody(): array |
| 63 | + { |
| 64 | + $body = []; |
| 65 | + if ($this->ayanamsa !== null) { |
| 66 | + $body['ayanamsa'] = $this->ayanamsa; |
| 67 | + } |
| 68 | + if ($this->ayanamsaValue !== null) { |
| 69 | + $body['ayanamsaValue'] = $this->ayanamsaValue; |
| 70 | + } |
| 71 | + $body['date'] = $this->date; |
| 72 | + $body['horaryNumber'] = $this->horaryNumber; |
| 73 | + $body['latitude'] = $this->latitude; |
| 74 | + $body['longitude'] = $this->longitude; |
| 75 | + if ($this->nodeType !== null) { |
| 76 | + $body['nodeType'] = $this->nodeType; |
| 77 | + } |
| 78 | + $body['time'] = $this->time; |
| 79 | + if ($this->timezone !== null) { |
| 80 | + $body['timezone'] = $this->timezone; |
| 81 | + } |
| 82 | + |
| 83 | + return $body; |
| 84 | + } |
| 85 | + |
| 86 | + /** |
| 87 | + * @return array<string, mixed> |
| 88 | + */ |
| 89 | + protected function defaultQuery(): array |
| 90 | + { |
| 91 | + $query = []; |
| 92 | + if ($this->focus !== null) { |
| 93 | + $query['focus'] = $this->focus; |
| 94 | + } |
| 95 | + if ($this->lang !== null) { |
| 96 | + $query['lang'] = $this->lang; |
| 97 | + } |
| 98 | + |
| 99 | + return $query; |
| 100 | + } |
| 101 | +} |
0 commit comments