wallee
Version:
TypeScript/JavaScript client for wallee
54 lines (53 loc) • 2.6 kB
JavaScript
import { OneClickPaymentModeFromJSON, OneClickPaymentModeToJSON, } from './OneClickPaymentMode';
import { CreationEntityStateFromJSON, CreationEntityStateToJSON, } from './CreationEntityState';
import { DataCollectionTypeFromJSON, DataCollectionTypeToJSON, } from './DataCollectionType';
/**
* Check if a given object implements the PaymentMethodConfigurationCreate interface.
*/
export 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;
}
export function PaymentMethodConfigurationCreateFromJSON(json) {
return PaymentMethodConfigurationCreateFromJSONTyped(json, false);
}
export 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 : OneClickPaymentModeFromJSON(json['oneClickPaymentMode']),
'title': json['title'] == null ? undefined : json['title'],
'dataCollectionType': DataCollectionTypeFromJSON(json['dataCollectionType']),
'paymentMethod': json['paymentMethod'],
'state': CreationEntityStateFromJSON(json['state']),
};
}
export function PaymentMethodConfigurationCreateToJSON(json) {
return PaymentMethodConfigurationCreateToJSONTyped(json, false);
}
export function PaymentMethodConfigurationCreateToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'imageResourcePath': value['imageResourcePath'],
'sortOrder': value['sortOrder'],
'name': value['name'],
'description': value['description'],
'oneClickPaymentMode': OneClickPaymentModeToJSON(value['oneClickPaymentMode']),
'title': value['title'],
'dataCollectionType': DataCollectionTypeToJSON(value['dataCollectionType']),
'paymentMethod': value['paymentMethod'],
'state': CreationEntityStateToJSON(value['state']),
};
}