Skip to content

Commit 4cafc4e

Browse files
feat(api): api update
1 parent a665c6a commit 4cafc4e

File tree

2 files changed

+180
-3
lines changed

2 files changed

+180
-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

casparser.go

Lines changed: 178 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,17 @@ type UnifiedResponse struct {
8181
Investor UnifiedResponseInvestor `json:"investor"`
8282
Meta UnifiedResponseMeta `json:"meta"`
8383
MutualFunds []UnifiedResponseMutualFund `json:"mutual_funds"`
84-
Summary UnifiedResponseSummary `json:"summary"`
84+
// List of NPS accounts
85+
Nps []UnifiedResponseNp `json:"nps"`
86+
Summary UnifiedResponseSummary `json:"summary"`
8587
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
8688
JSON struct {
8789
DematAccounts respjson.Field
8890
Insurance respjson.Field
8991
Investor respjson.Field
9092
Meta respjson.Field
9193
MutualFunds respjson.Field
94+
Nps respjson.Field
9295
Summary respjson.Field
9396
ExtraFields map[string]respjson.Field
9497
raw string
@@ -117,6 +120,8 @@ type UnifiedResponseDematAccount struct {
117120
// Depository Participant name
118121
DpName string `json:"dp_name"`
119122
Holdings UnifiedResponseDematAccountHoldings `json:"holdings"`
123+
// List of account holders linked to this demat account
124+
LinkedHolders []UnifiedResponseDematAccountLinkedHolder `json:"linked_holders"`
120125
// Total value of the demat account
121126
Value float64 `json:"value"`
122127
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
@@ -128,6 +133,7 @@ type UnifiedResponseDematAccount struct {
128133
DpID respjson.Field
129134
DpName respjson.Field
130135
Holdings respjson.Field
136+
LinkedHolders respjson.Field
131137
Value respjson.Field
132138
ExtraFields map[string]respjson.Field
133139
raw string
@@ -348,6 +354,26 @@ func (r *UnifiedResponseDematAccountHoldingsGovernmentSecurity) UnmarshalJSON(da
348354
return apijson.UnmarshalRoot(data, r)
349355
}
350356

357+
type UnifiedResponseDematAccountLinkedHolder struct {
358+
// Name of the account holder
359+
Name string `json:"name"`
360+
// PAN of the account holder
361+
Pan string `json:"pan"`
362+
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
363+
JSON struct {
364+
Name respjson.Field
365+
Pan respjson.Field
366+
ExtraFields map[string]respjson.Field
367+
raw string
368+
} `json:"-"`
369+
}
370+
371+
// Returns the unmodified JSON received from the API
372+
func (r UnifiedResponseDematAccountLinkedHolder) RawJSON() string { return r.JSON.raw }
373+
func (r *UnifiedResponseDematAccountLinkedHolder) UnmarshalJSON(data []byte) error {
374+
return apijson.UnmarshalRoot(data, r)
375+
}
376+
351377
type UnifiedResponseInsurance struct {
352378
LifeInsurancePolicies []UnifiedResponseInsuranceLifeInsurancePolicy `json:"life_insurance_policies"`
353379
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
@@ -491,6 +517,8 @@ type UnifiedResponseMutualFund struct {
491517
Amc string `json:"amc"`
492518
// Folio number
493519
FolioNumber string `json:"folio_number"`
520+
// List of account holders linked to this mutual fund folio
521+
LinkedHolders []UnifiedResponseMutualFundLinkedHolder `json:"linked_holders"`
494522
// Registrar and Transfer Agent name
495523
Registrar string `json:"registrar"`
496524
Schemes []UnifiedResponseMutualFundScheme `json:"schemes"`
@@ -501,6 +529,7 @@ type UnifiedResponseMutualFund struct {
501529
AdditionalInfo respjson.Field
502530
Amc respjson.Field
503531
FolioNumber respjson.Field
532+
LinkedHolders respjson.Field
504533
Registrar respjson.Field
505534
Schemes respjson.Field
506535
Value respjson.Field
@@ -539,6 +568,26 @@ func (r *UnifiedResponseMutualFundAdditionalInfo) UnmarshalJSON(data []byte) err
539568
return apijson.UnmarshalRoot(data, r)
540569
}
541570

571+
type UnifiedResponseMutualFundLinkedHolder struct {
572+
// Name of the account holder
573+
Name string `json:"name"`
574+
// PAN of the account holder
575+
Pan string `json:"pan"`
576+
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
577+
JSON struct {
578+
Name respjson.Field
579+
Pan respjson.Field
580+
ExtraFields map[string]respjson.Field
581+
raw string
582+
} `json:"-"`
583+
}
584+
585+
// Returns the unmodified JSON received from the API
586+
func (r UnifiedResponseMutualFundLinkedHolder) RawJSON() string { return r.JSON.raw }
587+
func (r *UnifiedResponseMutualFundLinkedHolder) UnmarshalJSON(data []byte) error {
588+
return apijson.UnmarshalRoot(data, r)
589+
}
590+
542591
type UnifiedResponseMutualFundScheme struct {
543592
// Additional information specific to the scheme
544593
AdditionalInfo UnifiedResponseMutualFundSchemeAdditionalInfo `json:"additional_info"`
@@ -677,6 +726,112 @@ func (r *UnifiedResponseMutualFundSchemeTransaction) UnmarshalJSON(data []byte)
677726
return apijson.UnmarshalRoot(data, r)
678727
}
679728

729+
type UnifiedResponseNp struct {
730+
// Additional information specific to the NPS account
731+
AdditionalInfo any `json:"additional_info"`
732+
// Central Record Keeping Agency name
733+
Cra string `json:"cra"`
734+
Funds []UnifiedResponseNpFund `json:"funds"`
735+
// List of account holders linked to this NPS account
736+
LinkedHolders []UnifiedResponseNpLinkedHolder `json:"linked_holders"`
737+
// Permanent Retirement Account Number (PRAN)
738+
Pran string `json:"pran"`
739+
// Total value of the NPS account
740+
Value float64 `json:"value"`
741+
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
742+
JSON struct {
743+
AdditionalInfo respjson.Field
744+
Cra respjson.Field
745+
Funds respjson.Field
746+
LinkedHolders respjson.Field
747+
Pran respjson.Field
748+
Value respjson.Field
749+
ExtraFields map[string]respjson.Field
750+
raw string
751+
} `json:"-"`
752+
}
753+
754+
// Returns the unmodified JSON received from the API
755+
func (r UnifiedResponseNp) RawJSON() string { return r.JSON.raw }
756+
func (r *UnifiedResponseNp) UnmarshalJSON(data []byte) error {
757+
return apijson.UnmarshalRoot(data, r)
758+
}
759+
760+
type UnifiedResponseNpFund struct {
761+
// Additional information specific to the NPS fund
762+
AdditionalInfo UnifiedResponseNpFundAdditionalInfo `json:"additional_info"`
763+
// Cost of investment
764+
Cost float64 `json:"cost"`
765+
// Name of the NPS fund
766+
Name string `json:"name"`
767+
// Net Asset Value per unit
768+
Nav float64 `json:"nav"`
769+
// Number of units held
770+
Units float64 `json:"units"`
771+
// Current market value of the holding
772+
Value float64 `json:"value"`
773+
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
774+
JSON struct {
775+
AdditionalInfo respjson.Field
776+
Cost respjson.Field
777+
Name respjson.Field
778+
Nav respjson.Field
779+
Units respjson.Field
780+
Value respjson.Field
781+
ExtraFields map[string]respjson.Field
782+
raw string
783+
} `json:"-"`
784+
}
785+
786+
// Returns the unmodified JSON received from the API
787+
func (r UnifiedResponseNpFund) RawJSON() string { return r.JSON.raw }
788+
func (r *UnifiedResponseNpFund) UnmarshalJSON(data []byte) error {
789+
return apijson.UnmarshalRoot(data, r)
790+
}
791+
792+
// Additional information specific to the NPS fund
793+
type UnifiedResponseNpFundAdditionalInfo struct {
794+
// Fund manager name
795+
Manager string `json:"manager"`
796+
// NPS tier (Tier I or Tier II)
797+
//
798+
// Any of 1, 2.
799+
Tier float64 `json:"tier,nullable"`
800+
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
801+
JSON struct {
802+
Manager respjson.Field
803+
Tier respjson.Field
804+
ExtraFields map[string]respjson.Field
805+
raw string
806+
} `json:"-"`
807+
}
808+
809+
// Returns the unmodified JSON received from the API
810+
func (r UnifiedResponseNpFundAdditionalInfo) RawJSON() string { return r.JSON.raw }
811+
func (r *UnifiedResponseNpFundAdditionalInfo) UnmarshalJSON(data []byte) error {
812+
return apijson.UnmarshalRoot(data, r)
813+
}
814+
815+
type UnifiedResponseNpLinkedHolder struct {
816+
// Name of the account holder
817+
Name string `json:"name"`
818+
// PAN of the account holder
819+
Pan string `json:"pan"`
820+
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
821+
JSON struct {
822+
Name respjson.Field
823+
Pan respjson.Field
824+
ExtraFields map[string]respjson.Field
825+
raw string
826+
} `json:"-"`
827+
}
828+
829+
// Returns the unmodified JSON received from the API
830+
func (r UnifiedResponseNpLinkedHolder) RawJSON() string { return r.JSON.raw }
831+
func (r *UnifiedResponseNpLinkedHolder) UnmarshalJSON(data []byte) error {
832+
return apijson.UnmarshalRoot(data, r)
833+
}
834+
680835
type UnifiedResponseSummary struct {
681836
Accounts UnifiedResponseSummaryAccounts `json:"accounts"`
682837
// Total portfolio value across all accounts
@@ -700,11 +855,13 @@ type UnifiedResponseSummaryAccounts struct {
700855
Demat UnifiedResponseSummaryAccountsDemat `json:"demat"`
701856
Insurance UnifiedResponseSummaryAccountsInsurance `json:"insurance"`
702857
MutualFunds UnifiedResponseSummaryAccountsMutualFunds `json:"mutual_funds"`
858+
Nps UnifiedResponseSummaryAccountsNps `json:"nps"`
703859
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
704860
JSON struct {
705861
Demat respjson.Field
706862
Insurance respjson.Field
707863
MutualFunds respjson.Field
864+
Nps respjson.Field
708865
ExtraFields map[string]respjson.Field
709866
raw string
710867
} `json:"-"`
@@ -776,6 +933,26 @@ func (r *UnifiedResponseSummaryAccountsMutualFunds) UnmarshalJSON(data []byte) e
776933
return apijson.UnmarshalRoot(data, r)
777934
}
778935

936+
type UnifiedResponseSummaryAccountsNps struct {
937+
// Number of NPS accounts
938+
Count int64 `json:"count"`
939+
// Total value of NPS accounts
940+
TotalValue float64 `json:"total_value"`
941+
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
942+
JSON struct {
943+
Count respjson.Field
944+
TotalValue respjson.Field
945+
ExtraFields map[string]respjson.Field
946+
raw string
947+
} `json:"-"`
948+
}
949+
950+
// Returns the unmodified JSON received from the API
951+
func (r UnifiedResponseSummaryAccountsNps) RawJSON() string { return r.JSON.raw }
952+
func (r *UnifiedResponseSummaryAccountsNps) UnmarshalJSON(data []byte) error {
953+
return apijson.UnmarshalRoot(data, r)
954+
}
955+
779956
type CasParserCamsKfintechParams struct {
780957
// Password for the PDF file (if required)
781958
Password param.Opt[string] `json:"password,omitzero"`

0 commit comments

Comments
 (0)