@apicart/payments-sdk
Version:
Apicart SDK for payment gateways integration
71 lines (54 loc) • 966 B
text/typescript
export default class PaymentGateway
{
private _code: string
private _enabled: boolean;
private _id: number | string;
private _name: string
constructor(
code: string,
enabled: boolean,
id: number | string,
name: string
) {
this._code = code;
this._enabled = enabled;
this._id = id;
this._name = name;
}
public getCode(): string
{
return this._code;
}
public setCode(code: string): void
{
this._code = code;
}
public isEnabled(): boolean
{
return this._enabled;
}
public setEnabled(enabled: boolean): void
{
this._enabled = enabled;
}
public getId(): number | string
{
return this._id;
}
public setId(id: number | string): void
{
this._id = id;
}
public getName(): string
{
return this._name;
}
public setName(name: string): void
{
this._name = name;
}
public static deserialize(data: any): PaymentGateway
{
return new PaymentGateway(data.code, data.enabled, data.id, data.name);
}
}