wallee
Version:
TypeScript/JavaScript client for wallee
59 lines (58 loc) • 3.56 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfPaymentMethodConfiguration = instanceOfPaymentMethodConfiguration;
exports.PaymentMethodConfigurationFromJSON = PaymentMethodConfigurationFromJSON;
exports.PaymentMethodConfigurationFromJSONTyped = PaymentMethodConfigurationFromJSONTyped;
exports.PaymentMethodConfigurationToJSON = PaymentMethodConfigurationToJSON;
exports.PaymentMethodConfigurationToJSONTyped = PaymentMethodConfigurationToJSONTyped;
const OneClickPaymentMode_1 = require("./OneClickPaymentMode");
const CreationEntityState_1 = require("./CreationEntityState");
const PaymentMethod_1 = require("./PaymentMethod");
const DataCollectionType_1 = require("./DataCollectionType");
/**
* Check if a given object implements the PaymentMethodConfiguration interface.
*/
function instanceOfPaymentMethodConfiguration(value) {
return true;
}
function PaymentMethodConfigurationFromJSON(json) {
return PaymentMethodConfigurationFromJSONTyped(json, false);
}
function PaymentMethodConfigurationFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'dataCollectionType': json['dataCollectionType'] == null ? undefined : (0, DataCollectionType_1.DataCollectionTypeFromJSON)(json['dataCollectionType']),
'plannedPurgeDate': json['plannedPurgeDate'] == null ? undefined : (new Date(json['plannedPurgeDate'])),
'description': json['description'] == null ? undefined : json['description'],
'resolvedImageUrl': json['resolvedImageUrl'] == null ? undefined : json['resolvedImageUrl'],
'oneClickPaymentMode': json['oneClickPaymentMode'] == null ? undefined : (0, OneClickPaymentMode_1.OneClickPaymentModeFromJSON)(json['oneClickPaymentMode']),
'title': json['title'] == null ? undefined : json['title'],
'version': json['version'] == null ? undefined : json['version'],
'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'],
'spaceId': json['spaceId'] == null ? undefined : json['spaceId'],
'imageResourcePath': json['imageResourcePath'] == null ? undefined : json['imageResourcePath'],
'sortOrder': json['sortOrder'] == null ? undefined : json['sortOrder'],
'name': json['name'] == null ? undefined : json['name'],
'resolvedDescription': json['resolvedDescription'] == null ? undefined : json['resolvedDescription'],
'resolvedTitle': json['resolvedTitle'] == null ? undefined : json['resolvedTitle'],
'paymentMethod': json['paymentMethod'] == null ? undefined : (0, PaymentMethod_1.PaymentMethodFromJSON)(json['paymentMethod']),
'id': json['id'] == null ? undefined : json['id'],
'state': json['state'] == null ? undefined : (0, CreationEntityState_1.CreationEntityStateFromJSON)(json['state']),
};
}
function PaymentMethodConfigurationToJSON(json) {
return PaymentMethodConfigurationToJSONTyped(json, false);
}
function PaymentMethodConfigurationToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'dataCollectionType': (0, DataCollectionType_1.DataCollectionTypeToJSON)(value['dataCollectionType']),
'oneClickPaymentMode': (0, OneClickPaymentMode_1.OneClickPaymentModeToJSON)(value['oneClickPaymentMode']),
'paymentMethod': (0, PaymentMethod_1.PaymentMethodToJSON)(value['paymentMethod']),
'state': (0, CreationEntityState_1.CreationEntityStateToJSON)(value['state']),
};
}