export interface SubscriptionPeriodResponse {
  results: SubscriptionPeriod[];
  next: null;
  previous: null;
  count: number;
}

export interface SubscriptionPeriod {
  id: number;
  subscription_id: number;
  from_date: string;
  expiry_date: string;
  amount: string;
  purchase_number: number;
  due_date: string;
  date_confirmed: string;
  charges: Charge[];
}

export interface Charge {
  id: number;
  attempt: number;
  payment_token: PaymentToken;
  payment_identifier: string;
  date_failed: null;
  reason: string;
  date_created: string;
}

export interface PaymentToken {
  id: number;
  provider: string;
  method: string;
  summary: string;
  expiry_date: string;
  date_created: string;
}

export interface Subscription {
  id: number;
  name: string;
  membership_number: number;
  plan: string;
  nth: number;
  periodicity: string;
  amount: string;
  currency: string;
  state: string;
  is_cancelled: boolean;
  date_cancelled: string;
  date_created: string;
  start_date: string;
  end_date: string;
  expiry_date: string;
  voucher_codes: string[];
}
