mirror of
https://github.com/jlengrand/adyen-node-api-library.git
synced 2026-03-10 08:01:20 +00:00
* PW-6846: Add Balance Platform to generator * PW-6846: Models * PW-6846: Add configuration options * PW-6846: Account holders * PW-6846: Add AccountHolders tests * PW-6846: Add query string parameters * PW-6846: Make `AccountHolder.id` optional The `AccountHolder.id` field is required at the specs level. It should be optional (or not exist) when sending an update request. * PW-6846: Add Balance accounts endpoints * PW-6846: General endpoints * PW-6846: Add Payment Instruments endpoints * PW-6846: Add Payment Instrument Groups endpoints * PW-6846: Add Transaction Rules endpoints * PW-6846: Fix linting issues
149 lines
5.9 KiB
TypeScript
149 lines
5.9 KiB
TypeScript
/*
|
|
* The version of the OpenAPI document: v2
|
|
* Contact: developer-experience@adyen.com
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
* https://openapi-generator.tech
|
|
* Do not edit this class manually.
|
|
*/
|
|
|
|
import { TransactionRuleEntityKey } from './transactionRuleEntityKey';
|
|
import { TransactionRuleInterval } from './transactionRuleInterval';
|
|
import { TransactionRuleRestrictions } from './transactionRuleRestrictions';
|
|
|
|
export class TransactionRule {
|
|
/**
|
|
* The level at which data must be accumulated, used in rules with `type` **velocity** or **maxUsage**. The level must be the [same or lower in hierarchy](https://docs.adyen.com/issuing/transaction-rules#accumulate-data) than the `entityKey`. If not provided, by default, the rule will accumulate data at the **paymentInstrument** level. Possible values: **paymentInstrument**, **paymentInstrumentGroup**, **balanceAccount**, **accountHolder**, **balancePlatform**.
|
|
*/
|
|
'aggregationLevel'?: string;
|
|
/**
|
|
* Your description for the transaction rule, maximum 300 characters.
|
|
*/
|
|
'description': string;
|
|
/**
|
|
* The date when the rule will stop being evaluated, in ISO 8601 extended offset date-time format. For example, **2020-12-18T10:15:30+01:00**. If not provided, the rule will be evaluated until the rule status is set to **inactive**.
|
|
*/
|
|
'endDate'?: string;
|
|
'entityKey': TransactionRuleEntityKey;
|
|
/**
|
|
* The unique identifier of the transaction rule.
|
|
*/
|
|
'id'?: string;
|
|
'interval': TransactionRuleInterval;
|
|
/**
|
|
* The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. If not provided, by default, this is set to **hardBlock**. Possible values: * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, the transaction is declined.
|
|
*/
|
|
'outcomeType'?: TransactionRule.OutcomeTypeEnum;
|
|
/**
|
|
* Your reference for the transaction rule, maximum 150 characters.
|
|
*/
|
|
'reference': string;
|
|
'ruleRestrictions': TransactionRuleRestrictions;
|
|
/**
|
|
* A positive or negative score applied to the transaction if it meets the conditions of the rule. Required when `outcomeType` is **scoreBased**. The value must be between **-100** and **100**.
|
|
*/
|
|
'score'?: number;
|
|
/**
|
|
* The date when the rule will start to be evaluated, in ISO 8601 extended offset date-time format. For example, **2020-12-18T10:15:30+01:00**. If not provided when creating a transaction rule, the `startDate` is set to the date when the rule status is set to **active**.
|
|
*/
|
|
'startDate'?: string;
|
|
/**
|
|
* The status of the transaction rule. If you provide a `startDate` in the request, the rule is automatically created with an **active** status. Possible values: **active**, **inactive**.
|
|
*/
|
|
'status'?: TransactionRule.StatusEnum;
|
|
/**
|
|
* The [type of rule](https://docs.adyen.com/issuing/transaction-rules#rule-types), which definesif a rule blocks transactions based on individual characteristics or accumulates data. Possible values: * **blockList**: decline a transaction when the conditions are met. * **maxUsage**: add the amount or number of transactions for the lifetime of a payment instrument, and then decline a transaction when the specified limits are met. * **velocity**: add the amount or number of transactions based on a specified time interval, and then decline a transaction when the specified limits are met.
|
|
*/
|
|
'type': TransactionRule.TypeEnum;
|
|
|
|
static discriminator: string | undefined = undefined;
|
|
|
|
static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [
|
|
{
|
|
"name": "aggregationLevel",
|
|
"baseName": "aggregationLevel",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "description",
|
|
"baseName": "description",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "endDate",
|
|
"baseName": "endDate",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "entityKey",
|
|
"baseName": "entityKey",
|
|
"type": "TransactionRuleEntityKey"
|
|
},
|
|
{
|
|
"name": "id",
|
|
"baseName": "id",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "interval",
|
|
"baseName": "interval",
|
|
"type": "TransactionRuleInterval"
|
|
},
|
|
{
|
|
"name": "outcomeType",
|
|
"baseName": "outcomeType",
|
|
"type": "TransactionRule.OutcomeTypeEnum"
|
|
},
|
|
{
|
|
"name": "reference",
|
|
"baseName": "reference",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "ruleRestrictions",
|
|
"baseName": "ruleRestrictions",
|
|
"type": "TransactionRuleRestrictions"
|
|
},
|
|
{
|
|
"name": "score",
|
|
"baseName": "score",
|
|
"type": "number"
|
|
},
|
|
{
|
|
"name": "startDate",
|
|
"baseName": "startDate",
|
|
"type": "string"
|
|
},
|
|
{
|
|
"name": "status",
|
|
"baseName": "status",
|
|
"type": "TransactionRule.StatusEnum"
|
|
},
|
|
{
|
|
"name": "type",
|
|
"baseName": "type",
|
|
"type": "TransactionRule.TypeEnum"
|
|
} ];
|
|
|
|
static getAttributeTypeMap() {
|
|
return TransactionRule.attributeTypeMap;
|
|
}
|
|
}
|
|
|
|
export namespace TransactionRule {
|
|
export enum OutcomeTypeEnum {
|
|
HardBlock = <any> 'hardBlock',
|
|
ScoreBased = <any> 'scoreBased'
|
|
}
|
|
export enum StatusEnum {
|
|
Active = <any> 'active',
|
|
Inactive = <any> 'inactive'
|
|
}
|
|
export enum TypeEnum {
|
|
AllowList = <any> 'allowList',
|
|
BlockList = <any> 'blockList',
|
|
MaxUsage = <any> 'maxUsage',
|
|
Velocity = <any> 'velocity'
|
|
}
|
|
}
|