Initial commit
This commit is contained in:
@@ -0,0 +1,61 @@
|
||||
import '../models/amount.dart';
|
||||
import '../models/customization_settings.dart';
|
||||
import '../models/method_save_payment.dart';
|
||||
import '../models/test_mode_settings.dart';
|
||||
import '../models/host_parameters.dart';
|
||||
|
||||
class SavedBankCardModuleInputData {
|
||||
String clientApplicationKey;
|
||||
String title;
|
||||
String subtitle;
|
||||
Amount amount;
|
||||
SavePaymentMethod savePaymentMethod;
|
||||
String applePayID;
|
||||
String shopId;
|
||||
String paymentMethodId;
|
||||
String? gatewayId;
|
||||
TestModeSettings? testModeSettings;
|
||||
String? returnUrl;
|
||||
bool isLoggingEnabled;
|
||||
CustomizationSettings customizationSettings;
|
||||
String? customerId;
|
||||
bool isSafeDeal;
|
||||
HostParameters? hostParameters;
|
||||
|
||||
SavedBankCardModuleInputData(
|
||||
{required this.clientApplicationKey,
|
||||
required this.title,
|
||||
required this.subtitle,
|
||||
required this.amount,
|
||||
required this.savePaymentMethod,
|
||||
required this.applePayID,
|
||||
required this.shopId,
|
||||
required this.paymentMethodId,
|
||||
required this.isSafeDeal,
|
||||
this.gatewayId,
|
||||
this.testModeSettings,
|
||||
this.returnUrl,
|
||||
this.isLoggingEnabled = false,
|
||||
this.customizationSettings = const CustomizationSettings(),
|
||||
this.customerId,
|
||||
this.hostParameters});
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'clientApplicationKey': clientApplicationKey,
|
||||
'title': title,
|
||||
'subtitle': subtitle,
|
||||
'amount': amount.toJson(),
|
||||
'savePaymentMethod': savePaymentMethod.toString(),
|
||||
'gatewayId': gatewayId,
|
||||
'testModeSettings': testModeSettings?.toJson(),
|
||||
'applePayMerchantIdentifier': applePayID,
|
||||
'shopId': shopId,
|
||||
'returnUrl': returnUrl,
|
||||
'isLoggingEnabled': isLoggingEnabled,
|
||||
'customizationSettings': customizationSettings.toJson(),
|
||||
'paymentMethodId': paymentMethodId,
|
||||
'customerId': customerId,
|
||||
'isSafeDeal': isSafeDeal,
|
||||
'hostParameters': hostParameters?.toJson(),
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
import 'package:yookassa_payments_flutter/models/amount.dart';
|
||||
import 'package:yookassa_payments_flutter/models/customization_settings.dart';
|
||||
import 'package:yookassa_payments_flutter/models/google_pay_parameters.dart';
|
||||
import 'package:yookassa_payments_flutter/models/method_save_payment.dart';
|
||||
import 'package:yookassa_payments_flutter/models/test_mode_settings.dart';
|
||||
import 'package:yookassa_payments_flutter/models/tokenization_settings.dart';
|
||||
import 'package:yookassa_payments_flutter/models/host_parameters.dart';
|
||||
|
||||
class TokenizationModuleInputData {
|
||||
String clientApplicationKey;
|
||||
String title;
|
||||
String subtitle;
|
||||
Amount amount;
|
||||
SavePaymentMethod savePaymentMethod;
|
||||
String applePayID;
|
||||
String shopId;
|
||||
String moneyAuthClientId;
|
||||
HostParameters? hostParameters;
|
||||
String? gatewayId;
|
||||
TokenizationSettings tokenizationSettings;
|
||||
TestModeSettings? testModeSettings;
|
||||
String? returnUrl;
|
||||
bool isLoggingEnabled;
|
||||
String? userPhoneNumber;
|
||||
CustomizationSettings customizationSettings;
|
||||
String? applicationScheme;
|
||||
String? customerId;
|
||||
GooglePayParameters googlePayParameters;
|
||||
bool googlePayTestEnvironment;
|
||||
|
||||
TokenizationModuleInputData(
|
||||
{required this.clientApplicationKey,
|
||||
required this.title,
|
||||
required this.subtitle,
|
||||
required this.amount,
|
||||
required this.savePaymentMethod,
|
||||
required this.applePayID,
|
||||
required this.shopId,
|
||||
required this.moneyAuthClientId,
|
||||
this.hostParameters,
|
||||
this.gatewayId,
|
||||
this.tokenizationSettings = const TokenizationSettings(),
|
||||
this.testModeSettings,
|
||||
this.returnUrl,
|
||||
this.isLoggingEnabled = false,
|
||||
this.userPhoneNumber,
|
||||
this.customizationSettings = const CustomizationSettings(),
|
||||
this.applicationScheme,
|
||||
this.customerId,
|
||||
this.googlePayParameters = const GooglePayParameters(),
|
||||
this.googlePayTestEnvironment = false});
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'clientApplicationKey': clientApplicationKey,
|
||||
'title': title,
|
||||
'subtitle': subtitle,
|
||||
'amount': amount.toJson(),
|
||||
'savePaymentMethod': savePaymentMethod.toString(),
|
||||
'hostParameters': hostParameters?.toJson(),
|
||||
'gatewayId': gatewayId,
|
||||
'tokenizationSettings': tokenizationSettings.toJson(),
|
||||
'testModeSettings': testModeSettings?.toJson(),
|
||||
'applePayMerchantIdentifier': applePayID,
|
||||
'shopId': shopId,
|
||||
'returnUrl': returnUrl,
|
||||
'isLoggingEnabled': isLoggingEnabled,
|
||||
'userPhoneNumber': userPhoneNumber,
|
||||
'customizationSettings': customizationSettings.toJson(),
|
||||
'moneyAuthClientId': moneyAuthClientId,
|
||||
'applicationScheme': applicationScheme,
|
||||
'customerId': customerId,
|
||||
'googlePayParameters': googlePayParameters.jsonList(),
|
||||
'googlePayTestEnvironment': googlePayTestEnvironment
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user