wallee
Version:
TypeScript/JavaScript client for wallee
50 lines (49 loc) • 2.64 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfPaymentConnectorConfigurationUpdate = instanceOfPaymentConnectorConfigurationUpdate;
exports.PaymentConnectorConfigurationUpdateFromJSON = PaymentConnectorConfigurationUpdateFromJSON;
exports.PaymentConnectorConfigurationUpdateFromJSONTyped = PaymentConnectorConfigurationUpdateFromJSONTyped;
exports.PaymentConnectorConfigurationUpdateToJSON = PaymentConnectorConfigurationUpdateToJSON;
exports.PaymentConnectorConfigurationUpdateToJSONTyped = PaymentConnectorConfigurationUpdateToJSONTyped;
const Condition_1 = require("./Condition");
const SalesChannel_1 = require("./SalesChannel");
/**
* Check if a given object implements the PaymentConnectorConfigurationUpdate interface.
*/
function instanceOfPaymentConnectorConfigurationUpdate(value) {
if (!('version' in value) || value['version'] === undefined)
return false;
return true;
}
function PaymentConnectorConfigurationUpdateFromJSON(json) {
return PaymentConnectorConfigurationUpdateFromJSONTyped(json, false);
}
function PaymentConnectorConfigurationUpdateFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'name': json['name'] == null ? undefined : json['name'],
'enabledSpaceViews': json['enabledSpaceViews'] == null ? undefined : new Set(json['enabledSpaceViews']),
'conditions': json['conditions'] == null ? undefined : (json['conditions'].map(Condition_1.ConditionFromJSON)),
'priority': json['priority'] == null ? undefined : json['priority'],
'enabledSalesChannels': json['enabledSalesChannels'] == null ? undefined : (new Set(json['enabledSalesChannels'].map(SalesChannel_1.SalesChannelFromJSON))),
'version': json['version'],
};
}
function PaymentConnectorConfigurationUpdateToJSON(json) {
return PaymentConnectorConfigurationUpdateToJSONTyped(json, false);
}
function PaymentConnectorConfigurationUpdateToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'name': value['name'],
'enabledSpaceViews': value['enabledSpaceViews'] == null ? undefined : Array.from(value['enabledSpaceViews']),
'conditions': value['conditions'] == null ? undefined : (value['conditions'].map(Condition_1.ConditionToJSON)),
'priority': value['priority'],
'enabledSalesChannels': value['enabledSalesChannels'] == null ? undefined : (Array.from(value['enabledSalesChannels']).map(SalesChannel_1.SalesChannelToJSON)),
'version': value['version'],
};
}