44-- The version of the OpenAPI document: 1.1.0
55-- Contact: support@interserver.net
66--
7- -- NOTE: This package is auto generated by OpenAPI-Generator 6.6.0 .
7+ -- NOTE: This package is auto generated by OpenAPI-Generator 8.0.0-SNAPSHOT .
88-- https://openapi-generator.tech
99-- Do not edit the class manually.
1010
1111pragma Warnings (Off, " *is not referenced" );
1212with Swagger.Streams ;
1313package body .Clients is
14- pragma Style_Checks (" -mr" );
14+ pragma Style_Checks (" -bmrIu" );
15+
16+ Mime_1 : aliased constant String := " multipart/form-data" ;
17+ Media_List_1 : constant Swagger.Mime_List := (
18+ 1 => Swagger.Mime_Json );
19+ Media_List_2 : constant Swagger.Mime_List := (
20+ 1 => Swagger.Mime_Form,
21+
22+ 2 => Swagger.Mime_Json );
23+ Media_List_3 : constant Swagger.Mime_List := (
24+ 1 => Swagger.Mime_Json,
25+
26+ 2 => Mime_1'Access );
27+
1528
1629 -- Creates a new email deny rule.
1730 -- Adds a new email deny rule into the system to block new emails that match the given criteria
@@ -25,8 +38,9 @@ package body .Clients is
2538 Req : Swagger.Clients.Request_Type;
2639 Reply : Swagger.Value_Type;
2740 begin
28- Client.Set_Accept ((1 => Swagger.Clients.APPLICATION_JSON));
29- Client.Initialize (Req, (1 => Swagger.Clients.APPLICATION_FORM));
41+ Client.Set_Accept (Media_List_1);
42+
43+ Client.Initialize (Req, Media_List_2);
3044 .Models.Serialize (Req.Stream, " user" , User);
3145 .Models.Serialize (Req.Stream, " type" , P_Type);
3246 .Models.Serialize (Req.Stream, " data" , Data);
@@ -45,10 +59,11 @@ package body .Clients is
4559 URI : Swagger.Clients.URI_Type;
4660 Reply : Swagger.Value_Type;
4761 begin
48- Client.Set_Accept ((1 => Swagger.Clients.APPLICATION_JSON));
62+ Client.Set_Accept (Media_List_1);
63+
4964
5065 URI.Set_Path (" /mail/rules/{ruleId}" );
51- URI.Set_Path_Param (" ruleId" , Swagger .To_String (Rule_Id));
66+ URI.Set_Path_Param (" ruleId" , .Models .To_String (Rule_Id));
5267 Client.Call (Swagger.Clients.DELETE, URI, Reply);
5368 .Models.Deserialize (Reply, " " , Result);
5469 end Delete_Rule ;
@@ -57,16 +72,15 @@ package body .Clients is
5772 -- Removes an email address from the various block lists.
5873 procedure Delist_Block
5974 (Client : in out Client_Type;
60- Email_Address_Type : in .Models.EmailAddress_Type ;
75+ P_Body : in Swagger.UString ;
6176 Result : out .Models.GenericResponse_Type) is
6277 URI : Swagger.Clients.URI_Type;
6378 Req : Swagger.Clients.Request_Type;
6479 Reply : Swagger.Value_Type;
6580 begin
66- Client.Set_Accept ((1 => Swagger.Clients.APPLICATION_JSON));
67- Client.Initialize (Req, (Swagger.Clients.APPLICATION_JSON,
68- Swagger.Clients.MULTIPART_FORM-DATA));
69- .Models.Serialize (Req.Stream, " " , Email_Address_Type);
81+ Client.Set_Accept (Media_List_1);
82+ Client.Initialize (Req, Media_List_3);
83+ .Models.Serialize (Req.Stream, " " , P_Body);
7084
7185 URI.Set_Path (" /mail/blocks/delete" );
7286 Client.Call (Swagger.Clients.POST, URI, Req, Reply);
@@ -80,7 +94,8 @@ package body .Clients is
8094 URI : Swagger.Clients.URI_Type;
8195 Reply : Swagger.Value_Type;
8296 begin
83- Client.Set_Accept ((1 => Swagger.Clients.APPLICATION_JSON));
97+ Client.Set_Accept (Media_List_1);
98+
8499
85100 URI.Set_Path (" /mail/blocks" );
86101 Client.Call (Swagger.Clients.GET, URI, Reply);
@@ -95,21 +110,24 @@ package body .Clients is
95110 URI : Swagger.Clients.URI_Type;
96111 Reply : Swagger.Value_Type;
97112 begin
98- Client.Set_Accept ((1 => Swagger.Clients.APPLICATION_JSON));
113+ Client.Set_Accept (Media_List_1);
114+
99115
100116 URI.Set_Path (" /mail/rules" );
101117 Client.Call (Swagger.Clients.GET, URI, Reply);
102118 .Models.Deserialize (Reply, " " , Result);
103119 end Get_Rules ;
104120
105- -- displays a list of blocked email addresses
121+ -- Account usage statistics.
122+ -- Returns information about the usage on your mail accounts.
106123 procedure Get_Stats
107124 (Client : in out Client_Type;
108125 Result : out .Models.GetStats200ResponseInner_Type_Vectors.Vector) is
109126 URI : Swagger.Clients.URI_Type;
110127 Reply : Swagger.Value_Type;
111128 begin
112- Client.Set_Accept ((1 => Swagger.Clients.APPLICATION_JSON));
129+ Client.Set_Accept (Media_List_1);
130+
113131
114132 URI.Set_Path (" /mail/stats" );
115133 Client.Call (Swagger.Clients.GET, URI, Reply);
@@ -135,7 +153,8 @@ package body .Clients is
135153 URI : Swagger.Clients.URI_Type;
136154 Reply : Swagger.Value_Type;
137155 begin
138- Client.Set_Accept ((1 => Swagger.Clients.APPLICATION_JSON));
156+ Client.Set_Accept (Media_List_1);
157+
139158
140159 URI.Add_Param (" id" , Id);
141160 URI.Add_Param (" origin" , Origin);
@@ -155,24 +174,136 @@ package body .Clients is
155174
156175 -- Sends an Email with Advanced Options
157176 -- Sends An email through one of your mail orders allowing additional options such as file attachments, cc, bcc, etc.
177+ --
178+ -- Here are 9 examples showing the various ways to call the advsend operation showing the different ways you can pass the to, cc, bcc, and replyto information. The first several examples are all for the application/x-www-form-urlencoded content-type while the later ones are for application/json content-types.
179+ --
180+ -- ```
181+ -- curl -i --request POST --url https://api.mailbaby.net/mail/advsend \
182+ -- --header 'Accept: application/json' \
183+ -- --header 'Content-Type: application/x-www-form-urlencoded' \
184+ -- --header 'X-API-KEY: YOUR_API_KEY' \
185+ -- --data 'subject=Welcome' \
186+ -- --data 'body=Hello' \
187+ -- --data from=user@domain.com \
188+ -- --data to=support@interserver.net
189+ -- ```
190+ --
191+ -- ```
192+ -- curl -i --request POST --url https://api.mailbaby.net/mail/advsend \
193+ -- --header 'Accept: application/json' \
194+ -- --header 'Content-Type: application/x-www-form-urlencoded' \
195+ -- --header 'X-API-KEY: YOUR_API_KEY' \
196+ -- --data 'subject=Welcome' \
197+ -- --data 'body=Hello' \
198+ -- --data from=user@domain.com \
199+ -- --data "to[0][name]=Joe" \
200+ -- --data "to[0][email]=support@interserver.net"
201+ -- ```
202+ --
203+ -- ```
204+ -- curl -i --request POST --url https://api.mailbaby.net/mail/advsend \
205+ -- --header 'Accept: application/json' \
206+ -- --header 'Content-Type: application/x-www-form-urlencoded' \
207+ -- --header 'X-API-KEY: YOUR_API_KEY' \
208+ -- --data 'subject=Welcome' \
209+ -- --data 'body=Hello' \
210+ -- --data from="Joe <user@domain.com>" \
211+ -- --data to="Joe <support@interserver.net>"
212+ -- ```
213+ --
214+ -- ```
215+ -- curl -i --request POST --url https://api.mailbaby.net/mail/advsend \
216+ -- --header 'Accept: application/json' \
217+ -- --header 'Content-Type: application/x-www-form-urlencoded' \
218+ -- --header 'X-API-KEY: YOUR_API_KEY' \
219+ -- --data 'subject=Welcome' \
220+ -- --data 'body=Hello' \
221+ -- --data from=user@domain.com \
222+ -- --data "to=support@interserver.net, support@interserver.net"
223+ -- ```
224+ --
225+ -- ```
226+ -- curl -i --request POST --url https://api.mailbaby.net/mail/advsend \
227+ -- --header 'Accept: application/json' \
228+ -- --header 'Content-Type: application/x-www-form-urlencoded' \
229+ -- --header 'X-API-KEY: YOUR_API_KEY' \
230+ -- --data 'subject=Welcome' \
231+ -- --data 'body=Hello' \
232+ -- --data from=user@domain.com \
233+ -- --data "to=Joe <support@interserver.net>, Joe <support@interserver.net>"
234+ -- ```
235+ --
236+ -- ```
237+ -- curl -i --request POST --url https://api.mailbaby.net/mail/advsend \
238+ -- --header 'Accept: application/json' \
239+ -- --header 'Content-Type: application/x-www-form-urlencoded' \
240+ -- --header 'X-API-KEY: YOUR_API_KEY' \
241+ -- --data 'subject=Welcome' \
242+ -- --data 'body=Hello' \
243+ -- --data from=user@domain.com \
244+ -- --data "to[0][name]=Joe" \
245+ -- --data "to[0][email]=support@interserver.net" \
246+ -- --data "to[1][name]=Joe" \
247+ -- --data "to[1][email]=support@interserver.net"
248+ -- ```
249+ --
250+ -- ```
251+ -- curl -i --request POST --url https://api.mailbaby.net/mail/advsend \
252+ -- --header 'Accept: application/json' \
253+ -- --header 'Content-Type: application/json' \
254+ -- --header 'X-API-KEY: YOUR_API_KEY' \
255+ -- --data '{
256+ -- "subject": "Welcome",
257+ -- "body": "Hello",
258+ -- "from": "user@domain.com",
259+ -- "to": "support@interserver.net"
260+ -- }'
261+ -- ```
262+ --
263+ -- ```
264+ -- curl -i --request POST --url https://api.mailbaby.net/mail/advsend \
265+ -- --header 'Accept: application/json' \
266+ -- --header 'Content-Type: application/json' \
267+ -- --header 'X-API-KEY: YOUR_API_KEY' \
268+ -- --data '{
269+ -- "subject": "Welcome",
270+ -- "body": "Hello",
271+ -- "from": {"name": "Joe", "email": "user@domain.com"},
272+ -- "to": [{"name": "Joe", "email": "support@interserver.net"}]
273+ -- }'
274+ -- ```
275+ --
276+ -- ```
277+ -- curl -i --request POST --url https://api.mailbaby.net/mail/advsend \
278+ -- --header 'Accept: application/json' \
279+ -- --header 'Content-Type: application/json' \
280+ -- --header 'X-API-KEY: YOUR_API_KEY' \
281+ -- --data '{
282+ -- "subject": "Welcome",
283+ -- "body": "Hello",
284+ -- "from": "Joe <user@domain.com>",
285+ -- "to": "Joe <support@interserver.net>"
286+ -- }'
287+ -- ```
158288 procedure Send_Adv_Mail
159289 (Client : in out Client_Type;
160290 Subject : in Swagger.UString;
161291 P_Body : in Swagger.UString;
162- From : in .Models..Models.EmailAddressName_Type ;
163- To : in .Models.EmailAddressName_Type_Vectors.Vector ;
164- Replyto : in .Models.EmailAddressName_Type_Vectors.Vector ;
165- Cc : in .Models.EmailAddressName_Type_Vectors.Vector ;
166- Bcc : in .Models.EmailAddressName_Type_Vectors.Vector ;
292+ From : in .Models..Models.EmailAddressTypes_Type ;
293+ To : in .Models..Models.EmailAddressesTypes_Type ;
294+ Replyto : in .Models..Models.EmailAddressesTypes_Type ;
295+ Cc : in .Models..Models.EmailAddressesTypes_Type ;
296+ Bcc : in .Models..Models.EmailAddressesTypes_Type ;
167297 Attachments : in .Models.MailAttachment_Type_Vectors.Vector;
168298 Id : in Swagger.Nullable_Long;
169299 Result : out .Models.GenericResponse_Type) is
170300 URI : Swagger.Clients.URI_Type;
171301 Req : Swagger.Clients.Request_Type;
172302 Reply : Swagger.Value_Type;
173303 begin
174- Client.Set_Accept ((1 => Swagger.Clients.APPLICATION_JSON));
175- Client.Initialize (Req, (1 => Swagger.Clients.APPLICATION_FORM));
304+ Client.Set_Accept (Media_List_1);
305+
306+ Client.Initialize (Req, Media_List_2);
176307 .Models.Serialize (Req.Stream, " subject" , Subject);
177308 .Models.Serialize (Req.Stream, " body" , P_Body);
178309 .Models.Serialize (Req.Stream, " from" , From);
@@ -203,8 +334,9 @@ package body .Clients is
203334 Req : Swagger.Clients.Request_Type;
204335 Reply : Swagger.Value_Type;
205336 begin
206- Client.Set_Accept ((1 => Swagger.Clients.APPLICATION_JSON));
207- Client.Initialize (Req, (1 => Swagger.Clients.APPLICATION_FORM));
337+ Client.Set_Accept (Media_List_1);
338+
339+ Client.Initialize (Req, Media_List_2);
208340 .Models.Serialize (Req.Stream, " to" , To);
209341 .Models.Serialize (Req.Stream, " from" , From);
210342 .Models.Serialize (Req.Stream, " subject" , Subject);
@@ -223,7 +355,8 @@ package body .Clients is
223355 URI : Swagger.Clients.URI_Type;
224356 Reply : Swagger.Value_Type;
225357 begin
226- Client.Set_Accept ((1 => Swagger.Clients.APPLICATION_JSON));
358+ Client.Set_Accept (Media_List_1);
359+
227360
228361 URI.Set_Path (" /mail" );
229362 Client.Call (Swagger.Clients.GET, URI, Reply);
0 commit comments