import { FleioId, IBaseFleioObjectModel } from '@fleio-api/base-model/base-fleio-object.model';

export enum ServiceCycleTypes {
  OneTime = 'one time',
  Recurring = 'recurring',
}

export enum ServiceCycleBillingTypes {
  PrePaid = 'prepaid',
  PostPaid = 'postpaid',
}

export enum ServiceCycleStates {
  InProgress = 'in progress',
  Unpaid = 'unpaid',
  Invoiced = 'invoiced',
  Paid = 'paid',
  Refunded = 'refunded',
  PaymentCanceled = 'payment canceled',
}

export interface IServiceCycleModel extends IBaseFleioObjectModel {
  invoice_id?: FleioId;
  type: ServiceCycleTypes;
  billing_type: ServiceCycleBillingTypes;
  state: ServiceCycleStates;
  start_dt: Date;
  end_dt: Date;
  start_display: string;
  end_display: string;
  fixed_price: number;
  dynamic_price: number;
  price: number;
  price_timestamp: Date;
  service: FleioId;
  currency: string;
  standard_price: string;
  price_override: boolean;
  price_override_model: string;
}
