Documentation
¶
Index ¶
- func Bool(b bool) param.Opt[bool]
- func BoolPtr(v bool) *bool
- func DefaultClientOptions() []option.RequestOption
- func File(rdr io.Reader, filename string, contentType string) file
- func Float(f float64) param.Opt[float64]
- func FloatPtr(v float64) *float64
- func Int(i int64) param.Opt[int64]
- func IntPtr(v int64) *int64
- func Opt[T comparable](v T) param.Opt[T]
- func Ptr[T any](v T) *T
- func String(s string) param.Opt[string]
- func StringPtr(v string) *string
- func Time(t time.Time) param.Opt[time.Time]
- func TimePtr(v time.Time) *time.Time
- type CasGeneratorGenerateCasParams
- type CasGeneratorGenerateCasParamsCasAuthority
- type CasGeneratorGenerateCasResponse
- type CasGeneratorService
- type CasParserCamsKfintechParams
- type CasParserCdslParams
- type CasParserNsdlParams
- type CasParserService
- func (r *CasParserService) CamsKfintech(ctx context.Context, body CasParserCamsKfintechParams, ...) (res *UnifiedResponse, err error)
- func (r *CasParserService) Cdsl(ctx context.Context, body CasParserCdslParams, opts ...option.RequestOption) (res *UnifiedResponse, err error)
- func (r *CasParserService) Nsdl(ctx context.Context, body CasParserNsdlParams, opts ...option.RequestOption) (res *UnifiedResponse, err error)
- func (r *CasParserService) SmartParse(ctx context.Context, body CasParserSmartParseParams, ...) (res *UnifiedResponse, err error)
- type CasParserSmartParseParams
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, ...) error
- func (r *Client) Get(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Post(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Put(ctx context.Context, path string, params any, res any, ...) error
- type Error
- type UnifiedResponse
- type UnifiedResponseDematAccount
- type UnifiedResponseDematAccountAdditionalInfo
- type UnifiedResponseDematAccountHoldings
- type UnifiedResponseDematAccountHoldingsAif
- type UnifiedResponseDematAccountHoldingsCorporateBond
- type UnifiedResponseDematAccountHoldingsDematMutualFund
- type UnifiedResponseDematAccountHoldingsEquity
- type UnifiedResponseDematAccountHoldingsGovernmentSecurity
- type UnifiedResponseInsurance
- type UnifiedResponseInsuranceLifeInsurancePolicy
- type UnifiedResponseInvestor
- type UnifiedResponseMeta
- type UnifiedResponseMetaStatementPeriod
- type UnifiedResponseMutualFund
- type UnifiedResponseMutualFundAdditionalInfo
- type UnifiedResponseMutualFundScheme
- type UnifiedResponseMutualFundSchemeAdditionalInfo
- type UnifiedResponseMutualFundSchemeGain
- type UnifiedResponseMutualFundSchemeTransaction
- type UnifiedResponseSummary
- type UnifiedResponseSummaryAccounts
- type UnifiedResponseSummaryAccountsDemat
- type UnifiedResponseSummaryAccountsInsurance
- type UnifiedResponseSummaryAccountsMutualFunds
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultClientOptions ¶
func DefaultClientOptions() []option.RequestOption
DefaultClientOptions read from the environment (CAS_PARSER_API_KEY, CAS_PARSER_BASE_URL). This should be used to initialize new clients.
func Opt ¶
func Opt[T comparable](v T) param.Opt[T]
Types ¶
type CasGeneratorGenerateCasParams ¶
type CasGeneratorGenerateCasParams struct { // Email address to receive the CAS document Email string `json:"email,required"` // Start date for the CAS period (format YYYY-MM-DD) FromDate string `json:"from_date,required"` // Password to protect the generated CAS PDF Password string `json:"password,required"` // End date for the CAS period (format YYYY-MM-DD) ToDate string `json:"to_date,required"` // PAN number (optional for some CAS authorities) PanNo param.Opt[string] `json:"pan_no,omitzero"` // CAS authority to generate the document from (currently only kfintech is // supported) // // Any of "kfintech", "cams", "cdsl", "nsdl". CasAuthority CasGeneratorGenerateCasParamsCasAuthority `json:"cas_authority,omitzero"` // contains filtered or unexported fields }
func (CasGeneratorGenerateCasParams) MarshalJSON ¶
func (r CasGeneratorGenerateCasParams) MarshalJSON() (data []byte, err error)
func (*CasGeneratorGenerateCasParams) UnmarshalJSON ¶
func (r *CasGeneratorGenerateCasParams) UnmarshalJSON(data []byte) error
type CasGeneratorGenerateCasParamsCasAuthority ¶
type CasGeneratorGenerateCasParamsCasAuthority string
CAS authority to generate the document from (currently only kfintech is supported)
const ( CasGeneratorGenerateCasParamsCasAuthorityKfintech CasGeneratorGenerateCasParamsCasAuthority = "kfintech" CasGeneratorGenerateCasParamsCasAuthorityCams CasGeneratorGenerateCasParamsCasAuthority = "cams" CasGeneratorGenerateCasParamsCasAuthorityCdsl CasGeneratorGenerateCasParamsCasAuthority = "cdsl" CasGeneratorGenerateCasParamsCasAuthorityNsdl CasGeneratorGenerateCasParamsCasAuthority = "nsdl" )
type CasGeneratorGenerateCasResponse ¶
type CasGeneratorGenerateCasResponse struct { Msg string `json:"msg"` Status string `json:"status"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Msg respjson.Field Status respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (CasGeneratorGenerateCasResponse) RawJSON ¶
func (r CasGeneratorGenerateCasResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CasGeneratorGenerateCasResponse) UnmarshalJSON ¶
func (r *CasGeneratorGenerateCasResponse) UnmarshalJSON(data []byte) error
type CasGeneratorService ¶
type CasGeneratorService struct {
Options []option.RequestOption
}
CasGeneratorService contains methods and other services that help with interacting with the CAS Parser API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCasGeneratorService method instead.
func NewCasGeneratorService ¶
func NewCasGeneratorService(opts ...option.RequestOption) (r CasGeneratorService)
NewCasGeneratorService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CasGeneratorService) GenerateCas ¶
func (r *CasGeneratorService) GenerateCas(ctx context.Context, body CasGeneratorGenerateCasParams, opts ...option.RequestOption) (res *CasGeneratorGenerateCasResponse, err error)
This endpoint generates CAS (Consolidated Account Statement) documents by submitting a mailback request to the specified CAS authority. Currently only supports KFintech, with plans to support CAMS, CDSL, and NSDL in the future.
type CasParserCamsKfintechParams ¶
type CasParserCamsKfintechParams struct { // Password for the PDF file (if required) Password param.Opt[string] `json:"password,omitzero"` // Base64 encoded CAS PDF file PdfFile param.Opt[string] `json:"pdf_file,omitzero" format:"base64"` // URL to the CAS PDF file PdfURL param.Opt[string] `json:"pdf_url,omitzero" format:"uri"` // contains filtered or unexported fields }
func (CasParserCamsKfintechParams) MarshalJSON ¶
func (r CasParserCamsKfintechParams) MarshalJSON() (data []byte, err error)
func (*CasParserCamsKfintechParams) UnmarshalJSON ¶
func (r *CasParserCamsKfintechParams) UnmarshalJSON(data []byte) error
type CasParserCdslParams ¶
type CasParserCdslParams struct { // Password for the PDF file (if required) Password param.Opt[string] `json:"password,omitzero"` // Base64 encoded CAS PDF file PdfFile param.Opt[string] `json:"pdf_file,omitzero" format:"base64"` // URL to the CAS PDF file PdfURL param.Opt[string] `json:"pdf_url,omitzero" format:"uri"` // contains filtered or unexported fields }
func (CasParserCdslParams) MarshalJSON ¶
func (r CasParserCdslParams) MarshalJSON() (data []byte, err error)
func (*CasParserCdslParams) UnmarshalJSON ¶
func (r *CasParserCdslParams) UnmarshalJSON(data []byte) error
type CasParserNsdlParams ¶
type CasParserNsdlParams struct { // Password for the PDF file (if required) Password param.Opt[string] `json:"password,omitzero"` // Base64 encoded CAS PDF file PdfFile param.Opt[string] `json:"pdf_file,omitzero" format:"base64"` // URL to the CAS PDF file PdfURL param.Opt[string] `json:"pdf_url,omitzero" format:"uri"` // contains filtered or unexported fields }
func (CasParserNsdlParams) MarshalJSON ¶
func (r CasParserNsdlParams) MarshalJSON() (data []byte, err error)
func (*CasParserNsdlParams) UnmarshalJSON ¶
func (r *CasParserNsdlParams) UnmarshalJSON(data []byte) error
type CasParserService ¶
type CasParserService struct {
Options []option.RequestOption
}
CasParserService contains methods and other services that help with interacting with the CAS Parser API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCasParserService method instead.
func NewCasParserService ¶
func NewCasParserService(opts ...option.RequestOption) (r CasParserService)
NewCasParserService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CasParserService) CamsKfintech ¶
func (r *CasParserService) CamsKfintech(ctx context.Context, body CasParserCamsKfintechParams, opts ...option.RequestOption) (res *UnifiedResponse, err error)
This endpoint specifically parses CAMS/KFintech CAS (Consolidated Account Statement) PDF files and returns data in a unified format. Use this endpoint when you know the PDF is from CAMS or KFintech.
func (*CasParserService) Cdsl ¶
func (r *CasParserService) Cdsl(ctx context.Context, body CasParserCdslParams, opts ...option.RequestOption) (res *UnifiedResponse, err error)
This endpoint specifically parses CDSL CAS (Consolidated Account Statement) PDF files and returns data in a unified format. Use this endpoint when you know the PDF is from CDSL.
func (*CasParserService) Nsdl ¶
func (r *CasParserService) Nsdl(ctx context.Context, body CasParserNsdlParams, opts ...option.RequestOption) (res *UnifiedResponse, err error)
This endpoint specifically parses NSDL CAS (Consolidated Account Statement) PDF files and returns data in a unified format. Use this endpoint when you know the PDF is from NSDL.
func (*CasParserService) SmartParse ¶
func (r *CasParserService) SmartParse(ctx context.Context, body CasParserSmartParseParams, opts ...option.RequestOption) (res *UnifiedResponse, err error)
This endpoint parses CAS (Consolidated Account Statement) PDF files from NSDL, CDSL, or CAMS/KFintech and returns data in a unified format. It auto-detects the CAS type and transforms the data into a consistent structure regardless of the source.
type CasParserSmartParseParams ¶
type CasParserSmartParseParams struct { // Password for the PDF file (if required) Password param.Opt[string] `json:"password,omitzero"` // Base64 encoded CAS PDF file PdfFile param.Opt[string] `json:"pdf_file,omitzero" format:"base64"` // URL to the CAS PDF file PdfURL param.Opt[string] `json:"pdf_url,omitzero" format:"uri"` // contains filtered or unexported fields }
func (CasParserSmartParseParams) MarshalJSON ¶
func (r CasParserSmartParseParams) MarshalJSON() (data []byte, err error)
func (*CasParserSmartParseParams) UnmarshalJSON ¶
func (r *CasParserSmartParseParams) UnmarshalJSON(data []byte) error
type Client ¶
type Client struct { Options []option.RequestOption CasParser CasParserService CasGenerator CasGeneratorService }
Client creates a struct with services and top level methods that help with interacting with the CAS Parser API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r Client)
NewClient generates a new client with the default option read from the environment (CAS_PARSER_API_KEY, CAS_PARSER_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned [url.Values] will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type UnifiedResponse ¶
type UnifiedResponse struct { DematAccounts []UnifiedResponseDematAccount `json:"demat_accounts"` Insurance UnifiedResponseInsurance `json:"insurance"` Investor UnifiedResponseInvestor `json:"investor"` Meta UnifiedResponseMeta `json:"meta"` MutualFunds []UnifiedResponseMutualFund `json:"mutual_funds"` Summary UnifiedResponseSummary `json:"summary"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { DematAccounts respjson.Field Insurance respjson.Field Investor respjson.Field Meta respjson.Field MutualFunds respjson.Field Summary respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (UnifiedResponse) RawJSON ¶
func (r UnifiedResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponse) UnmarshalJSON ¶
func (r *UnifiedResponse) UnmarshalJSON(data []byte) error
type UnifiedResponseDematAccount ¶
type UnifiedResponseDematAccount struct { // Additional information specific to the demat account type AdditionalInfo UnifiedResponseDematAccountAdditionalInfo `json:"additional_info"` // Beneficiary Owner ID (primarily for CDSL) BoID string `json:"bo_id"` // Client ID ClientID string `json:"client_id"` // Type of demat account // // Any of "NSDL", "CDSL". DematType string `json:"demat_type"` // Depository Participant ID DpID string `json:"dp_id"` // Depository Participant name DpName string `json:"dp_name"` Holdings UnifiedResponseDematAccountHoldings `json:"holdings"` // Total value of the demat account Value float64 `json:"value"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { AdditionalInfo respjson.Field BoID respjson.Field ClientID respjson.Field DematType respjson.Field DpID respjson.Field DpName respjson.Field Holdings respjson.Field Value respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (UnifiedResponseDematAccount) RawJSON ¶
func (r UnifiedResponseDematAccount) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseDematAccount) UnmarshalJSON ¶
func (r *UnifiedResponseDematAccount) UnmarshalJSON(data []byte) error
type UnifiedResponseDematAccountAdditionalInfo ¶
type UnifiedResponseDematAccountAdditionalInfo struct { // Beneficiary Owner status (CDSL) BoStatus string `json:"bo_status"` // Beneficiary Owner sub-status (CDSL) BoSubStatus string `json:"bo_sub_status"` // Beneficiary Owner type (CDSL) BoType string `json:"bo_type"` // Basic Services Demat Account status (CDSL) Bsda string `json:"bsda"` // Email associated with the demat account (CDSL) Email string `json:"email" format:"email"` // List of linked PAN numbers (NSDL) LinkedPans []string `json:"linked_pans"` // Nominee details (CDSL) Nominee string `json:"nominee"` // Account status (CDSL) Status string `json:"status"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { BoStatus respjson.Field BoSubStatus respjson.Field BoType respjson.Field Bsda respjson.Field Email respjson.Field LinkedPans respjson.Field Nominee respjson.Field Status respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Additional information specific to the demat account type
func (UnifiedResponseDematAccountAdditionalInfo) RawJSON ¶
func (r UnifiedResponseDematAccountAdditionalInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseDematAccountAdditionalInfo) UnmarshalJSON ¶
func (r *UnifiedResponseDematAccountAdditionalInfo) UnmarshalJSON(data []byte) error
type UnifiedResponseDematAccountHoldings ¶
type UnifiedResponseDematAccountHoldings struct { Aifs []UnifiedResponseDematAccountHoldingsAif `json:"aifs"` CorporateBonds []UnifiedResponseDematAccountHoldingsCorporateBond `json:"corporate_bonds"` DematMutualFunds []UnifiedResponseDematAccountHoldingsDematMutualFund `json:"demat_mutual_funds"` Equities []UnifiedResponseDematAccountHoldingsEquity `json:"equities"` GovernmentSecurities []UnifiedResponseDematAccountHoldingsGovernmentSecurity `json:"government_securities"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Aifs respjson.Field CorporateBonds respjson.Field DematMutualFunds respjson.Field Equities respjson.Field GovernmentSecurities respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (UnifiedResponseDematAccountHoldings) RawJSON ¶
func (r UnifiedResponseDematAccountHoldings) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseDematAccountHoldings) UnmarshalJSON ¶
func (r *UnifiedResponseDematAccountHoldings) UnmarshalJSON(data []byte) error
type UnifiedResponseDematAccountHoldingsAif ¶
type UnifiedResponseDematAccountHoldingsAif struct { // Additional information specific to the AIF AdditionalInfo any `json:"additional_info"` // ISIN code of the AIF Isin string `json:"isin"` // Name of the AIF Name string `json:"name"` // Number of units held Units float64 `json:"units"` // Current market value of the holding Value float64 `json:"value"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { AdditionalInfo respjson.Field Isin respjson.Field Name respjson.Field Units respjson.Field Value respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (UnifiedResponseDematAccountHoldingsAif) RawJSON ¶
func (r UnifiedResponseDematAccountHoldingsAif) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseDematAccountHoldingsAif) UnmarshalJSON ¶
func (r *UnifiedResponseDematAccountHoldingsAif) UnmarshalJSON(data []byte) error
type UnifiedResponseDematAccountHoldingsCorporateBond ¶
type UnifiedResponseDematAccountHoldingsCorporateBond struct { // Additional information specific to the corporate bond AdditionalInfo any `json:"additional_info"` // ISIN code of the corporate bond Isin string `json:"isin"` // Name of the corporate bond Name string `json:"name"` // Number of units held Units float64 `json:"units"` // Current market value of the holding Value float64 `json:"value"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { AdditionalInfo respjson.Field Isin respjson.Field Name respjson.Field Units respjson.Field Value respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (UnifiedResponseDematAccountHoldingsCorporateBond) RawJSON ¶
func (r UnifiedResponseDematAccountHoldingsCorporateBond) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseDematAccountHoldingsCorporateBond) UnmarshalJSON ¶
func (r *UnifiedResponseDematAccountHoldingsCorporateBond) UnmarshalJSON(data []byte) error
type UnifiedResponseDematAccountHoldingsDematMutualFund ¶
type UnifiedResponseDematAccountHoldingsDematMutualFund struct { // Additional information specific to the mutual fund AdditionalInfo any `json:"additional_info"` // ISIN code of the mutual fund Isin string `json:"isin"` // Name of the mutual fund Name string `json:"name"` // Number of units held Units float64 `json:"units"` // Current market value of the holding Value float64 `json:"value"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { AdditionalInfo respjson.Field Isin respjson.Field Name respjson.Field Units respjson.Field Value respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (UnifiedResponseDematAccountHoldingsDematMutualFund) RawJSON ¶
func (r UnifiedResponseDematAccountHoldingsDematMutualFund) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseDematAccountHoldingsDematMutualFund) UnmarshalJSON ¶
func (r *UnifiedResponseDematAccountHoldingsDematMutualFund) UnmarshalJSON(data []byte) error
type UnifiedResponseDematAccountHoldingsEquity ¶
type UnifiedResponseDematAccountHoldingsEquity struct { // Additional information specific to the equity AdditionalInfo any `json:"additional_info"` // ISIN code of the equity Isin string `json:"isin"` // Name of the equity Name string `json:"name"` // Number of units held Units float64 `json:"units"` // Current market value of the holding Value float64 `json:"value"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { AdditionalInfo respjson.Field Isin respjson.Field Name respjson.Field Units respjson.Field Value respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (UnifiedResponseDematAccountHoldingsEquity) RawJSON ¶
func (r UnifiedResponseDematAccountHoldingsEquity) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseDematAccountHoldingsEquity) UnmarshalJSON ¶
func (r *UnifiedResponseDematAccountHoldingsEquity) UnmarshalJSON(data []byte) error
type UnifiedResponseDematAccountHoldingsGovernmentSecurity ¶
type UnifiedResponseDematAccountHoldingsGovernmentSecurity struct { // Additional information specific to the government security AdditionalInfo any `json:"additional_info"` // ISIN code of the government security Isin string `json:"isin"` // Name of the government security Name string `json:"name"` // Number of units held Units float64 `json:"units"` // Current market value of the holding Value float64 `json:"value"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { AdditionalInfo respjson.Field Isin respjson.Field Name respjson.Field Units respjson.Field Value respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (UnifiedResponseDematAccountHoldingsGovernmentSecurity) RawJSON ¶
func (r UnifiedResponseDematAccountHoldingsGovernmentSecurity) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseDematAccountHoldingsGovernmentSecurity) UnmarshalJSON ¶
func (r *UnifiedResponseDematAccountHoldingsGovernmentSecurity) UnmarshalJSON(data []byte) error
type UnifiedResponseInsurance ¶
type UnifiedResponseInsurance struct { LifeInsurancePolicies []UnifiedResponseInsuranceLifeInsurancePolicy `json:"life_insurance_policies"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { LifeInsurancePolicies respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (UnifiedResponseInsurance) RawJSON ¶
func (r UnifiedResponseInsurance) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseInsurance) UnmarshalJSON ¶
func (r *UnifiedResponseInsurance) UnmarshalJSON(data []byte) error
type UnifiedResponseInsuranceLifeInsurancePolicy ¶
type UnifiedResponseInsuranceLifeInsurancePolicy struct { // Additional information specific to the policy AdditionalInfo any `json:"additional_info"` // Name of the life assured LifeAssured string `json:"life_assured"` // Name of the insurance policy PolicyName string `json:"policy_name"` // Insurance policy number PolicyNumber string `json:"policy_number"` // Premium amount PremiumAmount float64 `json:"premium_amount"` // Frequency of premium payment (e.g., Annual, Monthly) PremiumFrequency string `json:"premium_frequency"` // Insurance company name Provider string `json:"provider"` // Status of the policy (e.g., Active, Lapsed) Status string `json:"status"` // Sum assured amount SumAssured float64 `json:"sum_assured"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { AdditionalInfo respjson.Field LifeAssured respjson.Field PolicyName respjson.Field PolicyNumber respjson.Field PremiumAmount respjson.Field PremiumFrequency respjson.Field Provider respjson.Field Status respjson.Field SumAssured respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (UnifiedResponseInsuranceLifeInsurancePolicy) RawJSON ¶
func (r UnifiedResponseInsuranceLifeInsurancePolicy) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseInsuranceLifeInsurancePolicy) UnmarshalJSON ¶
func (r *UnifiedResponseInsuranceLifeInsurancePolicy) UnmarshalJSON(data []byte) error
type UnifiedResponseInvestor ¶
type UnifiedResponseInvestor struct { // Address of the investor Address string `json:"address"` // CAS ID of the investor (only for NSDL and CDSL) CasID string `json:"cas_id"` // Email address of the investor Email string `json:"email" format:"email"` // Mobile number of the investor Mobile string `json:"mobile"` // Name of the investor Name string `json:"name"` // PAN (Permanent Account Number) of the investor Pan string `json:"pan"` // Postal code of the investor's address Pincode string `json:"pincode"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Address respjson.Field CasID respjson.Field Email respjson.Field Mobile respjson.Field Name respjson.Field Pan respjson.Field Pincode respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (UnifiedResponseInvestor) RawJSON ¶
func (r UnifiedResponseInvestor) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseInvestor) UnmarshalJSON ¶
func (r *UnifiedResponseInvestor) UnmarshalJSON(data []byte) error
type UnifiedResponseMeta ¶
type UnifiedResponseMeta struct { // Type of CAS detected and processed // // Any of "NSDL", "CDSL", "CAMS_KFINTECH". CasType string `json:"cas_type"` // Timestamp when the response was generated GeneratedAt time.Time `json:"generated_at" format:"date-time"` StatementPeriod UnifiedResponseMetaStatementPeriod `json:"statement_period"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { CasType respjson.Field GeneratedAt respjson.Field StatementPeriod respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (UnifiedResponseMeta) RawJSON ¶
func (r UnifiedResponseMeta) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseMeta) UnmarshalJSON ¶
func (r *UnifiedResponseMeta) UnmarshalJSON(data []byte) error
type UnifiedResponseMetaStatementPeriod ¶
type UnifiedResponseMetaStatementPeriod struct { // Start date of the statement period From time.Time `json:"from" format:"date"` // End date of the statement period To time.Time `json:"to" format:"date"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { From respjson.Field To respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (UnifiedResponseMetaStatementPeriod) RawJSON ¶
func (r UnifiedResponseMetaStatementPeriod) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseMetaStatementPeriod) UnmarshalJSON ¶
func (r *UnifiedResponseMetaStatementPeriod) UnmarshalJSON(data []byte) error
type UnifiedResponseMutualFund ¶
type UnifiedResponseMutualFund struct { // Additional folio information AdditionalInfo UnifiedResponseMutualFundAdditionalInfo `json:"additional_info"` // Asset Management Company name Amc string `json:"amc"` // Folio number FolioNumber string `json:"folio_number"` // Registrar and Transfer Agent name Registrar string `json:"registrar"` Schemes []UnifiedResponseMutualFundScheme `json:"schemes"` // Total value of the folio Value float64 `json:"value"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { AdditionalInfo respjson.Field Amc respjson.Field FolioNumber respjson.Field Registrar respjson.Field Schemes respjson.Field Value respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (UnifiedResponseMutualFund) RawJSON ¶
func (r UnifiedResponseMutualFund) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseMutualFund) UnmarshalJSON ¶
func (r *UnifiedResponseMutualFund) UnmarshalJSON(data []byte) error
type UnifiedResponseMutualFundAdditionalInfo ¶
type UnifiedResponseMutualFundAdditionalInfo struct { // KYC status of the folio KYC string `json:"kyc"` // PAN associated with the folio Pan string `json:"pan"` // PAN KYC status Pankyc string `json:"pankyc"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { KYC respjson.Field Pan respjson.Field Pankyc respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Additional folio information
func (UnifiedResponseMutualFundAdditionalInfo) RawJSON ¶
func (r UnifiedResponseMutualFundAdditionalInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseMutualFundAdditionalInfo) UnmarshalJSON ¶
func (r *UnifiedResponseMutualFundAdditionalInfo) UnmarshalJSON(data []byte) error
type UnifiedResponseMutualFundScheme ¶
type UnifiedResponseMutualFundScheme struct { // Additional information specific to the scheme AdditionalInfo UnifiedResponseMutualFundSchemeAdditionalInfo `json:"additional_info"` // Cost of investment Cost float64 `json:"cost"` Gain UnifiedResponseMutualFundSchemeGain `json:"gain"` // ISIN code of the scheme Isin string `json:"isin"` // Scheme name Name string `json:"name"` Nav float64 `json:"nav"` // List of nominees Nominees []string `json:"nominees"` Transactions []UnifiedResponseMutualFundSchemeTransaction `json:"transactions"` // Type of mutual fund scheme // // Any of "Equity", "Debt", "Hybrid", "Other". Type string `json:"type"` // Number of units held Units float64 `json:"units"` // Current market value of the holding Value float64 `json:"value"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { AdditionalInfo respjson.Field Cost respjson.Field Gain respjson.Field Isin respjson.Field Name respjson.Field Nav respjson.Field Nominees respjson.Field Transactions respjson.Field Type respjson.Field Units respjson.Field Value respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (UnifiedResponseMutualFundScheme) RawJSON ¶
func (r UnifiedResponseMutualFundScheme) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseMutualFundScheme) UnmarshalJSON ¶
func (r *UnifiedResponseMutualFundScheme) UnmarshalJSON(data []byte) error
type UnifiedResponseMutualFundSchemeAdditionalInfo ¶
type UnifiedResponseMutualFundSchemeAdditionalInfo struct { // Financial advisor name (CAMS/KFintech) Advisor string `json:"advisor"` // AMFI code for the scheme (CAMS/KFintech) Amfi string `json:"amfi"` // Closing balance units (CAMS/KFintech) CloseUnits float64 `json:"close_units"` // Opening balance units (CAMS/KFintech) OpenUnits float64 `json:"open_units"` // RTA code for the scheme (CAMS/KFintech) RtaCode string `json:"rta_code"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Advisor respjson.Field Amfi respjson.Field CloseUnits respjson.Field OpenUnits respjson.Field RtaCode respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
Additional information specific to the scheme
func (UnifiedResponseMutualFundSchemeAdditionalInfo) RawJSON ¶
func (r UnifiedResponseMutualFundSchemeAdditionalInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseMutualFundSchemeAdditionalInfo) UnmarshalJSON ¶
func (r *UnifiedResponseMutualFundSchemeAdditionalInfo) UnmarshalJSON(data []byte) error
type UnifiedResponseMutualFundSchemeGain ¶
type UnifiedResponseMutualFundSchemeGain struct { // Absolute gain or loss Absolute float64 `json:"absolute"` // Percentage gain or loss Percentage float64 `json:"percentage"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Absolute respjson.Field Percentage respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (UnifiedResponseMutualFundSchemeGain) RawJSON ¶
func (r UnifiedResponseMutualFundSchemeGain) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseMutualFundSchemeGain) UnmarshalJSON ¶
func (r *UnifiedResponseMutualFundSchemeGain) UnmarshalJSON(data []byte) error
type UnifiedResponseMutualFundSchemeTransaction ¶
type UnifiedResponseMutualFundSchemeTransaction struct { // Transaction amount Amount float64 `json:"amount"` // Balance units after transaction Balance float64 `json:"balance"` // Transaction date Date time.Time `json:"date" format:"date"` // Transaction description Description string `json:"description"` // Dividend rate (for dividend transactions) DividendRate float64 `json:"dividend_rate"` Nav float64 `json:"nav"` // Transaction type detected based on description. Possible values are // PURCHASE,PURCHASE_SIP,REDEMPTION,SWITCH_IN,SWITCH_IN_MERGER,SWITCH_OUT,SWITCH_OUT_MERGER,DIVIDEND_PAYOUT,DIVIDEND_REINVESTMENT,SEGREGATION,STAMP_DUTY_TAX,TDS_TAX,STT_TAX,MISC. // If dividend_rate is present, then possible values are dividend_rate is // applicable only for DIVIDEND_PAYOUT and DIVIDEND_REINVESTMENT. Type string `json:"type"` // Number of units involved Units float64 `json:"units"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Amount respjson.Field Balance respjson.Field Date respjson.Field Description respjson.Field DividendRate respjson.Field Nav respjson.Field Type respjson.Field Units respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (UnifiedResponseMutualFundSchemeTransaction) RawJSON ¶
func (r UnifiedResponseMutualFundSchemeTransaction) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseMutualFundSchemeTransaction) UnmarshalJSON ¶
func (r *UnifiedResponseMutualFundSchemeTransaction) UnmarshalJSON(data []byte) error
type UnifiedResponseSummary ¶
type UnifiedResponseSummary struct { Accounts UnifiedResponseSummaryAccounts `json:"accounts"` // Total portfolio value across all accounts TotalValue float64 `json:"total_value"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Accounts respjson.Field TotalValue respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (UnifiedResponseSummary) RawJSON ¶
func (r UnifiedResponseSummary) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseSummary) UnmarshalJSON ¶
func (r *UnifiedResponseSummary) UnmarshalJSON(data []byte) error
type UnifiedResponseSummaryAccounts ¶
type UnifiedResponseSummaryAccounts struct { Demat UnifiedResponseSummaryAccountsDemat `json:"demat"` Insurance UnifiedResponseSummaryAccountsInsurance `json:"insurance"` MutualFunds UnifiedResponseSummaryAccountsMutualFunds `json:"mutual_funds"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Demat respjson.Field Insurance respjson.Field MutualFunds respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (UnifiedResponseSummaryAccounts) RawJSON ¶
func (r UnifiedResponseSummaryAccounts) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseSummaryAccounts) UnmarshalJSON ¶
func (r *UnifiedResponseSummaryAccounts) UnmarshalJSON(data []byte) error
type UnifiedResponseSummaryAccountsDemat ¶
type UnifiedResponseSummaryAccountsDemat struct { // Number of demat accounts Count int64 `json:"count"` // Total value of demat accounts TotalValue float64 `json:"total_value"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Count respjson.Field TotalValue respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (UnifiedResponseSummaryAccountsDemat) RawJSON ¶
func (r UnifiedResponseSummaryAccountsDemat) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseSummaryAccountsDemat) UnmarshalJSON ¶
func (r *UnifiedResponseSummaryAccountsDemat) UnmarshalJSON(data []byte) error
type UnifiedResponseSummaryAccountsInsurance ¶
type UnifiedResponseSummaryAccountsInsurance struct { // Number of insurance policies Count int64 `json:"count"` // Total value of insurance policies TotalValue float64 `json:"total_value"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Count respjson.Field TotalValue respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (UnifiedResponseSummaryAccountsInsurance) RawJSON ¶
func (r UnifiedResponseSummaryAccountsInsurance) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseSummaryAccountsInsurance) UnmarshalJSON ¶
func (r *UnifiedResponseSummaryAccountsInsurance) UnmarshalJSON(data []byte) error
type UnifiedResponseSummaryAccountsMutualFunds ¶
type UnifiedResponseSummaryAccountsMutualFunds struct { // Number of mutual fund folios Count int64 `json:"count"` // Total value of mutual funds TotalValue float64 `json:"total_value"` // JSON contains metadata for fields, check presence with [respjson.Field.Valid]. JSON struct { Count respjson.Field TotalValue respjson.Field ExtraFields map[string]respjson.Field // contains filtered or unexported fields } `json:"-"` }
func (UnifiedResponseSummaryAccountsMutualFunds) RawJSON ¶
func (r UnifiedResponseSummaryAccountsMutualFunds) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseSummaryAccountsMutualFunds) UnmarshalJSON ¶
func (r *UnifiedResponseSummaryAccountsMutualFunds) UnmarshalJSON(data []byte) error
Directories
¶
Path | Synopsis |
---|---|
encoding/json
Package json implements encoding and decoding of JSON as defined in RFC 7159.
|
Package json implements encoding and decoding of JSON as defined in RFC 7159. |
encoding/json/shims
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.21, and used by the Go 1.24 encoding/json package.
|
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.21, and used by the Go 1.24 encoding/json package. |
packages
|
|
shared
|
|