-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMandateInfo.php
73 lines (67 loc) · 1.84 KB
/
MandateInfo.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
namespace PayWay;
class MandateInfo {
public $mandateID;
public $contractID;
public $sequenceType;
public $frequency;
public $durationStartDate;
public $durationEndDate;
public $firstCollectionDate;
public $finalCollectionDate;
public $maxAmount;
function __construct() {
}
public function toXml() {
$sb = "";
$sb .= "<mandateInfo>";
if ($this->mandateID != NULL) {
$sb .= "<mandateID><![CDATA[";
$sb .= $this->mandateID;
$sb .= "]]></mandateID>";
}
if ($this->contractID != NULL) {
$sb .= "<contractID><![CDATA[";
$sb .= $this->contractID;
$sb .= "]]></contractID>";
}
if ($this->sequenceType != NULL) {
$sb .= "<sequenceType><![CDATA[";
$sb .= $this->sequenceType;
$sb .= "]]></sequenceType>";
}
if ($this->frequency != NULL) {
$sb .= "<frequency><![CDATA[";
$sb .= $this->frequency;
$sb .= "]]></frequency>";
}
if ($this->durationStartDate != NULL) {
$sb .= "<durationStartDate><![CDATA[";
$sb .= IgfsUtils::formatXMLGregorianCalendar($this->durationStartDate);
$sb .= "]]></durationStartDate>";
}
if ($this->durationEndDate != NULL) {
$sb .= "<durationEndDate><![CDATA[";
$sb .= IgfsUtils::formatXMLGregorianCalendar($this->durationEndDate);
$sb .= "]]></durationEndDate>";
}
if ($this->firstCollectionDate != NULL) {
$sb .= "<firstCollectionDate><![CDATA[";
$sb .= IgfsUtils::formatXMLGregorianCalendar($this->firstCollectionDate);
$sb .= "]]></firstCollectionDate>";
}
if ($this->finalCollectionDate != NULL) {
$sb .= "<finalCollectionDate><![CDATA[";
$sb .= IgfsUtils::formatXMLGregorianCalendar($this->finalCollectionDate);
$sb .= "]]></finalCollectionDate>";
}
if ($this->maxAmount != NULL) {
$sb .= "<maxAmount><![CDATA[";
$sb .= $this->maxAmount;
$sb .= "]]></maxAmount>";
}
$sb .= "</mandateInfo>";
return $sb;
}
}
?>