Skip to content

Commit da8b838

Browse files
feat(api): api update
1 parent a7a0afe commit da8b838

File tree

12 files changed

+783
-3
lines changed

12 files changed

+783
-3
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 5
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser%2Fcas-parser-b7fdba3d3f97c7debc22c7ca30b828bce81bcd64648df8c94029b27a3321ebb9.yml
3-
openapi_spec_hash: 03f1315f1d32ada42445ca920f047dff
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser%2Fcas-parser-9eaed98ce5934f11e901cef376a28257d2c196bd3dba7c690babc6741a730ded.yml
3+
openapi_spec_hash: b76e4e830c4d03ba4cf9429bb9fb9c8a
44
config_hash: cb5d75abef6264b5d86448caf7295afa

src/CasParser/UnifiedResponse.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
use CasParser\CasParser\UnifiedResponse\Investor;
1010
use CasParser\CasParser\UnifiedResponse\Meta;
1111
use CasParser\CasParser\UnifiedResponse\MutualFund;
12+
use CasParser\CasParser\UnifiedResponse\Np;
1213
use CasParser\CasParser\UnifiedResponse\Summary;
1314
use CasParser\Core\Attributes\Api;
1415
use CasParser\Core\Concerns\SdkModel;
@@ -21,6 +22,7 @@
2122
* investor?: Investor,
2223
* meta?: Meta,
2324
* mutualFunds?: list<MutualFund>,
25+
* nps?: list<Np>,
2426
* summary?: Summary,
2527
* }
2628
* When used in a response, this type parameter can define a $rawResponse property.
@@ -50,6 +52,14 @@ final class UnifiedResponse implements BaseModel
5052
#[Api('mutual_funds', list: MutualFund::class, optional: true)]
5153
public ?array $mutualFunds;
5254

55+
/**
56+
* List of NPS accounts.
57+
*
58+
* @var list<Np>|null $nps
59+
*/
60+
#[Api(list: Np::class, optional: true)]
61+
public ?array $nps;
62+
5363
#[Api(optional: true)]
5464
public ?Summary $summary;
5565

