๐Ÿ  Home > ๐Ÿ“ฆ TaskService > ๐Ÿ“‹ TaskAddNewP

TaskAddNewP

Description

Create a task with renewal control. Invisible if not mini. purse - purse or purse type (first character) periodicity: 0 - one-time, 2 - weekly, 3 - monthly dayofmonth: day of the month on which a monthly task must be completed dayofweek, hour: day of the week and hour on which a weekly task must be completed signature string: string.Format("{0};{1};{2};{3:yyyyMMdd HH:mm};{4:0.00};{5:0.00};{6};{7};{8};{9};{10};{11}", wmid_mast, wmid_exec, wmid_insp, term, amount_exec, amount_insp, purse, periodicity, dayofmonth, dayofweek, hour, Secret)

Method Signature

public Int32 TaskAddNewP(
    String ServiceName,
    String Sign,
    String wmid_mast,
    String wmid_exec,
    String wmid_insp,
    DateTime term,
    String title,
    Decimal amount_exec,
    Decimal amount_insp,
    String purse,
    Int32 periodicity,
    Int32 dayofmonth,
    Int32 dayofweek,
    Int32 hour,
    out Int32 task_id
)

Parameters

ServiceName

  • Type: String
  • Direction: input

Sign

  • Type: String
  • Direction: input

wmid_mast

  • Type: String
  • Direction: input

wmid_exec

  • Type: String
  • Direction: input

wmid_insp

  • Type: String
  • Direction: input

term

  • Type: DateTime
  • Direction: input

title

  • Type: String
  • Direction: input

amount_exec

  • Type: Decimal
  • Direction: input

amount_insp

  • Type: Decimal
  • Direction: input

purse

  • Type: String
  • Direction: input
  • Description: purse or purse type (first character)

periodicity

  • Type: Int32
  • Direction: input

dayofmonth

  • Type: Int32
  • Direction: input

dayofweek

  • Type: Int32
  • Direction: input

hour

  • Type: Int32
  • Direction: input

task_id

  • Type: Int32
  • Direction: output

Return Value

  • Type: Int32

Authentication

This method requires authentication signature.

Signature String Format

string.Format("{0};{1};{2};{3:yyyyMMdd HH:mm};{4:0.00};{5:0.00};{6};{7};{8};{9};{10};{11}", wmid_mast, wmid_exec, wmid_insp, term, amount_exec, amount_insp, purse, periodicity, dayofmonth, dayofweek, hour, Secret)

SOAP Request Example

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns:xsd="http://www.w3.org/2001/XMLSchema"
               xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <TaskAddNewP xmlns="http://mentor.web.money/taskservice">
      <ServiceName>ServiceName</ServiceName>
      <Sign>base64signature</Sign>
      <wmid_mast>123456789012</wmid_mast>
      <wmid_exec>123456789012</wmid_exec>
      <wmid_insp>123456789012</wmid_insp>
      <term>2024-01-01T00:00:00</term>
      <title>string_value</title>
      <amount_exec>100.00</amount_exec>
      <amount_insp>100.00</amount_insp>
      <purse>R000000000000</purse>
      <periodicity>123</periodicity>
      <dayofmonth>123</dayofmonth>
      <dayofweek>123</dayofweek>
      <hour>123</hour>
    </TaskAddNewP>
  </soap:Body>
</soap:Envelope>

SOAP Response Example

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <TaskAddNewPResponse xmlns="http://tempuri.org/">
      <TaskAddNewPResult>123</TaskAddNewPResult>
      <task_id>123</task_id>
    </TaskAddNewPResponse>
  </soap:Body>
</soap:Envelope>

Code Examples

C# Example

var client = new TaskService();
String ServiceName = "sample string";
String Sign = "base64signature";
String wmid_mast = "123456789012";
String wmid_exec = "123456789012";
String wmid_insp = "123456789012";
DateTime term = DateTime.Now;
String title = "sample string";
Decimal amount_exec = 100.00m;
Decimal amount_insp = 100.00m;
String purse = "R000000000000";
Int32 periodicity = 123;
Int32 dayofmonth = 123;
Int32 dayofweek = 123;
Int32 hour = 123;
Int32 task_id;

var result = client.TaskAddNewP(ServiceName, Sign, wmid_mast, wmid_exec, wmid_insp, term, title, amount_exec, amount_insp, purse, periodicity, dayofmonth, dayofweek, hour, out task_id);

Python Example (using zeep)

from zeep import Client

client = Client('https://your-service.com/TaskService.asmx?WSDL')

# Prepare parameters
ServiceName = 'sample string'
Sign = 'base64signature'
wmid_mast = '123456789012'
wmid_exec = '123456789012'
wmid_insp = '123456789012'
term = datetime.now()
title = 'sample string'
amount_exec = 100.00
amount_insp = 100.00
purse = 'sample string'
periodicity = 123
dayofmonth = 123
dayofweek = 123
hour = 123

result = client.service.TaskAddNewP(ServiceName, Sign, wmid_mast, wmid_exec, wmid_insp, term, title, amount_exec, amount_insp, purse, periodicity, dayofmonth, dayofweek, hour)
print(result)

JavaScript Example (using axios)

const axios = require('axios');

const soapRequest = `
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <TaskAddNewP xmlns="http://mentor.web.money/taskservice">
      <ServiceName>${ServiceName}</ServiceName>
      <Sign>${Sign}</Sign>
      <wmid_mast>${wmid_mast}</wmid_mast>
      <wmid_exec>${wmid_exec}</wmid_exec>
      <wmid_insp>${wmid_insp}</wmid_insp>
      <term>${term}</term>
      <title>${title}</title>
      <amount_exec>${amount_exec}</amount_exec>
      <amount_insp>${amount_insp}</amount_insp>
      <purse>${purse}</purse>
      <periodicity>${periodicity}</periodicity>
      <dayofmonth>${dayofmonth}</dayofmonth>
      <dayofweek>${dayofweek}</dayofweek>
      <hour>${hour}</hour>
    </TaskAddNewP>
  </soap:Body>
</soap:Envelope>`;

async function call() {
  const response = await axios.post(
  'https://mentor.web.moneyTaskService.asmx',
  soapRequest,
  {
    headers: {
      'Content-Type': 'text/xml; charset=utf-8',
      'SOAPAction': '"http://mentor.web.money/taskservice/TaskAddNewP"'
    }
  }
);

  console.log(response.data);
}
call().catch(console.error);

โฌ†๏ธ Back to TaskService | ๐Ÿ  Documentation Home | ๐Ÿ’ป Code Examples

results matching ""

    No results matching ""