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 AccessTokenNewParams
- type AccessTokenNewResponse
- type AccessTokenService
- type CamsKfintechParseParams
- type CamsKfintechService
- type CdslFetchRequestOtpParams
- type CdslFetchRequestOtpResponse
- type CdslFetchService
- type CdslFetchVerifyOtpParams
- type CdslFetchVerifyOtpResponse
- type CdslFetchVerifyOtpResponseFile
- type CdslParsePdfParams
- type CdslService
- 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 ContractNoteParseParams
- type ContractNoteParseParamsBrokerType
- type ContractNoteParseResponse
- type ContractNoteParseResponseData
- type ContractNoteParseResponseDataBrokerInfo
- type ContractNoteParseResponseDataChargesSummary
- type ContractNoteParseResponseDataClientInfo
- type ContractNoteParseResponseDataContractNoteInfo
- type ContractNoteParseResponseDataDerivativesTransaction
- type ContractNoteParseResponseDataDetailedTrade
- type ContractNoteParseResponseDataEquityTransaction
- type ContractNoteService
- type CreditCheckResponse
- type CreditService
- type Error
- type InboxCheckConnectionStatusParams
- type InboxCheckConnectionStatusResponse
- type InboxConnectEmailParams
- type InboxConnectEmailResponse
- type InboxDisconnectEmailParams
- type InboxDisconnectEmailResponse
- type InboxListCasFilesParams
- type InboxListCasFilesResponse
- type InboxListCasFilesResponseFile
- type InboxService
- func (r *InboxService) CheckConnectionStatus(ctx context.Context, body InboxCheckConnectionStatusParams, ...) (res *InboxCheckConnectionStatusResponse, err error)
- func (r *InboxService) ConnectEmail(ctx context.Context, body InboxConnectEmailParams, ...) (res *InboxConnectEmailResponse, err error)
- func (r *InboxService) DisconnectEmail(ctx context.Context, body InboxDisconnectEmailParams, ...) (res *InboxDisconnectEmailResponse, err error)
- func (r *InboxService) ListCasFiles(ctx context.Context, params InboxListCasFilesParams, ...) (res *InboxListCasFilesResponse, err error)
- type KfintechGenerateCasParams
- type KfintechGenerateCasResponse
- type KfintechService
- type LinkedHolder
- type LogGetSummaryParams
- type LogGetSummaryResponse
- type LogGetSummaryResponseSummary
- type LogGetSummaryResponseSummaryByFeature
- type LogNewParams
- type LogNewResponse
- type LogNewResponseLog
- type LogService
- type NsdlParseParams
- type NsdlService
- type SmartParseCasPdfParams
- type SmartService
- type Transaction
- type TransactionAdditionalInfo
- type TransactionType
- type UnifiedResponse
- type UnifiedResponseDematAccount
- type UnifiedResponseDematAccountAdditionalInfo
- type UnifiedResponseDematAccountHoldings
- type UnifiedResponseDematAccountHoldingsAif
- type UnifiedResponseDematAccountHoldingsAifAdditionalInfo
- type UnifiedResponseDematAccountHoldingsCorporateBond
- type UnifiedResponseDematAccountHoldingsCorporateBondAdditionalInfo
- type UnifiedResponseDematAccountHoldingsDematMutualFund
- type UnifiedResponseDematAccountHoldingsDematMutualFundAdditionalInfo
- type UnifiedResponseDematAccountHoldingsEquity
- type UnifiedResponseDematAccountHoldingsEquityAdditionalInfo
- type UnifiedResponseDematAccountHoldingsGovernmentSecurity
- type UnifiedResponseDematAccountHoldingsGovernmentSecurityAdditionalInfo
- type UnifiedResponseInsurance
- type UnifiedResponseInsuranceLifeInsurancePolicy
- type UnifiedResponseInvestor
- type UnifiedResponseMeta
- type UnifiedResponseMetaStatementPeriod
- type UnifiedResponseMutualFund
- type UnifiedResponseMutualFundAdditionalInfo
- type UnifiedResponseMutualFundScheme
- type UnifiedResponseMutualFundSchemeAdditionalInfo
- type UnifiedResponseMutualFundSchemeGain
- type UnifiedResponseNp
- type UnifiedResponseNpFund
- type UnifiedResponseNpFundAdditionalInfo
- type UnifiedResponseSummary
- type UnifiedResponseSummaryAccounts
- type UnifiedResponseSummaryAccountsDemat
- type UnifiedResponseSummaryAccountsInsurance
- type UnifiedResponseSummaryAccountsMutualFunds
- type UnifiedResponseSummaryAccountsNps
- type VerifyTokenService
- type VerifyTokenVerifyResponse
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 AccessTokenNewParams ¶ added in v0.2.0
type AccessTokenNewParams struct {
// Token validity in minutes (max 60)
ExpiryMinutes param.Opt[int64] `json:"expiry_minutes,omitzero"`
// contains filtered or unexported fields
}
func (AccessTokenNewParams) MarshalJSON ¶ added in v0.2.0
func (r AccessTokenNewParams) MarshalJSON() (data []byte, err error)
func (*AccessTokenNewParams) UnmarshalJSON ¶ added in v0.2.0
func (r *AccessTokenNewParams) UnmarshalJSON(data []byte) error
type AccessTokenNewResponse ¶ added in v0.2.0
type AccessTokenNewResponse struct {
// The at\_ prefixed access token
AccessToken string `json:"access_token"`
// Token validity in seconds
ExpiresIn int64 `json:"expires_in"`
// Always "api_key" - token is a drop-in replacement for x-api-key header
TokenType string `json:"token_type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AccessToken respjson.Field
ExpiresIn respjson.Field
TokenType respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (AccessTokenNewResponse) RawJSON ¶ added in v0.2.0
func (r AccessTokenNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*AccessTokenNewResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *AccessTokenNewResponse) UnmarshalJSON(data []byte) error
type AccessTokenService ¶ added in v0.2.0
type AccessTokenService struct {
Options []option.RequestOption
}
AccessTokenService 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 NewAccessTokenService method instead.
func NewAccessTokenService ¶ added in v0.2.0
func NewAccessTokenService(opts ...option.RequestOption) (r AccessTokenService)
NewAccessTokenService 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 (*AccessTokenService) New ¶ added in v0.2.0
func (r *AccessTokenService) New(ctx context.Context, body AccessTokenNewParams, opts ...option.RequestOption) (res *AccessTokenNewResponse, err error)
Generate a short-lived access token from your API key.
**Use this endpoint from your backend** to create tokens that can be safely passed to frontend/SDK.
Access tokens:
- Are prefixed with `at_` for easy identification - Valid for up to 60 minutes - Can be used in place of API keys on all v4 endpoints - Cannot be used to generate other access tokens
type CamsKfintechParseParams ¶ added in v0.2.0
type CamsKfintechParseParams struct {
// Password for the PDF file (if required)
Password param.Opt[string] `json:"password,omitzero"`
// Base64 encoded CAS PDF file (required if pdf_url not provided)
PdfFile param.Opt[string] `json:"pdf_file,omitzero" format:"base64"`
// URL to the CAS PDF file (required if pdf_file not provided)
PdfURL param.Opt[string] `json:"pdf_url,omitzero" format:"uri"`
// contains filtered or unexported fields
}
func (CamsKfintechParseParams) MarshalJSON ¶ added in v0.2.0
func (r CamsKfintechParseParams) MarshalJSON() (data []byte, err error)
func (*CamsKfintechParseParams) UnmarshalJSON ¶ added in v0.2.0
func (r *CamsKfintechParseParams) UnmarshalJSON(data []byte) error
type CamsKfintechService ¶ added in v0.2.0
type CamsKfintechService struct {
Options []option.RequestOption
}
CamsKfintechService 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 NewCamsKfintechService method instead.
func NewCamsKfintechService ¶ added in v0.2.0
func NewCamsKfintechService(opts ...option.RequestOption) (r CamsKfintechService)
NewCamsKfintechService 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 (*CamsKfintechService) Parse ¶ added in v0.2.0
func (r *CamsKfintechService) Parse(ctx context.Context, body CamsKfintechParseParams, 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.
type CdslFetchRequestOtpParams ¶ added in v0.2.0
type CdslFetchRequestOtpParams struct {
// CDSL BO ID (16 digits)
BoID string `json:"bo_id,required"`
// Date of birth (YYYY-MM-DD)
Dob string `json:"dob,required"`
// PAN number
Pan string `json:"pan,required"`
// contains filtered or unexported fields
}
func (CdslFetchRequestOtpParams) MarshalJSON ¶ added in v0.2.0
func (r CdslFetchRequestOtpParams) MarshalJSON() (data []byte, err error)
func (*CdslFetchRequestOtpParams) UnmarshalJSON ¶ added in v0.2.0
func (r *CdslFetchRequestOtpParams) UnmarshalJSON(data []byte) error
type CdslFetchRequestOtpResponse ¶ added in v0.2.0
type CdslFetchRequestOtpResponse struct {
Msg string `json:"msg"`
// Session ID for verify step
SessionID string `json:"session_id"`
Status string `json:"status"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Msg respjson.Field
SessionID respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CdslFetchRequestOtpResponse) RawJSON ¶ added in v0.2.0
func (r CdslFetchRequestOtpResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CdslFetchRequestOtpResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *CdslFetchRequestOtpResponse) UnmarshalJSON(data []byte) error
type CdslFetchService ¶ added in v0.2.0
type CdslFetchService struct {
Options []option.RequestOption
}
CdslFetchService 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 NewCdslFetchService method instead.
func NewCdslFetchService ¶ added in v0.2.0
func NewCdslFetchService(opts ...option.RequestOption) (r CdslFetchService)
NewCdslFetchService 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 (*CdslFetchService) RequestOtp ¶ added in v0.2.0
func (r *CdslFetchService) RequestOtp(ctx context.Context, body CdslFetchRequestOtpParams, opts ...option.RequestOption) (res *CdslFetchRequestOtpResponse, err error)
**Step 1 of 2**: Request OTP for CDSL CAS fetch.
This endpoint:
1. Solves reCAPTCHA automatically (~15-20 seconds) 2. Submits login credentials to CDSL portal 3. Triggers OTP to user's registered mobile number
After user receives OTP, call `/v4/cdsl/fetch/{session_id}/verify` to complete.
func (*CdslFetchService) VerifyOtp ¶ added in v0.2.0
func (r *CdslFetchService) VerifyOtp(ctx context.Context, sessionID string, body CdslFetchVerifyOtpParams, opts ...option.RequestOption) (res *CdslFetchVerifyOtpResponse, err error)
**Step 2 of 2**: Verify OTP and retrieve CDSL CAS files.
After successful verification, CAS PDFs are fetched from CDSL portal, uploaded to cloud storage, and returned as direct download URLs.
type CdslFetchVerifyOtpParams ¶ added in v0.2.0
type CdslFetchVerifyOtpParams struct {
// OTP received on mobile
Otp string `json:"otp,required"`
// Number of monthly statements to fetch (default 6)
NumPeriods param.Opt[int64] `json:"num_periods,omitzero"`
// contains filtered or unexported fields
}
func (CdslFetchVerifyOtpParams) MarshalJSON ¶ added in v0.2.0
func (r CdslFetchVerifyOtpParams) MarshalJSON() (data []byte, err error)
func (*CdslFetchVerifyOtpParams) UnmarshalJSON ¶ added in v0.2.0
func (r *CdslFetchVerifyOtpParams) UnmarshalJSON(data []byte) error
type CdslFetchVerifyOtpResponse ¶ added in v0.2.0
type CdslFetchVerifyOtpResponse struct {
Files []CdslFetchVerifyOtpResponseFile `json:"files"`
Msg string `json:"msg"`
Status string `json:"status"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Files respjson.Field
Msg respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CdslFetchVerifyOtpResponse) RawJSON ¶ added in v0.2.0
func (r CdslFetchVerifyOtpResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CdslFetchVerifyOtpResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *CdslFetchVerifyOtpResponse) UnmarshalJSON(data []byte) error
type CdslFetchVerifyOtpResponseFile ¶ added in v0.2.0
type CdslFetchVerifyOtpResponseFile struct {
Filename string `json:"filename"`
// Direct download URL (cloud storage)
URL string `json:"url"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Filename respjson.Field
URL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CdslFetchVerifyOtpResponseFile) RawJSON ¶ added in v0.2.0
func (r CdslFetchVerifyOtpResponseFile) RawJSON() string
Returns the unmodified JSON received from the API
func (*CdslFetchVerifyOtpResponseFile) UnmarshalJSON ¶ added in v0.2.0
func (r *CdslFetchVerifyOtpResponseFile) UnmarshalJSON(data []byte) error
type CdslParsePdfParams ¶ added in v0.2.0
type CdslParsePdfParams struct {
// Password for the PDF file (if required)
Password param.Opt[string] `json:"password,omitzero"`
// Base64 encoded CAS PDF file (required if pdf_url not provided)
PdfFile param.Opt[string] `json:"pdf_file,omitzero" format:"base64"`
// URL to the CAS PDF file (required if pdf_file not provided)
PdfURL param.Opt[string] `json:"pdf_url,omitzero" format:"uri"`
// contains filtered or unexported fields
}
func (CdslParsePdfParams) MarshalJSON ¶ added in v0.2.0
func (r CdslParsePdfParams) MarshalJSON() (data []byte, err error)
func (*CdslParsePdfParams) UnmarshalJSON ¶ added in v0.2.0
func (r *CdslParsePdfParams) UnmarshalJSON(data []byte) error
type CdslService ¶ added in v0.2.0
type CdslService struct {
Options []option.RequestOption
Fetch CdslFetchService
}
CdslService 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 NewCdslService method instead.
func NewCdslService ¶ added in v0.2.0
func NewCdslService(opts ...option.RequestOption) (r CdslService)
NewCdslService 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 (*CdslService) ParsePdf ¶ added in v0.2.0
func (r *CdslService) ParsePdf(ctx context.Context, body CdslParsePdfParams, 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.
type Client ¶
type Client struct {
Options []option.RequestOption
Credits CreditService
Logs LogService
AccessToken AccessTokenService
VerifyToken VerifyTokenService
CamsKfintech CamsKfintechService
Cdsl CdslService
ContractNote ContractNoteService
Inbox InboxService
Kfintech KfintechService
Nsdl NsdlService
Smart SmartService
}
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 ContractNoteParseParams ¶ added in v0.2.0
type ContractNoteParseParams struct {
// Password for the PDF file (usually PAN number for Zerodha)
Password param.Opt[string] `json:"password,omitzero"`
// Base64 encoded contract note PDF file
PdfFile param.Opt[string] `json:"pdf_file,omitzero" format:"base64"`
// URL to the contract note PDF file
PdfURL param.Opt[string] `json:"pdf_url,omitzero" format:"uri"`
// Optional broker type override. If not provided, system will auto-detect.
//
// Any of "zerodha", "groww", "upstox", "icici".
BrokerType ContractNoteParseParamsBrokerType `json:"broker_type,omitzero"`
// contains filtered or unexported fields
}
func (ContractNoteParseParams) MarshalJSON ¶ added in v0.2.0
func (r ContractNoteParseParams) MarshalJSON() (data []byte, err error)
func (*ContractNoteParseParams) UnmarshalJSON ¶ added in v0.2.0
func (r *ContractNoteParseParams) UnmarshalJSON(data []byte) error
type ContractNoteParseParamsBrokerType ¶ added in v0.2.0
type ContractNoteParseParamsBrokerType string
Optional broker type override. If not provided, system will auto-detect.
const ( ContractNoteParseParamsBrokerTypeZerodha ContractNoteParseParamsBrokerType = "zerodha" ContractNoteParseParamsBrokerTypeGroww ContractNoteParseParamsBrokerType = "groww" ContractNoteParseParamsBrokerTypeUpstox ContractNoteParseParamsBrokerType = "upstox" ContractNoteParseParamsBrokerTypeIcici ContractNoteParseParamsBrokerType = "icici" )
type ContractNoteParseResponse ¶ added in v0.2.0
type ContractNoteParseResponse struct {
Data ContractNoteParseResponseData `json:"data"`
Msg string `json:"msg"`
Status string `json:"status"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Data respjson.Field
Msg respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContractNoteParseResponse) RawJSON ¶ added in v0.2.0
func (r ContractNoteParseResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContractNoteParseResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *ContractNoteParseResponse) UnmarshalJSON(data []byte) error
type ContractNoteParseResponseData ¶ added in v0.2.0
type ContractNoteParseResponseData struct {
BrokerInfo ContractNoteParseResponseDataBrokerInfo `json:"broker_info"`
// Breakdown of various charges and fees
ChargesSummary ContractNoteParseResponseDataChargesSummary `json:"charges_summary"`
ClientInfo ContractNoteParseResponseDataClientInfo `json:"client_info"`
ContractNoteInfo ContractNoteParseResponseDataContractNoteInfo `json:"contract_note_info"`
// Summary of derivatives transactions
DerivativesTransactions []ContractNoteParseResponseDataDerivativesTransaction `json:"derivatives_transactions"`
// Detailed breakdown of all individual trades
DetailedTrades []ContractNoteParseResponseDataDetailedTrade `json:"detailed_trades"`
// Summary of equity transactions grouped by security
EquityTransactions []ContractNoteParseResponseDataEquityTransaction `json:"equity_transactions"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BrokerInfo respjson.Field
ChargesSummary respjson.Field
ClientInfo respjson.Field
ContractNoteInfo respjson.Field
DerivativesTransactions respjson.Field
DetailedTrades respjson.Field
EquityTransactions respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContractNoteParseResponseData) RawJSON ¶ added in v0.2.0
func (r ContractNoteParseResponseData) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContractNoteParseResponseData) UnmarshalJSON ¶ added in v0.2.0
func (r *ContractNoteParseResponseData) UnmarshalJSON(data []byte) error
type ContractNoteParseResponseDataBrokerInfo ¶ added in v0.2.0
type ContractNoteParseResponseDataBrokerInfo struct {
// Auto-detected or specified broker type
//
// Any of "zerodha", "groww", "upstox", "icici", "unknown".
BrokerType string `json:"broker_type"`
// Broker company name
Name string `json:"name"`
// SEBI registration number of the broker
SebiRegistration string `json:"sebi_registration"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BrokerType respjson.Field
Name respjson.Field
SebiRegistration respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContractNoteParseResponseDataBrokerInfo) RawJSON ¶ added in v0.2.0
func (r ContractNoteParseResponseDataBrokerInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContractNoteParseResponseDataBrokerInfo) UnmarshalJSON ¶ added in v0.2.0
func (r *ContractNoteParseResponseDataBrokerInfo) UnmarshalJSON(data []byte) error
type ContractNoteParseResponseDataChargesSummary ¶ added in v0.2.0
type ContractNoteParseResponseDataChargesSummary struct {
// Central GST amount
Cgst float64 `json:"cgst"`
// Exchange transaction charges
ExchangeTransactionCharges float64 `json:"exchange_transaction_charges"`
// Integrated GST amount
Igst float64 `json:"igst"`
// Final net amount receivable or payable
NetAmountReceivablePayable float64 `json:"net_amount_receivable_payable"`
// Net pay-in/pay-out obligation
PayInPayOutObligation float64 `json:"pay_in_pay_out_obligation"`
// SEBI turnover fees
SebiTurnoverFees float64 `json:"sebi_turnover_fees"`
// Securities Transaction Tax
SecuritiesTransactionTax float64 `json:"securities_transaction_tax"`
// State GST amount
Sgst float64 `json:"sgst"`
// Stamp duty charges
StampDuty float64 `json:"stamp_duty"`
// Taxable brokerage amount
TaxableValueBrokerage float64 `json:"taxable_value_brokerage"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Cgst respjson.Field
ExchangeTransactionCharges respjson.Field
Igst respjson.Field
NetAmountReceivablePayable respjson.Field
PayInPayOutObligation respjson.Field
SebiTurnoverFees respjson.Field
SecuritiesTransactionTax respjson.Field
Sgst respjson.Field
StampDuty respjson.Field
TaxableValueBrokerage respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Breakdown of various charges and fees
func (ContractNoteParseResponseDataChargesSummary) RawJSON ¶ added in v0.2.0
func (r ContractNoteParseResponseDataChargesSummary) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContractNoteParseResponseDataChargesSummary) UnmarshalJSON ¶ added in v0.2.0
func (r *ContractNoteParseResponseDataChargesSummary) UnmarshalJSON(data []byte) error
type ContractNoteParseResponseDataClientInfo ¶ added in v0.2.0
type ContractNoteParseResponseDataClientInfo struct {
// Client address
Address string `json:"address"`
// GST state code
GstStateCode string `json:"gst_state_code"`
// Client name
Name string `json:"name"`
// Client PAN number
Pan string `json:"pan"`
// GST place of supply
PlaceOfSupply string `json:"place_of_supply"`
// Unique Client Code
Ucc string `json:"ucc"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Address respjson.Field
GstStateCode respjson.Field
Name respjson.Field
Pan respjson.Field
PlaceOfSupply respjson.Field
Ucc respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContractNoteParseResponseDataClientInfo) RawJSON ¶ added in v0.2.0
func (r ContractNoteParseResponseDataClientInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContractNoteParseResponseDataClientInfo) UnmarshalJSON ¶ added in v0.2.0
func (r *ContractNoteParseResponseDataClientInfo) UnmarshalJSON(data []byte) error
type ContractNoteParseResponseDataContractNoteInfo ¶ added in v0.2.0
type ContractNoteParseResponseDataContractNoteInfo struct {
// Contract note reference number
ContractNoteNumber string `json:"contract_note_number"`
// Settlement date for the trades
SettlementDate time.Time `json:"settlement_date" format:"date"`
// Settlement reference number
SettlementNumber string `json:"settlement_number"`
// Date when trades were executed
TradeDate time.Time `json:"trade_date" format:"date"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ContractNoteNumber respjson.Field
SettlementDate respjson.Field
SettlementNumber respjson.Field
TradeDate respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContractNoteParseResponseDataContractNoteInfo) RawJSON ¶ added in v0.2.0
func (r ContractNoteParseResponseDataContractNoteInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContractNoteParseResponseDataContractNoteInfo) UnmarshalJSON ¶ added in v0.2.0
func (r *ContractNoteParseResponseDataContractNoteInfo) UnmarshalJSON(data []byte) error
type ContractNoteParseResponseDataDerivativesTransaction ¶ added in v0.2.0
type ContractNoteParseResponseDataDerivativesTransaction struct {
// Brokerage charged per unit
BrokeragePerUnit float64 `json:"brokerage_per_unit"`
// Transaction type (Buy/Sell/Bring Forward/Carry Forward)
BuySellBfCf string `json:"buy_sell_bf_cf"`
// Closing rate per unit
ClosingRatePerUnit float64 `json:"closing_rate_per_unit"`
// Derivatives contract description
ContractDescription string `json:"contract_description"`
// Net total amount
NetTotal float64 `json:"net_total"`
// Quantity traded
Quantity float64 `json:"quantity"`
// Weighted Average Price per unit
WapPerUnit float64 `json:"wap_per_unit"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BrokeragePerUnit respjson.Field
BuySellBfCf respjson.Field
ClosingRatePerUnit respjson.Field
ContractDescription respjson.Field
NetTotal respjson.Field
Quantity respjson.Field
WapPerUnit respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContractNoteParseResponseDataDerivativesTransaction) RawJSON ¶ added in v0.2.0
func (r ContractNoteParseResponseDataDerivativesTransaction) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContractNoteParseResponseDataDerivativesTransaction) UnmarshalJSON ¶ added in v0.2.0
func (r *ContractNoteParseResponseDataDerivativesTransaction) UnmarshalJSON(data []byte) error
type ContractNoteParseResponseDataDetailedTrade ¶ added in v0.2.0
type ContractNoteParseResponseDataDetailedTrade struct {
// Brokerage charged for this trade
Brokerage float64 `json:"brokerage"`
// Transaction type (B for Buy, S for Sell)
BuySell string `json:"buy_sell"`
// Closing rate per unit
ClosingRatePerUnit float64 `json:"closing_rate_per_unit"`
// Exchange name
Exchange string `json:"exchange"`
// Net rate per unit
NetRatePerUnit float64 `json:"net_rate_per_unit"`
// Net total for this trade
NetTotal float64 `json:"net_total"`
// Order reference number
OrderNumber string `json:"order_number"`
// Time when order was placed
OrderTime string `json:"order_time"`
// Quantity traded
Quantity float64 `json:"quantity"`
// Additional remarks or notes
Remarks string `json:"remarks"`
// Security name with exchange and ISIN
SecurityDescription string `json:"security_description"`
// Trade reference number
TradeNumber string `json:"trade_number"`
// Time when trade was executed
TradeTime string `json:"trade_time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Brokerage respjson.Field
BuySell respjson.Field
ClosingRatePerUnit respjson.Field
Exchange respjson.Field
NetRatePerUnit respjson.Field
NetTotal respjson.Field
OrderNumber respjson.Field
OrderTime respjson.Field
Quantity respjson.Field
Remarks respjson.Field
SecurityDescription respjson.Field
TradeNumber respjson.Field
TradeTime respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContractNoteParseResponseDataDetailedTrade) RawJSON ¶ added in v0.2.0
func (r ContractNoteParseResponseDataDetailedTrade) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContractNoteParseResponseDataDetailedTrade) UnmarshalJSON ¶ added in v0.2.0
func (r *ContractNoteParseResponseDataDetailedTrade) UnmarshalJSON(data []byte) error
type ContractNoteParseResponseDataEquityTransaction ¶ added in v0.2.0
type ContractNoteParseResponseDataEquityTransaction struct {
// Total quantity purchased
BuyQuantity float64 `json:"buy_quantity"`
// Total value of buy transactions
BuyTotalValue float64 `json:"buy_total_value"`
// Weighted Average Price for buy transactions
BuyWap float64 `json:"buy_wap"`
// ISIN code of the security
Isin string `json:"isin"`
// Net amount payable/receivable for this security
NetObligation float64 `json:"net_obligation"`
// Name of the security
SecurityName string `json:"security_name"`
// Trading symbol
SecuritySymbol string `json:"security_symbol"`
// Total quantity sold
SellQuantity float64 `json:"sell_quantity"`
// Total value of sell transactions
SellTotalValue float64 `json:"sell_total_value"`
// Weighted Average Price for sell transactions
SellWap float64 `json:"sell_wap"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BuyQuantity respjson.Field
BuyTotalValue respjson.Field
BuyWap respjson.Field
Isin respjson.Field
NetObligation respjson.Field
SecurityName respjson.Field
SecuritySymbol respjson.Field
SellQuantity respjson.Field
SellTotalValue respjson.Field
SellWap respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (ContractNoteParseResponseDataEquityTransaction) RawJSON ¶ added in v0.2.0
func (r ContractNoteParseResponseDataEquityTransaction) RawJSON() string
Returns the unmodified JSON received from the API
func (*ContractNoteParseResponseDataEquityTransaction) UnmarshalJSON ¶ added in v0.2.0
func (r *ContractNoteParseResponseDataEquityTransaction) UnmarshalJSON(data []byte) error
type ContractNoteService ¶ added in v0.2.0
type ContractNoteService struct {
Options []option.RequestOption
}
ContractNoteService 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 NewContractNoteService method instead.
func NewContractNoteService ¶ added in v0.2.0
func NewContractNoteService(opts ...option.RequestOption) (r ContractNoteService)
NewContractNoteService 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 (*ContractNoteService) Parse ¶ added in v0.2.0
func (r *ContractNoteService) Parse(ctx context.Context, body ContractNoteParseParams, opts ...option.RequestOption) (res *ContractNoteParseResponse, err error)
This endpoint parses Contract Note PDF files from various brokers including Zerodha, Groww, Upstox, ICICI Securities, and others.
**What is a Contract Note?** A contract note is a legal document that provides details of all trades executed by an investor. It includes:
- Trade details with timestamps, quantities, and prices - Brokerage and charges breakdown - Settlement information - Regulatory compliance details
**Supported Brokers:**
- Zerodha Broking Limited - Groww Invest Tech Private Limited - Upstox (RKSV Securities) - ICICI Securities Limited - Auto-detection for unknown brokers
**Key Features:**
- **Auto-detection**: Automatically identifies broker type from PDF content
- **Comprehensive parsing**: Extracts equity transactions, derivatives transactions, detailed trades, and charges
- **Flexible input**: Accepts both file upload and URL-based PDF input
- **Password protection**: Supports password-protected PDFs
The API returns structured data including contract note information, client details, transaction summaries, and detailed trade-by-trade breakdowns.
type CreditCheckResponse ¶ added in v0.2.0
type CreditCheckResponse struct {
// List of API features enabled for your plan
EnabledFeatures []string `json:"enabled_features"`
// Whether the account has unlimited credits
IsUnlimited bool `json:"is_unlimited"`
// Total credit limit for billing period
Limit int64 `json:"limit"`
// Remaining credits (null if unlimited)
Remaining float64 `json:"remaining,nullable"`
// When credits reset (ISO 8601)
ResetsAt time.Time `json:"resets_at,nullable" format:"date-time"`
// Number of credits used this billing period
Used float64 `json:"used"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
EnabledFeatures respjson.Field
IsUnlimited respjson.Field
Limit respjson.Field
Remaining respjson.Field
ResetsAt respjson.Field
Used respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (CreditCheckResponse) RawJSON ¶ added in v0.2.0
func (r CreditCheckResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*CreditCheckResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *CreditCheckResponse) UnmarshalJSON(data []byte) error
type CreditService ¶ added in v0.2.0
type CreditService struct {
Options []option.RequestOption
}
CreditService 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 NewCreditService method instead.
func NewCreditService ¶ added in v0.2.0
func NewCreditService(opts ...option.RequestOption) (r CreditService)
NewCreditService 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 (*CreditService) Check ¶ added in v0.2.0
func (r *CreditService) Check(ctx context.Context, opts ...option.RequestOption) (res *CreditCheckResponse, err error)
Check your remaining API credits and usage for the current billing period.
Returns:
- Number of API calls used and remaining credits - Credit limit and reset date - List of enabled features for your plan
Credits reset at the start of each billing period.
type InboxCheckConnectionStatusParams ¶ added in v0.2.0
type InboxCheckConnectionStatusParams struct {
XInboxToken string `header:"x-inbox-token,required" json:"-"`
// contains filtered or unexported fields
}
type InboxCheckConnectionStatusResponse ¶ added in v0.2.0
type InboxCheckConnectionStatusResponse struct {
// Whether the token is valid and usable
Connected bool `json:"connected"`
// Email address of the connected account
Email string `json:"email" format:"email"`
Provider string `json:"provider"`
Status string `json:"status"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Connected respjson.Field
Email respjson.Field
Provider respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InboxCheckConnectionStatusResponse) RawJSON ¶ added in v0.2.0
func (r InboxCheckConnectionStatusResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*InboxCheckConnectionStatusResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *InboxCheckConnectionStatusResponse) UnmarshalJSON(data []byte) error
type InboxConnectEmailParams ¶ added in v0.2.0
type InboxConnectEmailParams struct {
// Your callback URL to receive the inbox_token (must be http or https)
RedirectUri string `json:"redirect_uri,required" format:"uri"`
// State parameter for CSRF protection (returned in redirect)
State param.Opt[string] `json:"state,omitzero"`
// contains filtered or unexported fields
}
func (InboxConnectEmailParams) MarshalJSON ¶ added in v0.2.0
func (r InboxConnectEmailParams) MarshalJSON() (data []byte, err error)
func (*InboxConnectEmailParams) UnmarshalJSON ¶ added in v0.2.0
func (r *InboxConnectEmailParams) UnmarshalJSON(data []byte) error
type InboxConnectEmailResponse ¶ added in v0.2.0
type InboxConnectEmailResponse struct {
// Seconds until the OAuth URL expires (typically 10 minutes)
ExpiresIn int64 `json:"expires_in"`
// Redirect user to this URL to start OAuth flow
OAuthURL string `json:"oauth_url" format:"uri"`
Status string `json:"status"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ExpiresIn respjson.Field
OAuthURL respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InboxConnectEmailResponse) RawJSON ¶ added in v0.2.0
func (r InboxConnectEmailResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*InboxConnectEmailResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *InboxConnectEmailResponse) UnmarshalJSON(data []byte) error
type InboxDisconnectEmailParams ¶ added in v0.2.0
type InboxDisconnectEmailParams struct {
XInboxToken string `header:"x-inbox-token,required" json:"-"`
// contains filtered or unexported fields
}
type InboxDisconnectEmailResponse ¶ added in v0.2.0
type InboxDisconnectEmailResponse 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 (InboxDisconnectEmailResponse) RawJSON ¶ added in v0.2.0
func (r InboxDisconnectEmailResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*InboxDisconnectEmailResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *InboxDisconnectEmailResponse) UnmarshalJSON(data []byte) error
type InboxListCasFilesParams ¶ added in v0.2.0
type InboxListCasFilesParams struct {
XInboxToken string `header:"x-inbox-token,required" json:"-"`
// End date in ISO format (YYYY-MM-DD). Defaults to today.
EndDate param.Opt[time.Time] `json:"end_date,omitzero" format:"date"`
// Start date in ISO format (YYYY-MM-DD). Defaults to 30 days ago.
StartDate param.Opt[time.Time] `json:"start_date,omitzero" format:"date"`
// Filter by CAS provider(s):
//
// - `cdsl` → eCAS@cdslstatement.com
// - `nsdl` → NSDL-CAS@nsdl.co.in
// - `cams` → donotreply@camsonline.com
// - `kfintech` → samfS@kfintech.com
//
// Any of "cdsl", "nsdl", "cams", "kfintech".
CasTypes []string `json:"cas_types,omitzero"`
// contains filtered or unexported fields
}
func (InboxListCasFilesParams) MarshalJSON ¶ added in v0.2.0
func (r InboxListCasFilesParams) MarshalJSON() (data []byte, err error)
func (*InboxListCasFilesParams) UnmarshalJSON ¶ added in v0.2.0
func (r *InboxListCasFilesParams) UnmarshalJSON(data []byte) error
type InboxListCasFilesResponse ¶ added in v0.2.0
type InboxListCasFilesResponse struct {
// Number of CAS files found
Count int64 `json:"count"`
Files []InboxListCasFilesResponseFile `json:"files"`
Status string `json:"status"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Files respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (InboxListCasFilesResponse) RawJSON ¶ added in v0.2.0
func (r InboxListCasFilesResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*InboxListCasFilesResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *InboxListCasFilesResponse) UnmarshalJSON(data []byte) error
type InboxListCasFilesResponseFile ¶ added in v0.2.0
type InboxListCasFilesResponseFile struct {
// Detected CAS provider based on sender email
//
// Any of "cdsl", "nsdl", "cams", "kfintech".
CasType string `json:"cas_type"`
// URL expiration time in seconds (default 86400 = 24 hours)
ExpiresIn int64 `json:"expires_in"`
// Standardized filename (provider_YYYYMMDD_uniqueid.pdf)
Filename string `json:"filename"`
// Date the email was received
MessageDate time.Time `json:"message_date" format:"date"`
// Unique identifier for the email message (use for subsequent API calls)
MessageID string `json:"message_id"`
// Original attachment filename from the email
OriginalFilename string `json:"original_filename"`
// File size in bytes
Size int64 `json:"size"`
// Direct download URL (presigned, expires based on expires_in)
URL string `json:"url" format:"uri"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CasType respjson.Field
ExpiresIn respjson.Field
Filename respjson.Field
MessageDate respjson.Field
MessageID respjson.Field
OriginalFilename respjson.Field
Size respjson.Field
URL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A CAS file found in the user's email inbox
func (InboxListCasFilesResponseFile) RawJSON ¶ added in v0.2.0
func (r InboxListCasFilesResponseFile) RawJSON() string
Returns the unmodified JSON received from the API
func (*InboxListCasFilesResponseFile) UnmarshalJSON ¶ added in v0.2.0
func (r *InboxListCasFilesResponseFile) UnmarshalJSON(data []byte) error
type InboxService ¶ added in v0.2.0
type InboxService struct {
Options []option.RequestOption
}
InboxService 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 NewInboxService method instead.
func NewInboxService ¶ added in v0.2.0
func NewInboxService(opts ...option.RequestOption) (r InboxService)
NewInboxService 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 (*InboxService) CheckConnectionStatus ¶ added in v0.2.0
func (r *InboxService) CheckConnectionStatus(ctx context.Context, body InboxCheckConnectionStatusParams, opts ...option.RequestOption) (res *InboxCheckConnectionStatusResponse, err error)
Verify if an `inbox_token` is still valid and check connection status.
Use this to check if the user needs to re-authenticate (e.g., if they revoked access in their email provider settings).
func (*InboxService) ConnectEmail ¶ added in v0.2.0
func (r *InboxService) ConnectEmail(ctx context.Context, body InboxConnectEmailParams, opts ...option.RequestOption) (res *InboxConnectEmailResponse, err error)
Initiate OAuth flow to connect user's email inbox.
Returns an `oauth_url` that you should redirect the user to. After authorization, they are redirected back to your `redirect_uri` with the following query parameters:
**On success:**
- `inbox_token` - Encrypted token to store client-side - `email` - Email address of the connected account - `state` - Your original state parameter (for CSRF verification)
**On error:**
- `error` - Error code (e.g., `access_denied`, `token_exchange_failed`) - `state` - Your original state parameter
**Store the `inbox_token` client-side** and use it for all subsequent inbox API calls.
func (*InboxService) DisconnectEmail ¶ added in v0.2.0
func (r *InboxService) DisconnectEmail(ctx context.Context, body InboxDisconnectEmailParams, opts ...option.RequestOption) (res *InboxDisconnectEmailResponse, err error)
Revoke email access and invalidate the token.
This calls the provider's token revocation API (e.g., Google's revoke endpoint) to ensure the user's consent is properly removed.
After calling this, the `inbox_token` becomes unusable.
func (*InboxService) ListCasFiles ¶ added in v0.2.0
func (r *InboxService) ListCasFiles(ctx context.Context, params InboxListCasFilesParams, opts ...option.RequestOption) (res *InboxListCasFilesResponse, err error)
Search the user's email inbox for CAS files from known senders (CAMS, KFintech, CDSL, NSDL).
Files are uploaded to temporary cloud storage. **URLs expire in 24 hours.**
Optionally filter by CAS provider and date range.
**Billing:** 0.2 credits per request (charged regardless of success or number of files found).
type KfintechGenerateCasParams ¶ added in v0.2.0
type KfintechGenerateCasParams struct {
// Email address to receive the CAS document
Email string `json:"email,required"`
// Start date (YYYY-MM-DD)
FromDate string `json:"from_date,required"`
// Password for the PDF
Password string `json:"password,required"`
// End date (YYYY-MM-DD)
ToDate string `json:"to_date,required"`
// PAN number (optional)
PanNo param.Opt[string] `json:"pan_no,omitzero"`
// contains filtered or unexported fields
}
func (KfintechGenerateCasParams) MarshalJSON ¶ added in v0.2.0
func (r KfintechGenerateCasParams) MarshalJSON() (data []byte, err error)
func (*KfintechGenerateCasParams) UnmarshalJSON ¶ added in v0.2.0
func (r *KfintechGenerateCasParams) UnmarshalJSON(data []byte) error
type KfintechGenerateCasResponse ¶ added in v0.2.0
type KfintechGenerateCasResponse 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 (KfintechGenerateCasResponse) RawJSON ¶ added in v0.2.0
func (r KfintechGenerateCasResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*KfintechGenerateCasResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *KfintechGenerateCasResponse) UnmarshalJSON(data []byte) error
type KfintechService ¶ added in v0.2.0
type KfintechService struct {
Options []option.RequestOption
}
KfintechService 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 NewKfintechService method instead.
func NewKfintechService ¶ added in v0.2.0
func NewKfintechService(opts ...option.RequestOption) (r KfintechService)
NewKfintechService 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 (*KfintechService) GenerateCas ¶ added in v0.2.0
func (r *KfintechService) GenerateCas(ctx context.Context, body KfintechGenerateCasParams, opts ...option.RequestOption) (res *KfintechGenerateCasResponse, err error)
Generate CAS via KFintech mailback. The CAS PDF will be sent to the investor's email.
This is an async operation - the investor receives the CAS via email within a few minutes. For instant CAS retrieval, use CDSL Fetch (`/v4/cdsl/fetch`).
type LinkedHolder ¶ added in v0.2.0
type LinkedHolder struct {
// Name of the account holder
Name string `json:"name"`
// PAN of the account holder
Pan string `json:"pan"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
Pan respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LinkedHolder) RawJSON ¶ added in v0.2.0
func (r LinkedHolder) RawJSON() string
Returns the unmodified JSON received from the API
func (*LinkedHolder) UnmarshalJSON ¶ added in v0.2.0
func (r *LinkedHolder) UnmarshalJSON(data []byte) error
type LogGetSummaryParams ¶ added in v0.2.0
type LogGetSummaryParams struct {
// End time filter (ISO 8601). Defaults to now.
EndTime param.Opt[time.Time] `json:"end_time,omitzero" format:"date-time"`
// Start time filter (ISO 8601). Defaults to start of current month.
StartTime param.Opt[time.Time] `json:"start_time,omitzero" format:"date-time"`
// contains filtered or unexported fields
}
func (LogGetSummaryParams) MarshalJSON ¶ added in v0.2.0
func (r LogGetSummaryParams) MarshalJSON() (data []byte, err error)
func (*LogGetSummaryParams) UnmarshalJSON ¶ added in v0.2.0
func (r *LogGetSummaryParams) UnmarshalJSON(data []byte) error
type LogGetSummaryResponse ¶ added in v0.2.0
type LogGetSummaryResponse struct {
Status string `json:"status"`
Summary LogGetSummaryResponseSummary `json:"summary"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Status respjson.Field
Summary respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LogGetSummaryResponse) RawJSON ¶ added in v0.2.0
func (r LogGetSummaryResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*LogGetSummaryResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *LogGetSummaryResponse) UnmarshalJSON(data []byte) error
type LogGetSummaryResponseSummary ¶ added in v0.2.0
type LogGetSummaryResponseSummary struct {
// Usage breakdown by feature
ByFeature []LogGetSummaryResponseSummaryByFeature `json:"by_feature"`
// Total credits consumed in the period
TotalCredits float64 `json:"total_credits"`
// Total API requests made in the period
TotalRequests int64 `json:"total_requests"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ByFeature respjson.Field
TotalCredits respjson.Field
TotalRequests respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LogGetSummaryResponseSummary) RawJSON ¶ added in v0.2.0
func (r LogGetSummaryResponseSummary) RawJSON() string
Returns the unmodified JSON received from the API
func (*LogGetSummaryResponseSummary) UnmarshalJSON ¶ added in v0.2.0
func (r *LogGetSummaryResponseSummary) UnmarshalJSON(data []byte) error
type LogGetSummaryResponseSummaryByFeature ¶ added in v0.2.0
type LogGetSummaryResponseSummaryByFeature struct {
// Credits consumed by this feature
Credits float64 `json:"credits"`
// API feature name
Feature string `json:"feature"`
// Number of requests for this feature
Requests int64 `json:"requests"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Credits respjson.Field
Feature respjson.Field
Requests respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LogGetSummaryResponseSummaryByFeature) RawJSON ¶ added in v0.2.0
func (r LogGetSummaryResponseSummaryByFeature) RawJSON() string
Returns the unmodified JSON received from the API
func (*LogGetSummaryResponseSummaryByFeature) UnmarshalJSON ¶ added in v0.2.0
func (r *LogGetSummaryResponseSummaryByFeature) UnmarshalJSON(data []byte) error
type LogNewParams ¶ added in v0.2.0
type LogNewParams struct {
// End time filter (ISO 8601). Defaults to now.
EndTime param.Opt[time.Time] `json:"end_time,omitzero" format:"date-time"`
// Maximum number of logs to return
Limit param.Opt[int64] `json:"limit,omitzero"`
// Start time filter (ISO 8601). Defaults to 30 days ago.
StartTime param.Opt[time.Time] `json:"start_time,omitzero" format:"date-time"`
// contains filtered or unexported fields
}
func (LogNewParams) MarshalJSON ¶ added in v0.2.0
func (r LogNewParams) MarshalJSON() (data []byte, err error)
func (*LogNewParams) UnmarshalJSON ¶ added in v0.2.0
func (r *LogNewParams) UnmarshalJSON(data []byte) error
type LogNewResponse ¶ added in v0.2.0
type LogNewResponse struct {
// Number of logs returned
Count int64 `json:"count"`
Logs []LogNewResponseLog `json:"logs"`
Status string `json:"status"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Logs respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LogNewResponse) RawJSON ¶ added in v0.2.0
func (r LogNewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*LogNewResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *LogNewResponse) UnmarshalJSON(data []byte) error
type LogNewResponseLog ¶ added in v0.2.0
type LogNewResponseLog struct {
// Credits consumed for this request
Credits float64 `json:"credits"`
// API feature used
Feature string `json:"feature"`
// API endpoint path
Path string `json:"path"`
// Unique request identifier
RequestID string `json:"request_id"`
// HTTP response status code
StatusCode int64 `json:"status_code"`
// When the request was made
Timestamp time.Time `json:"timestamp" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Credits respjson.Field
Feature respjson.Field
Path respjson.Field
RequestID respjson.Field
StatusCode respjson.Field
Timestamp respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (LogNewResponseLog) RawJSON ¶ added in v0.2.0
func (r LogNewResponseLog) RawJSON() string
Returns the unmodified JSON received from the API
func (*LogNewResponseLog) UnmarshalJSON ¶ added in v0.2.0
func (r *LogNewResponseLog) UnmarshalJSON(data []byte) error
type LogService ¶ added in v0.2.0
type LogService struct {
Options []option.RequestOption
}
LogService 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 NewLogService method instead.
func NewLogService ¶ added in v0.2.0
func NewLogService(opts ...option.RequestOption) (r LogService)
NewLogService 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 (*LogService) GetSummary ¶ added in v0.2.0
func (r *LogService) GetSummary(ctx context.Context, body LogGetSummaryParams, opts ...option.RequestOption) (res *LogGetSummaryResponse, err error)
Get aggregated usage statistics grouped by feature.
Useful for understanding which API features are being used most and tracking usage trends.
func (*LogService) New ¶ added in v0.2.0
func (r *LogService) New(ctx context.Context, body LogNewParams, opts ...option.RequestOption) (res *LogNewResponse, err error)
Retrieve detailed API usage logs for your account.
Returns a list of API calls with timestamps, features used, status codes, and credits consumed. Useful for monitoring usage patterns and debugging.
type NsdlParseParams ¶ added in v0.2.0
type NsdlParseParams struct {
// Password for the PDF file (if required)
Password param.Opt[string] `json:"password,omitzero"`
// Base64 encoded CAS PDF file (required if pdf_url not provided)
PdfFile param.Opt[string] `json:"pdf_file,omitzero" format:"base64"`
// URL to the CAS PDF file (required if pdf_file not provided)
PdfURL param.Opt[string] `json:"pdf_url,omitzero" format:"uri"`
// contains filtered or unexported fields
}
func (NsdlParseParams) MarshalJSON ¶ added in v0.2.0
func (r NsdlParseParams) MarshalJSON() (data []byte, err error)
func (*NsdlParseParams) UnmarshalJSON ¶ added in v0.2.0
func (r *NsdlParseParams) UnmarshalJSON(data []byte) error
type NsdlService ¶ added in v0.2.0
type NsdlService struct {
Options []option.RequestOption
}
NsdlService 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 NewNsdlService method instead.
func NewNsdlService ¶ added in v0.2.0
func NewNsdlService(opts ...option.RequestOption) (r NsdlService)
NewNsdlService 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 (*NsdlService) Parse ¶ added in v0.2.0
func (r *NsdlService) Parse(ctx context.Context, body NsdlParseParams, 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.
type SmartParseCasPdfParams ¶ added in v0.2.0
type SmartParseCasPdfParams struct {
// Password for the PDF file (if required)
Password param.Opt[string] `json:"password,omitzero"`
// Base64 encoded CAS PDF file (required if pdf_url not provided)
PdfFile param.Opt[string] `json:"pdf_file,omitzero" format:"base64"`
// URL to the CAS PDF file (required if pdf_file not provided)
PdfURL param.Opt[string] `json:"pdf_url,omitzero" format:"uri"`
// contains filtered or unexported fields
}
func (SmartParseCasPdfParams) MarshalJSON ¶ added in v0.2.0
func (r SmartParseCasPdfParams) MarshalJSON() (data []byte, err error)
func (*SmartParseCasPdfParams) UnmarshalJSON ¶ added in v0.2.0
func (r *SmartParseCasPdfParams) UnmarshalJSON(data []byte) error
type SmartService ¶ added in v0.2.0
type SmartService struct {
Options []option.RequestOption
}
SmartService 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 NewSmartService method instead.
func NewSmartService ¶ added in v0.2.0
func NewSmartService(opts ...option.RequestOption) (r SmartService)
NewSmartService 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 (*SmartService) ParseCasPdf ¶ added in v0.2.0
func (r *SmartService) ParseCasPdf(ctx context.Context, body SmartParseCasPdfParams, 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 Transaction ¶ added in v0.2.0
type Transaction struct {
// Additional transaction-specific fields that vary by source
AdditionalInfo TransactionAdditionalInfo `json:"additional_info"`
// Transaction amount in currency (computed from units × price/NAV)
Amount float64 `json:"amount,nullable"`
// Balance units after transaction
Balance float64 `json:"balance"`
// Transaction date (YYYY-MM-DD)
Date time.Time `json:"date" format:"date"`
// Transaction description/particulars
Description string `json:"description"`
// Dividend rate (for DIVIDEND_PAYOUT transactions)
DividendRate float64 `json:"dividend_rate,nullable"`
Nav float64 `json:"nav,nullable"`
// Transaction type. Possible values are PURCHASE, PURCHASE_SIP, REDEMPTION,
// SWITCH_IN, SWITCH_IN_MERGER, SWITCH_OUT, SWITCH_OUT_MERGER, DIVIDEND_PAYOUT,
// DIVIDEND_REINVEST, SEGREGATION, STAMP_DUTY_TAX, TDS_TAX, STT_TAX, MISC,
// REVERSAL, UNKNOWN.
//
// Any of "PURCHASE", "PURCHASE_SIP", "REDEMPTION", "SWITCH_IN",
// "SWITCH_IN_MERGER", "SWITCH_OUT", "SWITCH_OUT_MERGER", "DIVIDEND_PAYOUT",
// "DIVIDEND_REINVEST", "SEGREGATION", "STAMP_DUTY_TAX", "TDS_TAX", "STT_TAX",
// "MISC", "REVERSAL", "UNKNOWN".
Type TransactionType `json:"type"`
// Number of units involved in transaction
Units float64 `json:"units"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AdditionalInfo respjson.Field
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:"-"`
}
Unified transaction schema for all holding types (MF folios, equities, bonds, etc.)
func (Transaction) RawJSON ¶ added in v0.2.0
func (r Transaction) RawJSON() string
Returns the unmodified JSON received from the API
func (*Transaction) UnmarshalJSON ¶ added in v0.2.0
func (r *Transaction) UnmarshalJSON(data []byte) error
type TransactionAdditionalInfo ¶ added in v0.2.0
type TransactionAdditionalInfo struct {
// Capital withdrawal amount (CDSL MF transactions)
CapitalWithdrawal float64 `json:"capital_withdrawal"`
// Units credited (demat transactions)
Credit float64 `json:"credit"`
// Units debited (demat transactions)
Debit float64 `json:"debit"`
// Income distribution amount (CDSL MF transactions)
IncomeDistribution float64 `json:"income_distribution"`
// Order/transaction reference number (demat transactions)
OrderNo string `json:"order_no"`
// Price per unit (NSDL/CDSL MF transactions)
Price float64 `json:"price"`
// Stamp duty charged
StampDuty float64 `json:"stamp_duty"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CapitalWithdrawal respjson.Field
Credit respjson.Field
Debit respjson.Field
IncomeDistribution respjson.Field
OrderNo respjson.Field
Price respjson.Field
StampDuty respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Additional transaction-specific fields that vary by source
func (TransactionAdditionalInfo) RawJSON ¶ added in v0.2.0
func (r TransactionAdditionalInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*TransactionAdditionalInfo) UnmarshalJSON ¶ added in v0.2.0
func (r *TransactionAdditionalInfo) UnmarshalJSON(data []byte) error
type TransactionType ¶ added in v0.2.0
type TransactionType string
Transaction type. Possible values are PURCHASE, PURCHASE_SIP, REDEMPTION, SWITCH_IN, SWITCH_IN_MERGER, SWITCH_OUT, SWITCH_OUT_MERGER, DIVIDEND_PAYOUT, DIVIDEND_REINVEST, SEGREGATION, STAMP_DUTY_TAX, TDS_TAX, STT_TAX, MISC, REVERSAL, UNKNOWN.
const ( TransactionTypePurchase TransactionType = "PURCHASE" TransactionTypePurchaseSip TransactionType = "PURCHASE_SIP" TransactionTypeRedemption TransactionType = "REDEMPTION" TransactionTypeSwitchIn TransactionType = "SWITCH_IN" TransactionTypeSwitchInMerger TransactionType = "SWITCH_IN_MERGER" TransactionTypeSwitchOut TransactionType = "SWITCH_OUT" TransactionTypeSwitchOutMerger TransactionType = "SWITCH_OUT_MERGER" TransactionTypeDividendPayout TransactionType = "DIVIDEND_PAYOUT" TransactionTypeDividendReinvest TransactionType = "DIVIDEND_REINVEST" TransactionTypeSegregation TransactionType = "SEGREGATION" TransactionTypeStampDutyTax TransactionType = "STAMP_DUTY_TAX" TransactionTypeTdsTax TransactionType = "TDS_TAX" TransactionTypeSttTax TransactionType = "STT_TAX" TransactionTypeMisc TransactionType = "MISC" TransactionTypeReversal TransactionType = "REVERSAL" TransactionTypeUnknown TransactionType = "UNKNOWN" )
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"`
// List of NPS accounts
Nps []UnifiedResponseNp `json:"nps"`
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
Nps 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"`
// List of account holders linked to this demat account
LinkedHolders []LinkedHolder `json:"linked_holders"`
// 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
LinkedHolders 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 UnifiedResponseDematAccountHoldingsAifAdditionalInfo `json:"additional_info"`
// ISIN code of the AIF
Isin string `json:"isin"`
// Name of the AIF
Name string `json:"name"`
// List of transactions for this holding (beta)
Transactions []Transaction `json:"transactions"`
// 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
Transactions 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 UnifiedResponseDematAccountHoldingsAifAdditionalInfo ¶ added in v0.1.0
type UnifiedResponseDematAccountHoldingsAifAdditionalInfo struct {
// Closing balance units for the statement period (beta)
CloseUnits float64 `json:"close_units,nullable"`
// Opening balance units for the statement period (beta)
OpenUnits float64 `json:"open_units,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CloseUnits respjson.Field
OpenUnits respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Additional information specific to the AIF
func (UnifiedResponseDematAccountHoldingsAifAdditionalInfo) RawJSON ¶ added in v0.1.0
func (r UnifiedResponseDematAccountHoldingsAifAdditionalInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseDematAccountHoldingsAifAdditionalInfo) UnmarshalJSON ¶ added in v0.1.0
func (r *UnifiedResponseDematAccountHoldingsAifAdditionalInfo) UnmarshalJSON(data []byte) error
type UnifiedResponseDematAccountHoldingsCorporateBond ¶
type UnifiedResponseDematAccountHoldingsCorporateBond struct {
// Additional information specific to the corporate bond
AdditionalInfo UnifiedResponseDematAccountHoldingsCorporateBondAdditionalInfo `json:"additional_info"`
// ISIN code of the corporate bond
Isin string `json:"isin"`
// Name of the corporate bond
Name string `json:"name"`
// List of transactions for this holding (beta)
Transactions []Transaction `json:"transactions"`
// 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
Transactions 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 UnifiedResponseDematAccountHoldingsCorporateBondAdditionalInfo ¶ added in v0.1.0
type UnifiedResponseDematAccountHoldingsCorporateBondAdditionalInfo struct {
// Closing balance units for the statement period (beta)
CloseUnits float64 `json:"close_units,nullable"`
// Opening balance units for the statement period (beta)
OpenUnits float64 `json:"open_units,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CloseUnits respjson.Field
OpenUnits respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Additional information specific to the corporate bond
func (UnifiedResponseDematAccountHoldingsCorporateBondAdditionalInfo) RawJSON ¶ added in v0.1.0
func (r UnifiedResponseDematAccountHoldingsCorporateBondAdditionalInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseDematAccountHoldingsCorporateBondAdditionalInfo) UnmarshalJSON ¶ added in v0.1.0
func (r *UnifiedResponseDematAccountHoldingsCorporateBondAdditionalInfo) UnmarshalJSON(data []byte) error
type UnifiedResponseDematAccountHoldingsDematMutualFund ¶
type UnifiedResponseDematAccountHoldingsDematMutualFund struct {
// Additional information specific to the mutual fund
AdditionalInfo UnifiedResponseDematAccountHoldingsDematMutualFundAdditionalInfo `json:"additional_info"`
// ISIN code of the mutual fund
Isin string `json:"isin"`
// Name of the mutual fund
Name string `json:"name"`
// List of transactions for this holding (beta)
Transactions []Transaction `json:"transactions"`
// 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
Transactions 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 UnifiedResponseDematAccountHoldingsDematMutualFundAdditionalInfo ¶ added in v0.1.0
type UnifiedResponseDematAccountHoldingsDematMutualFundAdditionalInfo struct {
// Closing balance units for the statement period (beta)
CloseUnits float64 `json:"close_units,nullable"`
// Opening balance units for the statement period (beta)
OpenUnits float64 `json:"open_units,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CloseUnits respjson.Field
OpenUnits respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Additional information specific to the mutual fund
func (UnifiedResponseDematAccountHoldingsDematMutualFundAdditionalInfo) RawJSON ¶ added in v0.1.0
func (r UnifiedResponseDematAccountHoldingsDematMutualFundAdditionalInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseDematAccountHoldingsDematMutualFundAdditionalInfo) UnmarshalJSON ¶ added in v0.1.0
func (r *UnifiedResponseDematAccountHoldingsDematMutualFundAdditionalInfo) UnmarshalJSON(data []byte) error
type UnifiedResponseDematAccountHoldingsEquity ¶
type UnifiedResponseDematAccountHoldingsEquity struct {
// Additional information specific to the equity
AdditionalInfo UnifiedResponseDematAccountHoldingsEquityAdditionalInfo `json:"additional_info"`
// ISIN code of the equity
Isin string `json:"isin"`
// Name of the equity
Name string `json:"name"`
// List of transactions for this holding (beta)
Transactions []Transaction `json:"transactions"`
// 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
Transactions 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 UnifiedResponseDematAccountHoldingsEquityAdditionalInfo ¶ added in v0.1.0
type UnifiedResponseDematAccountHoldingsEquityAdditionalInfo struct {
// Closing balance units for the statement period (beta)
CloseUnits float64 `json:"close_units,nullable"`
// Opening balance units for the statement period (beta)
OpenUnits float64 `json:"open_units,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CloseUnits respjson.Field
OpenUnits respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Additional information specific to the equity
func (UnifiedResponseDematAccountHoldingsEquityAdditionalInfo) RawJSON ¶ added in v0.1.0
func (r UnifiedResponseDematAccountHoldingsEquityAdditionalInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseDematAccountHoldingsEquityAdditionalInfo) UnmarshalJSON ¶ added in v0.1.0
func (r *UnifiedResponseDematAccountHoldingsEquityAdditionalInfo) UnmarshalJSON(data []byte) error
type UnifiedResponseDematAccountHoldingsGovernmentSecurity ¶
type UnifiedResponseDematAccountHoldingsGovernmentSecurity struct {
// Additional information specific to the government security
AdditionalInfo UnifiedResponseDematAccountHoldingsGovernmentSecurityAdditionalInfo `json:"additional_info"`
// ISIN code of the government security
Isin string `json:"isin"`
// Name of the government security
Name string `json:"name"`
// List of transactions for this holding (beta)
Transactions []Transaction `json:"transactions"`
// 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
Transactions 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 UnifiedResponseDematAccountHoldingsGovernmentSecurityAdditionalInfo ¶ added in v0.1.0
type UnifiedResponseDematAccountHoldingsGovernmentSecurityAdditionalInfo struct {
// Closing balance units for the statement period (beta)
CloseUnits float64 `json:"close_units,nullable"`
// Opening balance units for the statement period (beta)
OpenUnits float64 `json:"open_units,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CloseUnits respjson.Field
OpenUnits respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Additional information specific to the government security
func (UnifiedResponseDematAccountHoldingsGovernmentSecurityAdditionalInfo) RawJSON ¶ added in v0.1.0
func (r UnifiedResponseDematAccountHoldingsGovernmentSecurityAdditionalInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseDematAccountHoldingsGovernmentSecurityAdditionalInfo) UnmarshalJSON ¶ added in v0.1.0
func (r *UnifiedResponseDematAccountHoldingsGovernmentSecurityAdditionalInfo) 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"`
// List of account holders linked to this mutual fund folio
LinkedHolders []LinkedHolder `json:"linked_holders"`
// 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
LinkedHolders 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 []Transaction `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 for the statement period
CloseUnits float64 `json:"close_units,nullable"`
// Opening balance units for the statement period
OpenUnits float64 `json:"open_units,nullable"`
// 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 UnifiedResponseNp ¶ added in v0.1.0
type UnifiedResponseNp struct {
// Additional information specific to the NPS account
AdditionalInfo any `json:"additional_info"`
// Central Record Keeping Agency name
Cra string `json:"cra"`
Funds []UnifiedResponseNpFund `json:"funds"`
// List of account holders linked to this NPS account
LinkedHolders []LinkedHolder `json:"linked_holders"`
// Permanent Retirement Account Number (PRAN)
Pran string `json:"pran"`
// Total value of the NPS account
Value float64 `json:"value"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AdditionalInfo respjson.Field
Cra respjson.Field
Funds respjson.Field
LinkedHolders respjson.Field
Pran respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (UnifiedResponseNp) RawJSON ¶ added in v0.1.0
func (r UnifiedResponseNp) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseNp) UnmarshalJSON ¶ added in v0.1.0
func (r *UnifiedResponseNp) UnmarshalJSON(data []byte) error
type UnifiedResponseNpFund ¶ added in v0.1.0
type UnifiedResponseNpFund struct {
// Additional information specific to the NPS fund
AdditionalInfo UnifiedResponseNpFundAdditionalInfo `json:"additional_info"`
// Cost of investment
Cost float64 `json:"cost"`
// Name of the NPS fund
Name string `json:"name"`
Nav float64 `json:"nav"`
// 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
Name respjson.Field
Nav respjson.Field
Units respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (UnifiedResponseNpFund) RawJSON ¶ added in v0.1.0
func (r UnifiedResponseNpFund) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseNpFund) UnmarshalJSON ¶ added in v0.1.0
func (r *UnifiedResponseNpFund) UnmarshalJSON(data []byte) error
type UnifiedResponseNpFundAdditionalInfo ¶ added in v0.1.0
type UnifiedResponseNpFundAdditionalInfo struct {
// Fund manager name
Manager string `json:"manager"`
// NPS tier (Tier I or Tier II)
//
// Any of 1, 2.
Tier float64 `json:"tier,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Manager respjson.Field
Tier respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Additional information specific to the NPS fund
func (UnifiedResponseNpFundAdditionalInfo) RawJSON ¶ added in v0.1.0
func (r UnifiedResponseNpFundAdditionalInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseNpFundAdditionalInfo) UnmarshalJSON ¶ added in v0.1.0
func (r *UnifiedResponseNpFundAdditionalInfo) 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"`
Nps UnifiedResponseSummaryAccountsNps `json:"nps"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Demat respjson.Field
Insurance respjson.Field
MutualFunds respjson.Field
Nps 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
type UnifiedResponseSummaryAccountsNps ¶ added in v0.1.0
type UnifiedResponseSummaryAccountsNps struct {
// Number of NPS accounts
Count int64 `json:"count"`
// Total value of NPS 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 (UnifiedResponseSummaryAccountsNps) RawJSON ¶ added in v0.1.0
func (r UnifiedResponseSummaryAccountsNps) RawJSON() string
Returns the unmodified JSON received from the API
func (*UnifiedResponseSummaryAccountsNps) UnmarshalJSON ¶ added in v0.1.0
func (r *UnifiedResponseSummaryAccountsNps) UnmarshalJSON(data []byte) error
type VerifyTokenService ¶ added in v0.2.0
type VerifyTokenService struct {
Options []option.RequestOption
}
VerifyTokenService 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 NewVerifyTokenService method instead.
func NewVerifyTokenService ¶ added in v0.2.0
func NewVerifyTokenService(opts ...option.RequestOption) (r VerifyTokenService)
NewVerifyTokenService 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 (*VerifyTokenService) Verify ¶ added in v0.2.0
func (r *VerifyTokenService) Verify(ctx context.Context, opts ...option.RequestOption) (res *VerifyTokenVerifyResponse, err error)
Verify an access token and check if it's still valid. Useful for debugging token issues.
type VerifyTokenVerifyResponse ¶ added in v0.2.0
type VerifyTokenVerifyResponse struct {
// Error message (only shown if invalid)
Error string `json:"error"`
// Masked API key (only shown if valid)
MaskedAPIKey string `json:"masked_api_key"`
// Whether the token is valid
Valid bool `json:"valid"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Error respjson.Field
MaskedAPIKey respjson.Field
Valid respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (VerifyTokenVerifyResponse) RawJSON ¶ added in v0.2.0
func (r VerifyTokenVerifyResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*VerifyTokenVerifyResponse) UnmarshalJSON ¶ added in v0.2.0
func (r *VerifyTokenVerifyResponse) UnmarshalJSON(data []byte) error
Source Files
¶
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.22, 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.22, and used by the Go 1.24 encoding/json package. |
|
packages
|
|
|
shared
|
|