Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.8.0"
".": "0.9.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 21
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser/cas-parser-902b4d5af31c8c6bab33a08d9cea10f3444be221abf735466eb9fd58a14e0a87.yml
openapi_spec_hash: e333f46097f3a3a452cb4d6564a3db67
configured_endpoints: 20
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/cas-parser/cas-parser-26d0931f3488af784c16303683cbf24225c727615fd32ee071144974e7c59670.yml
openapi_spec_hash: 242a5f4d982645a25e0d66ef088940a5
config_hash: 5509bb7a961ae2e79114b24c381606d4
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 0.9.0 (2026-07-26)

Full Changelog: [v0.8.0...v0.9.0](https://github.com/CASParser/cas-parser-php/compare/v0.8.0...v0.9.0)

### Features

* **api:** api update ([74ea130](https://github.com/CASParser/cas-parser-php/commit/74ea13048096a010f9127891ab0281fc56ca1401))

## 0.8.0 (2026-07-18)

Full Changelog: [v0.7.0...v0.8.0](https://github.com/CASParser/cas-parser-php/compare/v0.7.0...v0.8.0)
Expand Down
168 changes: 0 additions & 168 deletions src/Kfintech/KfintechGenerateCasParams.php

This file was deleted.

62 changes: 0 additions & 62 deletions src/Kfintech/KfintechGenerateCasResponse.php

This file was deleted.

31 changes: 1 addition & 30 deletions src/ServiceContracts/KfintechContract.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,4 @@

namespace CasParser\ServiceContracts;

use CasParser\Core\Exceptions\APIException;
use CasParser\Kfintech\KfintechGenerateCasResponse;
use CasParser\RequestOptions;

/**
* @phpstan-import-type RequestOpts from \CasParser\RequestOptions
*/
interface KfintechContract
{
/**
* @api
*
* @param string $email Email address to receive the CAS document
* @param string $fromDate Start date (YYYY-MM-DD)
* @param string $password Password for the PDF
* @param string $toDate End date (YYYY-MM-DD)
* @param string $panNo PAN number (optional)
* @param RequestOpts|null $requestOptions
*
* @throws APIException
*/
public function generateCas(
string $email,
string $fromDate,
string $password,
string $toDate,
?string $panNo = null,
RequestOptions|array|null $requestOptions = null,
): KfintechGenerateCasResponse;
}
interface KfintechContract {}
27 changes: 1 addition & 26 deletions src/ServiceContracts/KfintechRawContract.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,4 @@

namespace CasParser\ServiceContracts;

use CasParser\Core\Contracts\BaseResponse;
use CasParser\Core\Exceptions\APIException;
use CasParser\Kfintech\KfintechGenerateCasParams;
use CasParser\Kfintech\KfintechGenerateCasResponse;
use CasParser\RequestOptions;

/**
* @phpstan-import-type RequestOpts from \CasParser\RequestOptions
*/
interface KfintechRawContract
{
/**
* @api
*
* @param array<string,mixed>|KfintechGenerateCasParams $params
* @param RequestOpts|null $requestOptions
*
* @return BaseResponse<KfintechGenerateCasResponse>
*
* @throws APIException
*/
public function generateCas(
array|KfintechGenerateCasParams $params,
RequestOptions|array|null $requestOptions = null,
): BaseResponse;
}
interface KfintechRawContract {}
50 changes: 0 additions & 50 deletions src/Services/KfintechRawService.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,63 +5,13 @@
namespace CasParser\Services;

use CasParser\Client;
use CasParser\Core\Contracts\BaseResponse;
use CasParser\Core\Exceptions\APIException;
use CasParser\Kfintech\KfintechGenerateCasParams;
use CasParser\Kfintech\KfintechGenerateCasResponse;
use CasParser\RequestOptions;
use CasParser\ServiceContracts\KfintechRawContract;

/**
* Endpoints for generating new CAS documents via email mailback (KFintech).
*
* @phpstan-import-type RequestOpts from \CasParser\RequestOptions
*/
final class KfintechRawService implements KfintechRawContract
{
// @phpstan-ignore-next-line
/**
* @internal
*/
public function __construct(private Client $client) {}

/**
* @api
*
* 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`).
*
* @param array{
* email: string,
* fromDate: string,
* password: string,
* toDate: string,
* panNo?: string,
* }|KfintechGenerateCasParams $params
* @param RequestOpts|null $requestOptions
*
* @return BaseResponse<KfintechGenerateCasResponse>
*
* @throws APIException
*/
public function generateCas(
array|KfintechGenerateCasParams $params,
RequestOptions|array|null $requestOptions = null,
): BaseResponse {
[$parsed, $options] = KfintechGenerateCasParams::parseRequest(
$params,
$requestOptions,
);

// @phpstan-ignore-next-line return.type
return $this->client->request(
method: 'post',
path: 'v4/kfintech/generate',
body: (object) $parsed,
options: $options,
convert: KfintechGenerateCasResponse::class,
);
}
}
Loading