|
| 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 Ayadi shadvarga - Vastu proportion and yoni calculator API |
| 19 | + * |
| 20 | + * Ayadi shadvarga calculator for a building or a room: send the dimensions and the API returns |
| 21 | + * all six proportional formulas with the multiplier, the divisor and the remainder shown, the |
| 22 | + * member each remainder names, and the two verdict rules the texts state. Choose between three |
| 23 | + * text families, which genuinely disagree, and choose your own cubit length, because every |
| 24 | + * remainder is unit sensitive. Built for practitioner tools, plan checking software and anyone |
| 25 | + * who has to justify a dimension rather than assert it. |
| 26 | + * |
| 27 | + * POST /vastu/ayadi |
| 28 | + */ |
| 29 | +class CalculateAyadiRequest extends Request implements HasBody |
| 30 | +{ |
| 31 | + use HasJsonBody; |
| 32 | + |
| 33 | + protected Method $method = Method::POST; |
| 34 | + |
| 35 | + public function __construct( |
| 36 | + public readonly float $breadth, |
| 37 | + public readonly float $length, |
| 38 | + public readonly ?string $ayadiText = null, |
| 39 | + public readonly ?float $circumference = null, |
| 40 | + public readonly ?float $hastaInches = null, |
| 41 | + public readonly ?float $perimeter = null, |
| 42 | + public readonly ?string $unit = null, |
| 43 | + public readonly ?string $vyayaFormula = null, |
| 44 | + public readonly ?string $lang = null, |
| 45 | + ) { |
| 46 | + } |
| 47 | + |
| 48 | + public function resolveEndpoint(): string |
| 49 | + { |
| 50 | + return "/vastu/ayadi"; |
| 51 | + } |
| 52 | + |
| 53 | + /** |
| 54 | + * @return array<string, mixed> |
| 55 | + */ |
| 56 | + protected function defaultBody(): array |
| 57 | + { |
| 58 | + $body = []; |
| 59 | + if ($this->ayadiText !== null) { |
| 60 | + $body['ayadiText'] = $this->ayadiText; |
| 61 | + } |
| 62 | + $body['breadth'] = $this->breadth; |
| 63 | + if ($this->circumference !== null) { |
| 64 | + $body['circumference'] = $this->circumference; |
| 65 | + } |
| 66 | + if ($this->hastaInches !== null) { |
| 67 | + $body['hastaInches'] = $this->hastaInches; |
| 68 | + } |
| 69 | + $body['length'] = $this->length; |
| 70 | + if ($this->perimeter !== null) { |
| 71 | + $body['perimeter'] = $this->perimeter; |
| 72 | + } |
| 73 | + if ($this->unit !== null) { |
| 74 | + $body['unit'] = $this->unit; |
| 75 | + } |
| 76 | + if ($this->vyayaFormula !== null) { |
| 77 | + $body['vyayaFormula'] = $this->vyayaFormula; |
| 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