wallee
Version:
TypeScript/JavaScript client for wallee
61 lines (60 loc) • 3.18 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfPaymentMethodConfigurationCreate = instanceOfPaymentMethodConfigurationCreate;
exports.PaymentMethodConfigurationCreateFromJSON = PaymentMethodConfigurationCreateFromJSON;
exports.PaymentMethodConfigurationCreateFromJSONTyped = PaymentMethodConfigurationCreateFromJSONTyped;
exports.PaymentMethodConfigurationCreateToJSON = PaymentMethodConfigurationCreateToJSON;
exports.PaymentMethodConfigurationCreateToJSONTyped = PaymentMethodConfigurationCreateToJSONTyped;
const OneClickPaymentMode_1 = require("./OneClickPaymentMode");
const CreationEntityState_1 = require("./CreationEntityState");
const DataCollectionType_1 = require("./DataCollectionType");
/**
* Check if a given object implements the PaymentMethodConfigurationCreate interface.
*/
function instanceOfPaymentMethodConfigurationCreate(value) {
if (!('dataCollectionType' in value) || value['dataCollectionType'] === undefined)
return false;
if (!('paymentMethod' in value) || value['paymentMethod'] === undefined)
return false;
if (!('state' in value) || value['state'] === undefined)
return false;
return true;
}
function PaymentMethodConfigurationCreateFromJSON(json) {
return PaymentMethodConfigurationCreateFromJSONTyped(json, false);
}
function PaymentMethodConfigurationCreateFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'imageResourcePath': json['imageResourcePath'] == null ? undefined : json['imageResourcePath'],
'sortOrder': json['sortOrder'] == null ? undefined : json['sortOrder'],
'name': json['name'] == null ? undefined : json['name'],
'description': json['description'] == null ? undefined : json['description'],
'oneClickPaymentMode': json['oneClickPaymentMode'] == null ? undefined : (0, OneClickPaymentMode_1.OneClickPaymentModeFromJSON)(json['oneClickPaymentMode']),
'title': json['title'] == null ? undefined : json['title'],
'dataCollectionType': (0, DataCollectionType_1.DataCollectionTypeFromJSON)(json['dataCollectionType']),
'paymentMethod': json['paymentMethod'],
'state': (0, CreationEntityState_1.CreationEntityStateFromJSON)(json['state']),
};
}
function PaymentMethodConfigurationCreateToJSON(json) {
return PaymentMethodConfigurationCreateToJSONTyped(json, false);
}
function PaymentMethodConfigurationCreateToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'imageResourcePath': value['imageResourcePath'],
'sortOrder': value['sortOrder'],
'name': value['name'],
'description': value['description'],
'oneClickPaymentMode': (0, OneClickPaymentMode_1.OneClickPaymentModeToJSON)(value['oneClickPaymentMode']),
'title': value['title'],
'dataCollectionType': (0, DataCollectionType_1.DataCollectionTypeToJSON)(value['dataCollectionType']),
'paymentMethod': value['paymentMethod'],
'state': (0, CreationEntityState_1.CreationEntityStateToJSON)(value['state']),
};
}