/* 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 AppliedCouponResource */ export interface AppliedCouponResource { /** * * @type {number} * @memberof AppliedCouponResource */ id: number; /** * * @type {string} * @memberof AppliedCouponResource */ code: string; /** * * @type {string} * @memberof AppliedCouponResource */ name: string; /** * * @type {string} * @memberof AppliedCouponResource */ type: string; /** * * @type {string} * @memberof AppliedCouponResource */ discountType: string; /** * * @type {number} * @memberof AppliedCouponResource */ discountAmount: number; /** * * @type {number} * @memberof AppliedCouponResource */ minAmount: number; /** * * @type {number} * @memberof AppliedCouponResource */ minProducts: number; /** * * @type {number} * @memberof AppliedCouponResource */ discountTotal: number; } /** * Check if a given object implements the AppliedCouponResource interface. */ export function instanceOfAppliedCouponResource(value: object): value is AppliedCouponResource { 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 (!('type' in value) || value['type'] === undefined) return false; if (!('discountType' in value) || value['discountType'] === undefined) return false; if (!('discountAmount' in value) || value['discountAmount'] === undefined) return false; if (!('minAmount' in value) || value['minAmount'] === undefined) return false; if (!('minProducts' in value) || value['minProducts'] === undefined) return false; if (!('discountTotal' in value) || value['discountTotal'] === undefined) return false; return true; } export function AppliedCouponResourceFromJSON(json: any): AppliedCouponResource { return AppliedCouponResourceFromJSONTyped(json, false); } export function AppliedCouponResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): AppliedCouponResource { if (json == null) { return json; } return { 'id': json['id'], 'code': json['code'], 'name': json['name'], 'type': json['type'], 'discountType': json['discountType'], 'discountAmount': json['discountAmount'], 'minAmount': json['minAmount'], 'minProducts': json['minProducts'], 'discountTotal': json['discountTotal'], }; } export function AppliedCouponResourceToJSON(json: any): AppliedCouponResource { return AppliedCouponResourceToJSONTyped(json, false); } export function AppliedCouponResourceToJSONTyped(value?: AppliedCouponResource | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'code': value['code'], 'name': value['name'], 'type': value['type'], 'discountType': value['discountType'], 'discountAmount': value['discountAmount'], 'minAmount': value['minAmount'], 'minProducts': value['minProducts'], 'discountTotal': value['discountTotal'], }; }