wallee
Version:
TypeScript/JavaScript client for wallee
44 lines (43 loc) • 2.27 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.instanceOfExpressCheckoutSessionCreate = instanceOfExpressCheckoutSessionCreate;
exports.ExpressCheckoutSessionCreateFromJSON = ExpressCheckoutSessionCreateFromJSON;
exports.ExpressCheckoutSessionCreateFromJSONTyped = ExpressCheckoutSessionCreateFromJSONTyped;
exports.ExpressCheckoutSessionCreateToJSON = ExpressCheckoutSessionCreateToJSON;
exports.ExpressCheckoutSessionCreateToJSONTyped = ExpressCheckoutSessionCreateToJSONTyped;
const LineItem_1 = require("./LineItem");
const ExpressCheckoutShippingOption_1 = require("./ExpressCheckoutShippingOption");
/**
* Check if a given object implements the ExpressCheckoutSessionCreate interface.
*/
function instanceOfExpressCheckoutSessionCreate(value) {
return true;
}
function ExpressCheckoutSessionCreateFromJSON(json) {
return ExpressCheckoutSessionCreateFromJSONTyped(json, false);
}
function ExpressCheckoutSessionCreateFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'lineItems': json['lineItems'] == null ? undefined : (json['lineItems'].map(LineItem_1.LineItemFromJSON)),
'merchantShippingCallbackUrl': json['merchantShippingCallbackUrl'] == null ? undefined : json['merchantShippingCallbackUrl'],
'currency': json['currency'] == null ? undefined : json['currency'],
'shippingOptions': json['shippingOptions'] == null ? undefined : (json['shippingOptions'].map(ExpressCheckoutShippingOption_1.ExpressCheckoutShippingOptionFromJSON)),
};
}
function ExpressCheckoutSessionCreateToJSON(json) {
return ExpressCheckoutSessionCreateToJSONTyped(json, false);
}
function ExpressCheckoutSessionCreateToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'lineItems': value['lineItems'] == null ? undefined : (value['lineItems'].map(LineItem_1.LineItemToJSON)),
'merchantShippingCallbackUrl': value['merchantShippingCallbackUrl'],
'currency': value['currency'],
'shippingOptions': value['shippingOptions'] == null ? undefined : (value['shippingOptions'].map(ExpressCheckoutShippingOption_1.ExpressCheckoutShippingOptionToJSON)),
};
}