@@ -65,13 +75,15 @@ public function __construct()
6575
*
6676
* @param list<DematAccount> $dematAccounts
6777
* @param list<MutualFund> $mutualFunds
78+
* @param list<Np> $nps
6879
*/
6980
public static function with(
7081
?array $dematAccounts = null,
7182
?Insurance $insurance = null,
7283
?Investor $investor = null,
7384
?Meta $meta = null,
7485
?array $mutualFunds = null,
86+
?array $nps = null,
7587
?Summary $summary = null,
7688
): self {
7789
$obj = new self;
@@ -81,6 +93,7 @@ public static function with(
8193
null !== $investor && $obj->investor = $investor;
8294
null !== $meta && $obj->meta = $meta;
8395
null !== $mutualFunds && $obj->mutualFunds = $mutualFunds;
96+
null !== $nps && $obj->nps = $nps;
8497
null !== $summary && $obj->summary = $summary;
8598

8699
return $obj;
@@ -132,6 +145,19 @@ public function withMutualFunds(array $mutualFunds): self
132145
return $obj;
133146
}
134147

148+
/**
149+
* List of NPS accounts.
150+
*
151+
* @param list<Np> $nps
152+
*/
153+
public function withNps(array $nps): self
154+
{
155+
$obj = clone $this;
156+
$obj->nps = $nps;
157+
158+
return $obj;
159+
}
160+
135161
public function withSummary(Summary $summary): self
136162
{
137163
$obj = clone $this;

src/CasParser/UnifiedResponse/DematAccount.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use CasParser\CasParser\UnifiedResponse\DematAccount\AdditionalInfo;
88
use CasParser\CasParser\UnifiedResponse\DematAccount\DematType;
99
use CasParser\CasParser\UnifiedResponse\DematAccount\Holdings;
10+
use CasParser\CasParser\UnifiedResponse\DematAccount\LinkedHolder;
1011
use CasParser\Core\Attributes\Api;
1112
use CasParser\Core\Concerns\SdkModel;
1213
use CasParser\Core\Contracts\BaseModel;
@@ -20,6 +21,7 @@
2021
* dpID?: string,
2122
* dpName?: string,
2223
* holdings?: Holdings,
24+
* linkedHolders?: list<LinkedHolder>,
2325
* value?: float,
2426
* }
2527
*/
@@ -69,6 +71,14 @@ final class DematAccount implements BaseModel
6971
#[Api(optional: true)]
7072
public ?Holdings $holdings;
7173

74+
/**
75+
* List of account holders linked to this demat account.
76+
*
77+
* @var list<LinkedHolder>|null $linkedHolders
78+
*/
79+
#[Api('linked_holders', list: LinkedHolder::class, optional: true)]
80+
public ?array $linkedHolders;
81+
7282
/**
7383
* Total value of the demat account.
7484
*/
@@ -86,6 +96,7 @@ public function __construct()
8696
* You must use named parameters to construct any parameters with a default value.
8797
*
8898
* @param DematType|value-of<DematType> $dematType
99+
* @param list<LinkedHolder> $linkedHolders
89100
*/
90101
public static function with(
91102
?AdditionalInfo $additionalInfo = null,
@@ -95,6 +106,7 @@ public static function with(
95106
?string $dpID = null,
96107
?string $dpName = null,
97108
?Holdings $holdings = null,
109+
?array $linkedHolders = null,
98110
?float $value = null,
99111
): self {
100112
$obj = new self;
@@ -106,6 +118,7 @@ public static function with(
106118
null !== $dpID && $obj->dpID = $dpID;
107119
null !== $dpName && $obj->dpName = $dpName;
108120
null !== $holdings && $obj->holdings = $holdings;
121+
null !== $linkedHolders && $obj->linkedHolders = $linkedHolders;
109122
null !== $value && $obj->value = $value;
110123

111124
return $obj;
@@ -187,6 +200,19 @@ public function withHoldings(Holdings $holdings): self
187200
return $obj;
188201
}
189202

203+
/**
204+
* List of account holders linked to this demat account.
205+
*
206+
* @param list<LinkedHolder> $linkedHolders
207+
*/
208+
public function withLinkedHolders(array $linkedHolders): self
209+
{
210+
$obj = clone $this;
211+
$obj->linkedHolders = $linkedHolders;
212+
213+
return $obj;
214+
}
215+
190216
/**
191217
* Total value of the demat account.
192218
*/
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace CasParser\CasParser\UnifiedResponse\DematAccount;
6+
7+
use CasParser\Core\Attributes\Api;
8+
use CasParser\Core\Concerns\SdkModel;
9+
use CasParser\Core\Contracts\BaseModel;
10+
11+
/**
12+
* @phpstan-type linked_holder = array{name?: string, pan?: string}
13+
*/
14+
final class LinkedHolder implements BaseModel
15+
{
16+
/** @use SdkModel<linked_holder> */
17+
use SdkModel;
18+
19+
/**
20+
* Name of the account holder.
21+
*/
22+
#[Api(optional: true)]
23+
public ?string $name;
24+
25+
/**
26+
* PAN of the account holder.
27+
*/
28+
#[Api(optional: true)]
29+
public ?string $pan;
30+
31+
public function __construct()
32+
{
33+
$this->initialize();
34+
}
35+
36+
/**
37+
* Construct an instance from the required parameters.
38+
*
39+
* You must use named parameters to construct any parameters with a default value.
40+
*/
41+
public static function with(?string $name = null, ?string $pan = null): self
42+
{
43+
$obj = new self;
44+
45+
null !== $name && $obj->name = $name;
46+
null !== $pan && $obj->pan = $pan;
47+
48+
return $obj;
49+
}
50+
51+
/**
52+
* Name of the account holder.
53+
*/
54+
public function withName(string $name): self
55+
{
56+
$obj = clone $this;
57+
$obj->name = $name;
58+
59+
return $obj;
60+
}
61+
62+
/**
63+
* PAN of the account holder.
64+
*/
65+
public function withPan(string $pan): self
66+
{
67+
$obj = clone $this;
68+
$obj->pan = $pan;
69+
70+
return $obj;
71+
}
72+
}

src/CasParser/UnifiedResponse/MutualFund.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace CasParser\CasParser\UnifiedResponse;
66

77
use CasParser\CasParser\UnifiedResponse\MutualFund\AdditionalInfo;
8+
use CasParser\CasParser\UnifiedResponse\MutualFund\LinkedHolder;
89
use CasParser\CasParser\UnifiedResponse\MutualFund\Scheme;
910
use CasParser\Core\Attributes\Api;
1011
use CasParser\Core\Concerns\SdkModel;
@@ -15,6 +16,7 @@
1516
* additionalInfo?: AdditionalInfo,
1617
* amc?: string,
1718
* folioNumber?: string,
19+
* linkedHolders?: list<LinkedHolder>,
1820
* registrar?: string,
1921
* schemes?: list<Scheme>,
2022
* value?: float,
@@ -43,6 +45,14 @@ final class MutualFund implements BaseModel
4345
#[Api('folio_number', optional: true)]
4446
public ?string $folioNumber;
4547

48+
/**
49+
* List of account holders linked to this mutual fund folio.
50+
*
51+
* @var list<LinkedHolder>|null $linkedHolders
52+
*/
53+
#[Api('linked_holders', list: LinkedHolder::class, optional: true)]
54+
public ?array $linkedHolders;
55+
4656
/**
4757
* Registrar and Transfer Agent name.
4858
*/
@@ -69,12 +79,14 @@ public function __construct()
6979
*
7080
* You must use named parameters to construct any parameters with a default value.
7181
*
82+
* @param list<LinkedHolder> $linkedHolders
7283
* @param list<Scheme> $schemes
7384
*/
7485
public static function with(
7586
?AdditionalInfo $additionalInfo = null,
7687
?string $amc = null,
7788
?string $folioNumber = null,
89+
?array $linkedHolders = null,
7890
?string $registrar = null,
7991
?array $schemes = null,
8092
?float $value = null,
@@ -84,6 +96,7 @@ public static function with(
8496
null !== $additionalInfo && $obj->additionalInfo = $additionalInfo;
8597
null !== $amc && $obj->amc = $amc;
8698
null !== $folioNumber && $obj->folioNumber = $folioNumber;
99+
null !== $linkedHolders && $obj->linkedHolders = $linkedHolders;
87100
null !== $registrar && $obj->registrar = $registrar;
88101
null !== $schemes && $obj->schemes = $schemes;
89102
null !== $value && $obj->value = $value;
@@ -124,6 +137,19 @@ public function withFolioNumber(string $folioNumber): self
124137
return $obj;
125138
}
126139

140+
/**
141+
* List of account holders linked to this mutual fund folio.
142+
*
143+
* @param list<LinkedHolder> $linkedHolders
144+
*/
145+
public function withLinkedHolders(array $linkedHolders): self
146+
{
147+
$obj = clone $this;
148+
$obj->linkedHolders = $linkedHolders;
149+
150+
return $obj;
151+
}
152+
127153
/**
128154
* Registrar and Transfer Agent name.
129155
*/
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace CasParser\CasParser\UnifiedResponse\MutualFund;
6+
7+
use CasParser\Core\Attributes\Api;
8+
use CasParser\Core\Concerns\SdkModel;
9+
use CasParser\Core\Contracts\BaseModel;
10+
11+
/**
12+
* @phpstan-type linked_holder = array{name?: string, pan?: string}
13+
*/
14+
final class LinkedHolder implements BaseModel
15+
{
16+
/** @use SdkModel<linked_holder> */
17+
use SdkModel;
18+
19+
/**
20+
* Name of the account holder.
21+
*/
22+
#[Api(optional: true)]
23+
public ?string $name;
24+
25+
/**
26+
* PAN of the account holder.
27+
*/
28+
#[Api(optional: true)]
29+
public ?string $pan;
30+
31+
public function __construct()
32+
{
33+
$this->initialize();
34+
}
35+
36+
/**
37+
* Construct an instance from the required parameters.
38+
*
39+
* You must use named parameters to construct any parameters with a default value.
40+
*/
41+
public static function with(?string $name = null, ?string $pan = null): self
42+
{
43+
$obj = new self;
44+
45+
null !== $name && $obj->name = $name;
46+
null !== $pan && $obj->pan = $pan;
47+
48+
return $obj;
49+
}
50+
51+
/**
52+
* Name of the account holder.
53+
*/
54+
public function withName(string $name): self
55+
{
56+
$obj = clone $this;
57+
$obj->name = $name;
58+
59+
return $obj;
60+
}
61+
62+
/**
63+
* PAN of the account holder.
64+
*/
65+
public function withPan(string $pan): self
66+
{
67+
$obj = clone $this;
68+
$obj->pan = $pan;
69+
70+
return $obj;
71+
}
72+
}

0 commit comments

Comments
 (0)