Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(deps-dev): Bump @seamapi/types from 1.313.0 to 1.315.0 in the seam group #234

Merged
merged 2 commits into from
Dec 17, 2024
Merged
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
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"devDependencies": {
"@prettier/plugin-php": "^0.22.1",
"@seamapi/nextlove-sdk-generator": "1.14.17",
"@seamapi/types": "1.313.0",
"@seamapi/types": "1.315.0",
"del": "^7.1.0",
"prettier": "^3.0.0"
}
Expand Down
106 changes: 106 additions & 0 deletions src/SeamClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -1509,6 +1509,112 @@ public function scan_credential(
}
}

class AcsEncodersSimulateClient
{
private SeamClient $seam;

public function __construct(SeamClient $seam)
{
$this->seam = $seam;
}

public function next_credential_encode_will_fail(
string $acs_encoder_id,
string $error_code = null,
string $acs_credential_id = null
): void {
$request_payload = [];

if ($acs_encoder_id !== null) {
$request_payload["acs_encoder_id"] = $acs_encoder_id;
}
if ($error_code !== null) {
$request_payload["error_code"] = $error_code;
}
if ($acs_credential_id !== null) {
$request_payload["acs_credential_id"] = $acs_credential_id;
}

$this->seam->request(
"POST",
"/acs/encoders/simulate/next_credential_encode_will_fail",
json: $request_payload
);
}

public function next_credential_encode_will_succeed(
string $acs_encoder_id,
string $scenario = null
): void {
$request_payload = [];

if ($acs_encoder_id !== null) {
$request_payload["acs_encoder_id"] = $acs_encoder_id;
}
if ($scenario !== null) {
$request_payload["scenario"] = $scenario;
}

$this->seam->request(
"POST",
"/acs/encoders/simulate/next_credential_encode_will_succeed",
json: $request_payload
);
}

public function next_credential_scan_will_fail(
string $acs_encoder_id,
string $error_code = null,
string $acs_credential_id_on_seam = null
): void {
$request_payload = [];

if ($acs_encoder_id !== null) {
$request_payload["acs_encoder_id"] = $acs_encoder_id;
}
if ($error_code !== null) {
$request_payload["error_code"] = $error_code;
}
if ($acs_credential_id_on_seam !== null) {
$request_payload[
"acs_credential_id_on_seam"
] = $acs_credential_id_on_seam;
}

$this->seam->request(
"POST",
"/acs/encoders/simulate/next_credential_scan_will_fail",
json: $request_payload
);
}

public function next_credential_scan_will_succeed(
string $acs_encoder_id,
string $acs_credential_id_on_seam = null,
string $scenario = null
): void {
$request_payload = [];

if ($acs_encoder_id !== null) {
$request_payload["acs_encoder_id"] = $acs_encoder_id;
}
if ($acs_credential_id_on_seam !== null) {
$request_payload[
"acs_credential_id_on_seam"
] = $acs_credential_id_on_seam;
}
if ($scenario !== null) {
$request_payload["scenario"] = $scenario;
}

$this->seam->request(
"POST",
"/acs/encoders/simulate/next_credential_scan_will_succeed",
json: $request_payload
);
}
}

class AcsEntrancesClient
{
private SeamClient $seam;
Expand Down
Loading