/* tslint:disable */ /* eslint-disable */ /** * My API * API documentation for my Laravel app * * The version of the OpenAPI document: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { mapValues } from '../runtime'; /** * * @export * @interface CartCouponLiteResource */ export interface CartCouponLiteResource { /** * * @type {number} * @memberof CartCouponLiteResource */ id: number; /** * * @type {string} * @memberof CartCouponLiteResource */ code: string; /** * * @type {string} * @memberof CartCouponLiteResource */ name: string; /** * * @type {number} * @memberof CartCouponLiteResource */ discount: number; /** * * @type {string} * @memberof CartCouponLiteResource */ appliesTo: string; } /** * Check if a given object implements the CartCouponLiteResource interface. */ export function instanceOfCartCouponLiteResource(value: object): value is CartCouponLiteResource { if (!('id' in value) || value['id'] === undefined) return false; if (!('code' in value) || value['code'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; if (!('discount' in value) || value['discount'] === undefined) return false; if (!('appliesTo' in value) || value['appliesTo'] === undefined) return false; return true; } export function CartCouponLiteResourceFromJSON(json: any): CartCouponLiteResource { return CartCouponLiteResourceFromJSONTyped(json, false); } export function CartCouponLiteResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): CartCouponLiteResource { if (json == null) { return json; } return { 'id': json['id'], 'code': json['code'], 'name': json['name'], 'discount': json['discount'], 'appliesTo': json['appliesTo'], }; } export function CartCouponLiteResourceToJSON(json: any): CartCouponLiteResource { return CartCouponLiteResourceToJSONTyped(json, false); } export function CartCouponLiteResourceToJSONTyped(value?: CartCouponLiteResource | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'code': value['code'], 'name': value['name'], 'discount': value['discount'], 'appliesTo': value['appliesTo'], }; }