-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbody.go
144 lines (137 loc) · 6.22 KB
/
body.go
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
package main
// ObtenerClienteBody used on the show client request
const ObtenerClienteBody = `<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="https://plazavip.clarodrive.com/dla/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:obtenerCliente>
<id xsi:type="xsd:int">%s</id>
</ns1:obtenerCliente>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>`
// ActualizarClienteBody used on the update client request
const ActualizarClienteBody = `<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="https://plazavip.clarodrive.com/dla/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:actualizaCliente>
<info xsi:type="xsd:string">
<peticion>
<id>%s</id>
<nombre>%s</nombre>
<apellidoPaterno>%s</apellidoPaterno>
<email>%s</email>
<telefonoTelmex>%s</telefonoTelmex>
<formaPago>%s</formaPago>
</peticion>
</info>
</ns1:actualizaCliente>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>`
// AdicionarClienteBody used on the add client
const AdicionarClienteBody = `<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="https://plazavip.clarodrive.com/dla/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:altaCliente>
<info xsi:type="xsd:string">
<peticion>
<id>%s</id>
<nombre>%s</nombre>
<apellidoPaterno>%s</apellidoPaterno>
<email>%s</email>
<telefonoTelmex>%s</telefonoTelmex>
<formaPago>%s</formaPago>
</peticion>
</info>
</ns1:altaCliente>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>`
// BorrarClienteBody used on the borrar cliente
const BorrarClienteBody = `<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://dla.d.iliux.com/dla/soap/">
<soapenv:Header/>
<soapenv:Body>
<soap:borrarCliente soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<id xsi:type="xsd:int">%s</id>
</soap:borrarCliente>
</soapenv:Body>
</soapenv:Envelope>`
// AddSubscriptionBody used on the add subscription
const AddSubscriptionBody = `<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="https://plazavip.clarodrive.com/dla/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:altaSuscripcionCliente>
<info xsi:type="xsd:string">
<peticion>
<idSuscripcion><![CDATA[%s]]></idSuscripcion>
<nombre><![CDATA[%s]]></nombre>
<item><![CDATA[%s]]></item>
<leyenda><![CDATA[%s]]></leyenda>
<idCliente><![CDATA[%s]]></idCliente>
<fechaInicio><![CDATA[%s]]></fechaInicio>
<fechaInicioCiclo><![CDATA[%s]]></fechaInicioCiclo>
<idPago><![CDATA[%s]]></idPago>
<billingPeriodo><![CDATA[MES]]></billingPeriodo>
<billingFrecuencia><![CDATA[1]]></billingFrecuencia>
<billingCiclo><![CDATA[0]]></billingCiclo>
<billingPrecio><![CDATA[0]]></billingPrecio>
<codigoPromo><![CDATA[%s]]></codigoPromo>
<trialPeriodo><![CDATA[MES]]></trialPeriodo>
<trialFrecuencia><![CDATA[0]]></trialFrecuencia>
<trialCiclo><![CDATA[0]]></trialCiclo>
<trialPrecio><![CDATA[0]]></trialPrecio>
</peticion>
</info>
</ns1:altaSuscripcionCliente>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>`
// CancelarSubscription is the body for removing subscription
const CancelarSubscription = `<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="https://plazavip.clarodrive.com/dla/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:cancelaSuscripcionCliente>
<info xsi:type="xsd:string">
<peticion>
<idCliente>
<![CDATA[%s]]>
</idCliente>
<idSuscripcion>
<![CDATA[%s]]>
</idSuscripcion>
</peticion>
</info>
</ns1:cancelaSuscripcionCliente>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>`
const SendEmailBody = `{
"service": "CLARODRIVE",
"region": "MX",
"type": "%s",
"email": "%s",
"user_id": "%s",
"variables": {
"email": "%s",
"last_active_date": "26/05/2021"
},
"extras": {
"subject": "Actualiza tu información de pago"
},
"dryrun": false
}`