/**
 * AdvancedBilling
 *
 * This file was automatically generated for Maxio by APIMATIC v3.0 ( https://www.apimatic.io ).
 */

import {
  bigint,
  boolean,
  expandoObject,
  number,
  optional,
  Schema,
  string,
} from '../schema.js';
import {
  PrepaymentMethod,
  prepaymentMethodSchema,
} from './prepaymentMethod.js';

export interface ListSubcriptionGroupPrepaymentItem {
  id?: number;
  subscriptionGroupUid?: string;
  amountInCents?: bigint;
  remainingAmountInCents?: bigint;
  details?: string;
  external?: boolean;
  memo?: string;
  paymentType?: PrepaymentMethod;
  createdAt?: string;
  [key: string]: unknown;
}

export const listSubcriptionGroupPrepaymentItemSchema: Schema<ListSubcriptionGroupPrepaymentItem> = expandoObject(
  {
    id: ['id', optional(number())],
    subscriptionGroupUid: ['subscription_group_uid', optional(string())],
    amountInCents: ['amount_in_cents', optional(bigint())],
    remainingAmountInCents: ['remaining_amount_in_cents', optional(bigint())],
    details: ['details', optional(string())],
    external: ['external', optional(boolean())],
    memo: ['memo', optional(string())],
    paymentType: ['payment_type', optional(prepaymentMethodSchema)],
    createdAt: ['created_at', optional(string())],
  }
);
