Skip to content

Latest commit

 

History

History
226 lines (166 loc) · 7.68 KB

TransactionRulesApi.md

File metadata and controls

226 lines (166 loc) · 7.68 KB

TransactionRulesApi

All URIs are relative to https://balanceplatform-api-test.adyen.com/bcl/v2

Method HTTP request Description
deleteTransactionRulesTransactionRuleId DELETE /transactionRules/{transactionRuleId} Delete a transaction rule
getTransactionRulesTransactionRuleId GET /transactionRules/{transactionRuleId} Get a transaction rule
patchTransactionRulesTransactionRuleId PATCH /transactionRules/{transactionRuleId} Update a transaction rule
postTransactionRules POST /transactionRules Create a transaction rule

deleteTransactionRulesTransactionRuleId

TransactionRule deleteTransactionRulesTransactionRuleId(transactionRuleId)

Delete a transaction rule

Deletes a transaction rule.

Example

// Import classes:
//import com.adyen.client.infrastructure.*
//import com.adyen.model.balanceplatform.*

val apiInstance = TransactionRulesApi()
val transactionRuleId : kotlin.String = transactionRuleId_example // kotlin.String | The unique identifier of the transaction rule.
try {
    val result : TransactionRule = apiInstance.deleteTransactionRulesTransactionRuleId(transactionRuleId)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling TransactionRulesApi#deleteTransactionRulesTransactionRuleId")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling TransactionRulesApi#deleteTransactionRulesTransactionRuleId")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
transactionRuleId kotlin.String The unique identifier of the transaction rule.

Return type

TransactionRule

Authorization

Configure ApiKeyAuth: ApiClient.apiKey["X-API-Key"] = "" ApiClient.apiKeyPrefix["X-API-Key"] = "" Configure BasicAuth: ApiClient.username = "" ApiClient.password = ""

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getTransactionRulesTransactionRuleId

TransactionRuleResponse getTransactionRulesTransactionRuleId(transactionRuleId)

Get a transaction rule

Returns the details of a transaction rule.

Example

// Import classes:
//import com.adyen.client.infrastructure.*
//import com.adyen.model.balanceplatform.*

val apiInstance = TransactionRulesApi()
val transactionRuleId : kotlin.String = transactionRuleId_example // kotlin.String | The unique identifier of the transaction rule.
try {
    val result : TransactionRuleResponse = apiInstance.getTransactionRulesTransactionRuleId(transactionRuleId)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling TransactionRulesApi#getTransactionRulesTransactionRuleId")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling TransactionRulesApi#getTransactionRulesTransactionRuleId")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
transactionRuleId kotlin.String The unique identifier of the transaction rule.

Return type

TransactionRuleResponse

Authorization

Configure ApiKeyAuth: ApiClient.apiKey["X-API-Key"] = "" ApiClient.apiKeyPrefix["X-API-Key"] = "" Configure BasicAuth: ApiClient.username = "" ApiClient.password = ""

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

patchTransactionRulesTransactionRuleId

TransactionRule patchTransactionRulesTransactionRuleId(transactionRuleId, transactionRuleInfo)

Update a transaction rule

Updates a transaction rule. * To update only the status of a transaction rule, send only the `status` parameter. All other parameters not provided in the request are left unchanged. * When updating any other parameter, you need to send all existing resource parameters. If you omit a parameter in the request, that parameter is removed from the resource.

Example

// Import classes:
//import com.adyen.client.infrastructure.*
//import com.adyen.model.balanceplatform.*

val apiInstance = TransactionRulesApi()
val transactionRuleId : kotlin.String = transactionRuleId_example // kotlin.String | The unique identifier of the transaction rule.
val transactionRuleInfo : TransactionRuleInfo =  // TransactionRuleInfo | 
try {
    val result : TransactionRule = apiInstance.patchTransactionRulesTransactionRuleId(transactionRuleId, transactionRuleInfo)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling TransactionRulesApi#patchTransactionRulesTransactionRuleId")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling TransactionRulesApi#patchTransactionRulesTransactionRuleId")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
transactionRuleId kotlin.String The unique identifier of the transaction rule.
transactionRuleInfo TransactionRuleInfo [optional]

Return type

TransactionRule

Authorization

Configure ApiKeyAuth: ApiClient.apiKey["X-API-Key"] = "" ApiClient.apiKeyPrefix["X-API-Key"] = "" Configure BasicAuth: ApiClient.username = "" ApiClient.password = ""

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

postTransactionRules

TransactionRule postTransactionRules(transactionRuleInfo)

Create a transaction rule

Creates a transaction rule. When your user makes a transaction with their Adyen-issued card, the transaction is allowed or declined based on the conditions and outcome defined in the transaction rule. You can apply the transaction rule to several cards, such as all the cards in your platform, or to a specific card. For use cases, see examples.

Example

// Import classes:
//import com.adyen.client.infrastructure.*
//import com.adyen.model.balanceplatform.*

val apiInstance = TransactionRulesApi()
val transactionRuleInfo : TransactionRuleInfo =  // TransactionRuleInfo | 
try {
    val result : TransactionRule = apiInstance.postTransactionRules(transactionRuleInfo)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling TransactionRulesApi#postTransactionRules")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling TransactionRulesApi#postTransactionRules")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
transactionRuleInfo TransactionRuleInfo [optional]

Return type

TransactionRule

Authorization

Configure ApiKeyAuth: ApiClient.apiKey["X-API-Key"] = "" ApiClient.apiKeyPrefix["X-API-Key"] = "" Configure BasicAuth: ApiClient.username = "" ApiClient.password = ""

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json