5
5
namespace Microsoft. EServices. EDocumentConnector. Continia;
6
6
using System. Environment;
7
7
8
- codeunit 6392 "API URL Mgt."
8
+ codeunit 6392 "Api Url Mgt."
9
9
{
10
10
Access = Internal ;
11
- internal procedure NetworkProfilesURL ( Network: Enum "Network"; Page : Integer ; PageSize: Integer ) : Text
11
+ internal procedure NetworkProfilesUrl ( Network: Enum "E-Delivery Network"; Page : Integer ; PageSize: Integer ) : Text
12
12
var
13
13
ProfilesUrlLbl: Label ' %1/networks/%2/profiles.xml?page=%3&page_size=%4' , Locked = true;
14
14
begin
15
- exit ( StrSubstNo( ProfilesUrlLbl, CDNBaseURL () , GetNetworkNameAsText( Network) , Page , PageSize)) ;
15
+ exit ( StrSubstNo( ProfilesUrlLbl, CdnBaseUrl () , GetNetworkNameAsText( Network) , Page , PageSize)) ;
16
16
end ;
17
17
18
- internal procedure NetworkIdentifiersURL ( Network: Enum "Network"; Page : Integer ; PageSize: Integer ) : Text
18
+ internal procedure NetworkIdentifiersUrl ( Network: Enum "E-Delivery Network"; Page : Integer ; PageSize: Integer ) : Text
19
19
var
20
20
IdentifiersUrlLbl: Label ' %1/networks/%2/id_types.xml?page=%3&page_size=%4' , Locked = true;
21
21
begin
22
- exit ( StrSubstNo( IdentifiersUrlLbl, CDNBaseURL () , GetNetworkNameAsText( Network) , Page , PageSize)) ;
22
+ exit ( StrSubstNo( IdentifiersUrlLbl, CdnBaseUrl () , GetNetworkNameAsText( Network) , Page , PageSize)) ;
23
23
end ;
24
24
25
- internal procedure ParticipationURL ( Network: Enum "Network") : Text
25
+ internal procedure ParticipationUrl ( Network: Enum "E-Delivery Network") : Text
26
26
var
27
27
ParticipationUrlLbl: Label ' %1/networks/%2/participations.xml' , Locked = true;
28
28
begin
29
- exit ( StrSubstNo( ParticipationUrlLbl, CDNBaseURL () , GetNetworkNameAsText( Network)))
29
+ exit ( StrSubstNo( ParticipationUrlLbl, CdnBaseUrl () , GetNetworkNameAsText( Network)))
30
30
end ;
31
31
32
- internal procedure SingleParticipationURL ( Network: Enum "Network"; ParticipationGUID : Guid ) : Text
32
+ internal procedure SingleParticipationUrl ( Network: Enum "E-Delivery Network"; ParticipationGuid : Guid ) : Text
33
33
var
34
34
SingleParticipationUrlLbl: Label ' %1/networks/%2/participations/%3.xml' , Locked = true;
35
35
begin
36
- exit ( StrSubstNo( SingleParticipationUrlLbl, CDNBaseURL () , GetNetworkNameAsText( Network) , GetGUIDAsText ( ParticipationGUID )))
36
+ exit ( StrSubstNo( SingleParticipationUrlLbl, CdnBaseUrl () , GetNetworkNameAsText( Network) , GetGuidAsText ( ParticipationGuid )))
37
37
end ;
38
38
39
- internal procedure ParticipationProfilesURL ( Network: Enum "Network"; ParticipationGUID : Guid ) : Text
39
+ internal procedure ParticipationProfilesUrl ( Network: Enum "E-Delivery Network"; ParticipationGuid : Guid ) : Text
40
40
var
41
41
ParticipationProfilesUrlLbl: Label ' %1/networks/%2/participations/%3/profiles.xml' , Locked = true;
42
42
begin
43
- exit ( StrSubstNo( ParticipationProfilesUrlLbl, CDNBaseURL () , GetNetworkNameAsText( Network) , GetGUIDAsText ( ParticipationGUID )))
43
+ exit ( StrSubstNo( ParticipationProfilesUrlLbl, CdnBaseUrl () , GetNetworkNameAsText( Network) , GetGuidAsText ( ParticipationGuid )))
44
44
end ;
45
45
46
- internal procedure ParticipationProfilesURL ( Network: Enum "Network"; ParticipationGUID : Guid ; Page : Integer ; PageSize: Integer ) : Text
46
+ internal procedure ParticipationProfilesUrl ( Network: Enum "E-Delivery Network"; ParticipationGuid : Guid ; Page : Integer ; PageSize: Integer ) : Text
47
47
var
48
48
ParticipationProfilesUrlPagesLbl: Label ' %1/networks/%2/participations/%3/profiles.xml?page=%4&page_size=%5' , Locked = true;
49
49
begin
50
- exit ( StrSubstNo( ParticipationProfilesUrlPagesLbl, CDNBaseURL () , GetNetworkNameAsText( Network) , GetGUIDAsText ( ParticipationGUID ) , Page , PageSize))
50
+ exit ( StrSubstNo( ParticipationProfilesUrlPagesLbl, CdnBaseUrl () , GetNetworkNameAsText( Network) , GetGuidAsText ( ParticipationGuid ) , Page , PageSize))
51
51
end ;
52
52
53
- internal procedure SingleParticipationProfileURL ( Network: Enum "Network"; ParticipationGUID : Guid ; ProfileGUID : Guid ) : Text
53
+ internal procedure SingleParticipationProfileUrl ( Network: Enum "E-Delivery Network"; ParticipationGuid : Guid ; ProfileGuid : Guid ) : Text
54
54
var
55
55
SingleParticipationProfileUrlLbl: Label ' %1/networks/%2/participations/%3/profiles/%4.xml' , Locked = true;
56
56
begin
57
- exit ( StrSubstNo( SingleParticipationProfileUrlLbl, CDNBaseURL () , GetNetworkNameAsText( Network) , GetGUIDAsText ( ParticipationGUID ) , GetGUIDAsText ( ProfileGUID )))
57
+ exit ( StrSubstNo( SingleParticipationProfileUrlLbl, CdnBaseUrl () , GetNetworkNameAsText( Network) , GetGuidAsText ( ParticipationGuid ) , GetGuidAsText ( ProfileGuid )))
58
58
end ;
59
59
60
- internal procedure ParticipationLookupURL ( Network: Enum "Network"; IdType: Text [4 ]; IdValue: Text [50 ]) : Text
60
+ internal procedure ParticipationLookupUrl ( Network: Enum "E-Delivery Network"; IdType: Text [4 ]; IdValue: Text [50 ]) : Text
61
61
var
62
62
ParticipationLookupUrlLbl: Label ' %1/networks/%2/participation_lookups.xml?id_type=%3&id_value=%4' , Locked = true;
63
63
begin
64
- exit ( StrSubstNo( ParticipationLookupUrlLbl, CDNBaseURL () , GetNetworkNameAsText( Network) , IdType, IdValue))
64
+ exit ( StrSubstNo( ParticipationLookupUrlLbl, CdnBaseUrl () , GetNetworkNameAsText( Network) , IdType, IdValue))
65
65
end ;
66
66
67
- internal procedure DocumentsForCompanyURL ( CompanyGUID : Guid ; Page : Integer ; PageSize: Integer ; Incoming: Boolean ) : Text
67
+ internal procedure DocumentsForCompanyUrl ( CompanyGuid : Guid ; Page : Integer ; PageSize: Integer ; Incoming: Boolean ) : Text
68
68
var
69
69
DirectionQueryTxt: Text ;
70
70
DocumentsForCompanyUrlLbl: Label ' %1/documents.xml?business_central_company_code=%2&page=%3&page_size=%4&direction=%5' , Locked = true;
@@ -73,35 +73,35 @@ codeunit 6392 "API URL Mgt."
73
73
DirectionQueryTxt := ' IncomingEnum'
74
74
else
75
75
DirectionQueryTxt := ' OutgoingEnum' ;
76
- exit ( StrSubstNo( DocumentsForCompanyUrlLbl, CDNBaseURL () , GetGUIDAsText ( CompanyGUID ) , Page , PageSize, DirectionQueryTxt))
76
+ exit ( StrSubstNo( DocumentsForCompanyUrlLbl, CdnBaseUrl () , GetGuidAsText ( CompanyGuid ) , Page , PageSize, DirectionQueryTxt))
77
77
end ;
78
78
79
- internal procedure DocumentActionUrl( DocumentGUID : Guid ) : Text
79
+ internal procedure DocumentActionUrl( DocumentGuid : Guid ) : Text
80
80
var
81
81
DocumentActionUrlLbl: Label ' %1/documents/%2/action.xml' , Locked = true;
82
82
begin
83
- exit ( StrSubstNo( DocumentActionUrlLbl, CDNBaseURL () , GetGUIDAsText ( DocumentGUID )))
83
+ exit ( StrSubstNo( DocumentActionUrlLbl, CdnBaseUrl () , GetGuidAsText ( DocumentGuid )))
84
84
end ;
85
85
86
- internal procedure PostDocumentsUrl( CompanyGUID : Guid ) : Text
86
+ internal procedure PostDocumentsUrl( CompanyGuid : Guid ) : Text
87
87
var
88
88
PostDocumentsUrlLbl: Label ' %1/documents.xml?business_central_company_code=%2' , Locked = true;
89
89
begin
90
- exit ( StrSubstNo( PostDocumentsUrlLbl, CDNBaseURL () , GetGUIDAsText ( CompanyGUID )))
90
+ exit ( StrSubstNo( PostDocumentsUrlLbl, CdnBaseUrl () , GetGuidAsText ( CompanyGuid )))
91
91
end ;
92
92
93
- internal procedure TechnicalResponseURL ( DocumentGUID : Guid ) : Text
93
+ internal procedure TechnicalResponseUrl ( DocumentGuid : Guid ) : Text
94
94
var
95
95
TechnicalResponseUrlLbl: Label ' %1/documents/%2/technical_response.xml' , Locked = true;
96
96
begin
97
- exit ( StrSubstNo( TechnicalResponseUrlLbl, CDNBaseURL () , GetGUIDAsText ( DocumentGUID )))
97
+ exit ( StrSubstNo( TechnicalResponseUrlLbl, CdnBaseUrl () , GetGuidAsText ( DocumentGuid )))
98
98
end ;
99
99
100
- internal procedure BusinessResponseURL ( DocumentGUID : Guid ) : Text
100
+ internal procedure BusinessResponseUrl ( DocumentGuid : Guid ) : Text
101
101
var
102
102
BusinessResponseUrlLbl: Label ' %1/documents/%2/business_responses.xml' , Locked = true;
103
103
begin
104
- exit ( StrSubstNo( BusinessResponseUrlLbl, CDNBaseURL () , GetGUIDAsText ( DocumentGUID )))
104
+ exit ( StrSubstNo( BusinessResponseUrlLbl, CdnBaseUrl () , GetGuidAsText ( DocumentGuid )))
105
105
end ;
106
106
107
107
internal procedure PartnerAccessTokenUrl() : Text
@@ -160,27 +160,27 @@ codeunit 6392 "API URL Mgt."
160
160
exit ( StrSubstNo( GetUpdateCompanyInfoUrlLbl, COBaseUrl())) ;
161
161
end ;
162
162
163
- local procedure COBaseUrl() URL : Text
163
+ local procedure COBaseUrl() Url : Text
164
164
var
165
165
Handled: Boolean ;
166
166
begin
167
- OnGetCOBaseUrl( URL , Handled) ;
167
+ OnGetCOBaseUrl( Url , Handled) ;
168
168
if Handled then
169
- exit ( URL ) ;
169
+ exit ( Url ) ;
170
170
171
171
exit ( ' https://auth.continiaonline.com/api/v1' ) ;
172
172
end ;
173
173
174
174
175
- internal procedure CDNBaseURL () URL : Text
175
+ internal procedure CdnBaseUrl () Url : Text
176
176
var
177
177
EnvironmentInformation: Codeunit "Environment Information";
178
178
Handled: Boolean ;
179
179
LocalizedBaseUrl: Text ;
180
180
begin
181
- OnGetCDNBaseUrl ( URL , Handled) ;
181
+ OnGetCdnBaseUrl ( Url , Handled) ;
182
182
if Handled then
183
- exit ( URL ) ;
183
+ exit ( Url ) ;
184
184
185
185
LocalizedBaseUrl := GetBaseUrlForLocalization( EnvironmentInformation. GetApplicationFamily()) ;
186
186
if LocalizedBaseUrl <> ' ' then
@@ -202,12 +202,12 @@ codeunit 6392 "API URL Mgt."
202
202
end ;
203
203
end ;
204
204
205
- internal procedure GetNetworkNameAsText( NetworkName: Enum "Network") : Text
205
+ internal procedure GetNetworkNameAsText( NetworkName: Enum "E-Delivery Network") : Text
206
206
begin
207
207
exit ( NetworkName. Names. Get( NetworkName. Ordinals. IndexOf( NetworkName. AsInteger()))) ;
208
208
end ;
209
209
210
- internal procedure GetGUIDAsText ( Value : Guid ) : Text [36 ]
210
+ internal procedure GetGuidAsText ( Value : Guid ) : Text [36 ]
211
211
begin
212
212
exit ( CopyStr( DelChr( Value , ' <>' , ' {}' ) , 1 , 36 ))
213
213
end ;
@@ -219,7 +219,7 @@ codeunit 6392 "API URL Mgt."
219
219
end ;
220
220
221
221
[IntegrationEvent( false, false) ]
222
- local procedure OnGetCDNBaseUrl ( var ReturnUrl: Text ; var Handled: Boolean )
222
+ local procedure OnGetCdnBaseUrl ( var ReturnUrl: Text ; var Handled: Boolean )
223
223
begin
224
224
end ;
225
225
0 commit comments