UNPKG

@ringer-tel/ivy

Version:
147 lines (136 loc) 4.59 kB
/* tslint:disable */ /* eslint-disable */ /** * Ringer Business API * This API provides comprehensive endpoints for the Ringer Business system. It includes functionality for managing customer accounts, addresses, sites, phone numbers, payments, users, and other business resources. Operations typically require authentication and appropriate permissions. * * The version of the OpenAPI document: 1.0.5 * Contact: support@ringer.tel * * 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 CreditCardCore */ export interface CreditCardCore { /** * Unique identifier for the credit card record. * @type {number} * @memberof CreditCardCore */ id: number; /** * A custom name or label for the credit card (e.g., "Work Visa", "Personal Amex"). * @type {string} * @memberof CreditCardCore */ name: string; /** * The last four digits of the credit card number. * @type {string} * @memberof CreditCardCore */ last4: string; /** * The brand of the credit card (e.g., Visa, Mastercard, American Express). * @type {string} * @memberof CreditCardCore */ brand: string; /** * The expiration month of the credit card (1-12). * @type {number} * @memberof CreditCardCore */ expMonth: number; /** * The expiration year of the credit card (e.g., 2025). * @type {number} * @memberof CreditCardCore */ expYear: number; /** * Priority for payment processing (higher numbers typically processed first). Range 0-100. * @type {number} * @memberof CreditCardCore */ priority: number; /** * Indicates if the card is active for payments. * @type {boolean} * @memberof CreditCardCore */ active: boolean; /** * Indicates if the card has been successfully verified. * @type {boolean} * @memberof CreditCardCore */ verified: boolean; /** * Indicates if the card is currently expired based on its expiration date. * @type {boolean} * @memberof CreditCardCore */ readonly expired: boolean; } /** * Check if a given object implements the CreditCardCore interface. */ export function instanceOfCreditCardCore(value: object): value is CreditCardCore { if (!('id' in value) || value['id'] === undefined) return false; if (!('name' in value) || value['name'] === undefined) return false; if (!('last4' in value) || value['last4'] === undefined) return false; if (!('brand' in value) || value['brand'] === undefined) return false; if (!('expMonth' in value) || value['expMonth'] === undefined) return false; if (!('expYear' in value) || value['expYear'] === undefined) return false; if (!('priority' in value) || value['priority'] === undefined) return false; if (!('active' in value) || value['active'] === undefined) return false; if (!('verified' in value) || value['verified'] === undefined) return false; if (!('expired' in value) || value['expired'] === undefined) return false; return true; } export function CreditCardCoreFromJSON(json: any): CreditCardCore { return CreditCardCoreFromJSONTyped(json, false); } export function CreditCardCoreFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreditCardCore { if (json == null) { return json; } return { 'id': json['id'], 'name': json['name'], 'last4': json['last4'], 'brand': json['brand'], 'expMonth': json['exp_month'], 'expYear': json['exp_year'], 'priority': json['priority'], 'active': json['active'], 'verified': json['verified'], 'expired': json['expired'], }; } export function CreditCardCoreToJSON(json: any): CreditCardCore { return CreditCardCoreToJSONTyped(json, false); } export function CreditCardCoreToJSONTyped(value?: Omit<CreditCardCore, 'expired'> | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'id': value['id'], 'name': value['name'], 'last4': value['last4'], 'brand': value['brand'], 'exp_month': value['expMonth'], 'exp_year': value['expYear'], 'priority': value['priority'], 'active': value['active'], 'verified': value['verified'], }; }