-
Notifications
You must be signed in to change notification settings - Fork 0
/
connect_sdk_configuration.dart
52 lines (42 loc) · 2.14 KB
/
connect_sdk_configuration.dart
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
/*
*
* * Do not remove or alter the notices in this preamble.
* *
* * This software is owned by Worldline Global Collect and may not be be altered, copied, reproduced, republished, uploaded, posted, transmitted or distributed in any way, without the prior written consent of Worldline.
* *
* * Copyright © 2023 Worldline Global Collect and/or its affiliates.
* *
* * All rights reserved. License grant and user rights and obligations according to the applicable license agreement.
* *
* * Please contact Worldline Global Collect for questions regarding license and user rights.
*
*/
part of 'configuration.dart';
/// The main configuration class for the ConnectSDK.
/// Necessary for the initialization of the SDK.
@JsonSerializable()
class ConnectSDKConfiguration {
/// The configuration for the current session.
@JsonKey(required: true)
final SessionConfiguration sessionConfiguration;
/// Whether the network calls should be logged - should be `false` in production.
@JsonKey(required: true)
bool enableNetworkLogs = false;
/// The optional applicationId that will be used in the metadata of the API calls and payment encryption.
@JsonKey(required: true)
String? applicationId;
/// The optional ipAddress that will be used in the metadata of the API calls and payment encryption.
@JsonKey(required: true)
String? ipAddress;
/// This property will always be false as transferring images from the native SDKs to this SDK will not work. Loading images can be done with the [ClientApi.retrieveLogo] function.
@JsonKey(includeToJson: true, name: "preLoadImages")
final bool _preLoadImages = false;
/// This property is used to set the correct SDK identifier when configuring the native SDKs
@JsonKey(includeToJson: true, name: "sdkIdentifier")
final String _sdkIdentifier = "FlutterClientSDK/v1.1.1";
ConnectSDKConfiguration(this.sessionConfiguration,
{this.enableNetworkLogs = false, this.applicationId, this.ipAddress});
factory ConnectSDKConfiguration.fromJson(Map<String, dynamic> json) =>
_$ConnectSDKConfigurationFromJson(json);
Map<String, dynamic> toJson() => _$ConnectSDKConfigurationToJson(this);
}