UNPKG

@ringer-tel/ivy

Version:
122 lines (110 loc) 4.18 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'; import type { CreditCardResponse } from './CreditCardResponse'; import { CreditCardResponseFromJSON, CreditCardResponseFromJSONTyped, CreditCardResponseToJSON, CreditCardResponseToJSONTyped, } from './CreditCardResponse'; import type { SchemasLink } from './SchemasLink'; import { SchemasLinkFromJSON, SchemasLinkFromJSONTyped, SchemasLinkToJSON, SchemasLinkToJSONTyped, } from './SchemasLink'; /** * A paginated list of credit cards associated with an account. * @export * @interface PaginatedCreditCardListResponse */ export interface PaginatedCreditCardListResponse { /** * * @type {Array<CreditCardResponse>} * @memberof PaginatedCreditCardListResponse */ creditCards: Array<CreditCardResponse>; /** * Total number of credit cards. * @type {number} * @memberof PaginatedCreditCardListResponse */ totalItems?: number; /** * Total number of pages. * @type {number} * @memberof PaginatedCreditCardListResponse */ totalPages?: number; /** * Current page number. * @type {number} * @memberof PaginatedCreditCardListResponse */ currentPage?: number; /** * Number of items per page. * @type {number} * @memberof PaginatedCreditCardListResponse */ perPage?: number; /** * * @type {Array<SchemasLink>} * @memberof PaginatedCreditCardListResponse */ links?: Array<SchemasLink> | null; } /** * Check if a given object implements the PaginatedCreditCardListResponse interface. */ export function instanceOfPaginatedCreditCardListResponse(value: object): value is PaginatedCreditCardListResponse { if (!('creditCards' in value) || value['creditCards'] === undefined) return false; return true; } export function PaginatedCreditCardListResponseFromJSON(json: any): PaginatedCreditCardListResponse { return PaginatedCreditCardListResponseFromJSONTyped(json, false); } export function PaginatedCreditCardListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedCreditCardListResponse { if (json == null) { return json; } return { 'creditCards': ((json['credit_cards'] as Array<any>).map(CreditCardResponseFromJSON)), 'totalItems': json['total_items'] == null ? undefined : json['total_items'], 'totalPages': json['total_pages'] == null ? undefined : json['total_pages'], 'currentPage': json['current_page'] == null ? undefined : json['current_page'], 'perPage': json['per_page'] == null ? undefined : json['per_page'], 'links': json['links'] == null ? undefined : ((json['links'] as Array<any>).map(SchemasLinkFromJSON)), }; } export function PaginatedCreditCardListResponseToJSON(json: any): PaginatedCreditCardListResponse { return PaginatedCreditCardListResponseToJSONTyped(json, false); } export function PaginatedCreditCardListResponseToJSONTyped(value?: PaginatedCreditCardListResponse | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'credit_cards': ((value['creditCards'] as Array<any>).map(CreditCardResponseToJSON)), 'total_items': value['totalItems'], 'total_pages': value['totalPages'], 'current_page': value['currentPage'], 'per_page': value['perPage'], 'links': value['links'] == null ? undefined : ((value['links'] as Array<any>).map(SchemasLinkToJSON)), }; }