/* tslint:disable */ /* eslint-disable */ /** * Hathora Cloud API * Welcome to the Hathora Cloud API documentation! Learn how to use the Hathora Cloud APIs to build and scale your game servers globally. * * The version of the OpenAPI document: 0.0.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { exists, mapValues } from '../runtime'; import type { CardBrand } from './CardBrand'; import { CardBrandFromJSON, CardBrandFromJSONTyped, CardBrandToJSON, } from './CardBrand'; /** * * @export * @interface CardPaymentMethod */ export interface CardPaymentMethod { /** * * @type {string} * @memberof CardPaymentMethod */ last4: string; /** * * @type {CardBrand} * @memberof CardPaymentMethod */ brand: CardBrand; } /** * Check if a given object implements the CardPaymentMethod interface. */ export function instanceOfCardPaymentMethod(value: object): boolean { let isInstance = true; isInstance = isInstance && "last4" in value; isInstance = isInstance && "brand" in value; return isInstance; } export function CardPaymentMethodFromJSON(json: any): CardPaymentMethod { return CardPaymentMethodFromJSONTyped(json, false); } export function CardPaymentMethodFromJSONTyped(json: any, ignoreDiscriminator: boolean): CardPaymentMethod { if ((json === undefined) || (json === null)) { return json; } return { 'last4': json['last4'], 'brand': CardBrandFromJSON(json['brand']), }; } export function CardPaymentMethodToJSON(value?: CardPaymentMethod | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'last4': value.last4, 'brand': CardBrandToJSON(value.brand), }; }