UNPKG

@ringer-tel/ivy

Version:
126 lines (114 loc) 4.12 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.6 * 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 { SchemasLink } from './SchemasLink'; import { SchemasLinkFromJSON, SchemasLinkFromJSONTyped, SchemasLinkToJSON, SchemasLinkToJSONTyped, } from './SchemasLink'; import type { PaymentResponse } from './PaymentResponse'; import { PaymentResponseFromJSON, PaymentResponseFromJSONTyped, PaymentResponseToJSON, PaymentResponseToJSONTyped, } from './PaymentResponse'; /** * A paginated list of payment transactions. * @export * @interface PaymentListResponse */ export interface PaymentListResponse { /** * * @type {Array<PaymentResponse>} * @memberof PaymentListResponse */ payments: Array<PaymentResponse>; /** * Total number of payment records available. * @type {number} * @memberof PaymentListResponse */ totalItems: number; /** * Total number of pages based on `per_page`. * @type {number} * @memberof PaymentListResponse */ totalPages: number; /** * The current page number being displayed. * @type {number} * @memberof PaymentListResponse */ currentPage: number; /** * The number of items per page. * @type {number} * @memberof PaymentListResponse */ perPage: number; /** * HATEOAS links for pagination and related resources. * @type {Array<SchemasLink>} * @memberof PaymentListResponse */ links?: Array<SchemasLink> | null; } /** * Check if a given object implements the PaymentListResponse interface. */ export function instanceOfPaymentListResponse(value: object): value is PaymentListResponse { if (!('payments' in value) || value['payments'] === undefined) return false; if (!('totalItems' in value) || value['totalItems'] === undefined) return false; if (!('totalPages' in value) || value['totalPages'] === undefined) return false; if (!('currentPage' in value) || value['currentPage'] === undefined) return false; if (!('perPage' in value) || value['perPage'] === undefined) return false; return true; } export function PaymentListResponseFromJSON(json: any): PaymentListResponse { return PaymentListResponseFromJSONTyped(json, false); } export function PaymentListResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaymentListResponse { if (json == null) { return json; } return { 'payments': ((json['payments'] as Array<any>).map(PaymentResponseFromJSON)), 'totalItems': json['total_items'], 'totalPages': json['total_pages'], 'currentPage': json['current_page'], 'perPage': json['per_page'], 'links': json['links'] == null ? undefined : ((json['links'] as Array<any>).map(SchemasLinkFromJSON)), }; } export function PaymentListResponseToJSON(json: any): PaymentListResponse { return PaymentListResponseToJSONTyped(json, false); } export function PaymentListResponseToJSONTyped(value?: PaymentListResponse | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'payments': ((value['payments'] as Array<any>).map(PaymentResponseToJSON)), '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)), }; }