File tree Expand file tree Collapse file tree 5 files changed +529
-211
lines changed Expand file tree Collapse file tree 5 files changed +529
-211
lines changed Original file line number Diff line number Diff line change 1
1
import Config from "./config" ;
2
2
import HttpURLConnectionClient from "./httpClient/httpURLConnectionClient" ;
3
- import { version } from "../package.json" ;
4
3
import ClientInterface from "./httpClient/clientInterface" ;
5
4
6
5
type ClientParametersOverload =
@@ -38,8 +37,6 @@ class Client {
38
37
public static MARKETPAY_HOP_API_VERSION = "v6" ;
39
38
public static MARKETPAY_NOTIFICATION_API_VERSION = "v5" ;
40
39
public static MARKETPAY_NOTIFICATION_CONFIGURATION_API_VERSION = "v6" ;
41
- public static LIB_NAME = "adyen-node-api-library" ;
42
- public static LIB_VERSION : string = version ;
43
40
public static TERMINAL_API_ENDPOINT_TEST = "https://terminal-api-test.adyen.com" ;
44
41
public static TERMINAL_API_ENDPOINT_LIVE = "https://terminal-api-live.adyen.com" ;
45
42
Original file line number Diff line number Diff line change
1
+ import { version } from "../../package.json" ;
2
+
3
+ class LibraryConstants {
4
+ public static LIB_NAME = "adyen-node-api-library" ;
5
+ public static LIB_VERSION : string = version ;
6
+ }
7
+
8
+ export default LibraryConstants ;
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import { HttpsProxyAgent } from "https-proxy-agent";
23
23
24
24
import * as fs from "fs" ;
25
25
import { URL , URLSearchParams } from "url" ;
26
- import Client from "../client " ;
26
+ import LibraryConstants from "../constants/libraryConstants " ;
27
27
import Config from "../config" ;
28
28
import HttpClientException from "./httpClientException" ;
29
29
@@ -111,9 +111,9 @@ class HttpURLConnectionClient implements ClientInterface {
111
111
}
112
112
113
113
requestOptions . headers [ ApiConstants . ACCEPT_CHARSET ] = HttpURLConnectionClient . CHARSET ;
114
- requestOptions . headers [ ApiConstants . USER_AGENT ] = `${ applicationName } ${ Client . LIB_NAME } /${ Client . LIB_VERSION } ` ;
115
- requestOptions . headers [ ApiConstants . ADYEN_LIBRARY_NAME ] = Client . LIB_NAME ;
116
- requestOptions . headers [ ApiConstants . ADYEN_LIBRARY_VERSION ] = Client . LIB_VERSION ;
114
+ requestOptions . headers [ ApiConstants . USER_AGENT ] = `${ applicationName } ${ LibraryConstants . LIB_NAME } /${ LibraryConstants . LIB_VERSION } ` ;
115
+ requestOptions . headers [ ApiConstants . ADYEN_LIBRARY_NAME ] = LibraryConstants . LIB_NAME ;
116
+ requestOptions . headers [ ApiConstants . ADYEN_LIBRARY_VERSION ] = LibraryConstants . LIB_VERSION ;
117
117
118
118
return httpsRequest ( requestOptions ) ;
119
119
}
Original file line number Diff line number Diff line change 19
19
20
20
// Generated using typescript-generator version 2.14.505 on 2019-06-11 10:28:22.
21
21
22
- import Client from "../client " ;
22
+ import LibraryConstants from "../constants/libraryConstants " ;
23
23
24
24
export class ApplicationInfo {
25
25
adyenLibrary ?: CommonField ;
@@ -32,8 +32,8 @@ export class ApplicationInfo {
32
32
33
33
constructor ( ) {
34
34
this . adyenLibrary = {
35
- name : Client . LIB_NAME ,
36
- version : Client . LIB_VERSION ,
35
+ name : LibraryConstants . LIB_NAME ,
36
+ version : LibraryConstants . LIB_VERSION ,
37
37
} ;
38
38
}
39
39
}
You can’t perform that action at this time.
0 commit comments