wallee
Version:
TypeScript/JavaScript client for wallee
37 lines (36 loc) • 1.77 kB
JavaScript
import { LineItemFromJSON, LineItemToJSON, } from './LineItem';
import { ExpressCheckoutShippingOptionFromJSON, ExpressCheckoutShippingOptionToJSON, } from './ExpressCheckoutShippingOption';
/**
* Check if a given object implements the ExpressCheckoutSessionCreate interface.
*/
export function instanceOfExpressCheckoutSessionCreate(value) {
return true;
}
export function ExpressCheckoutSessionCreateFromJSON(json) {
return ExpressCheckoutSessionCreateFromJSONTyped(json, false);
}
export function ExpressCheckoutSessionCreateFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'lineItems': json['lineItems'] == null ? undefined : (json['lineItems'].map(LineItemFromJSON)),
'merchantShippingCallbackUrl': json['merchantShippingCallbackUrl'] == null ? undefined : json['merchantShippingCallbackUrl'],
'currency': json['currency'] == null ? undefined : json['currency'],
'shippingOptions': json['shippingOptions'] == null ? undefined : (json['shippingOptions'].map(ExpressCheckoutShippingOptionFromJSON)),
};
}
export function ExpressCheckoutSessionCreateToJSON(json) {
return ExpressCheckoutSessionCreateToJSONTyped(json, false);
}
export function ExpressCheckoutSessionCreateToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'lineItems': value['lineItems'] == null ? undefined : (value['lineItems'].map(LineItemToJSON)),
'merchantShippingCallbackUrl': value['merchantShippingCallbackUrl'],
'currency': value['currency'],
'shippingOptions': value['shippingOptions'] == null ? undefined : (value['shippingOptions'].map(ExpressCheckoutShippingOptionToJSON)),
};
}