Adisyon Bildirim Kuralı Oluşturur
Last updated
Last updated
var options = new RestClientOptions("//ebill/Notification")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Post);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {{bearerToken}}");
var body = @"{" + "\n" +
@" ""NotificationDto"": {" + "\n" +
@" ""ID"": ""<integer>""," + "\n" +
@" ""RuleName"": ""<string>""," + "\n" +
@" ""Rules"": [" + "\n" +
@" {" + "\n" +
@" ""Property"": ""PayableAmount""," + "\n" +
@" ""Operator"": ""Between""," + "\n" +
@" ""ValueFirst"": ""<string>""," + "\n" +
@" ""ValueSecond"": ""<string>""" + "\n" +
@" }," + "\n" +
@" {" + "\n" +
@" ""Property"": ""PayableAmount""," + "\n" +
@" ""Operator"": ""SmallOrEqual""," + "\n" +
@" ""ValueFirst"": ""<string>""," + "\n" +
@" ""ValueSecond"": ""<string>""" + "\n" +
@" }" + "\n" +
@" ]," + "\n" +
@" ""Contact"": [" + "\n" +
@" {" + "\n" +
@" ""NotificationValue"": ""<string>""," + "\n" +
@" ""NotificationValueType"": ""Mail""" + "\n" +
@" }," + "\n" +
@" {" + "\n" +
@" ""NotificationValue"": ""<string>""," + "\n" +
@" ""NotificationValueType"": ""Sms""" + "\n" +
@" }" + "\n" +
@" ]," + "\n" +
@" ""IsActive"": ""<boolean>""" + "\n" +
@" }" + "\n" +
@"}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => '//ebill/Notification',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"NotificationDto": {
"ID": "<integer>",
"RuleName": "<string>",
"Rules": [
{
"Property": "PayableAmount",
"Operator": "Between",
"ValueFirst": "<string>",
"ValueSecond": "<string>"
},
{
"Property": "PayableAmount",
"Operator": "SmallOrEqual",
"ValueFirst": "<string>",
"ValueSecond": "<string>"
}
],
"Contact": [
{
"NotificationValue": "<string>",
"NotificationValueType": "Mail"
},
{
"NotificationValue": "<string>",
"NotificationValueType": "Sms"
}
],
"IsActive": "<boolean>"
}
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Accept: application/json',
'Authorization: Bearer {{bearerToken}}'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
const axios = require('axios');
let data = JSON.stringify({
"NotificationDto": {
"ID": "<integer>",
"RuleName": "<string>",
"Rules": [
{
"Property": "PayableAmount",
"Operator": "Between",
"ValueFirst": "<string>",
"ValueSecond": "<string>"
},
{
"Property": "PayableAmount",
"Operator": "SmallOrEqual",
"ValueFirst": "<string>",
"ValueSecond": "<string>"
}
],
"Contact": [
{
"NotificationValue": "<string>",
"NotificationValueType": "Mail"
},
{
"NotificationValue": "<string>",
"NotificationValueType": "Sms"
}
],
"IsActive": "<boolean>"
}
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: '//ebill/Notification',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer {{bearerToken}}'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
EAdisyon bildirim kuralı oluşturmak için bu ucu kullanabilirsiniz.
POST /ebill/Notification HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 248
{
"NotificationDto": {
"ID": 1,
"RuleName": "text",
"Rules": [
{
"Property": "DocumentProfile",
"Operator": "GreaterOrEqual",
"ValueFirst": "text",
"ValueSecond": "text"
}
],
"Contact": [
{
"NotificationValue": "text",
"NotificationValueType": "Whatsapp"
}
],
"IsActive": true
}
}
true