Skip to content

Instantly share code, notes, and snippets.

@kitze
Created April 16, 2021 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kitze/a2690e02413c2ae4e130aff3a18a95a8 to your computer and use it in GitHub Desktop.
Save kitze/a2690e02413c2ae4e130aff3a18a95a8 to your computer and use it in GitHub Desktop.
/* tslint:disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
export type Schema =
| {
success?: boolean;
response?: {
subscription_id?: number;
plan_id?: number;
user_id?: number;
user_email?: string;
marketing_consent?: boolean;
state?: "active" | "past_due" | "trialling" | "deleted" | "paused";
signup_date?: string;
last_payment?: {
amount?: number;
currency?: string;
date?: string;
[k: string]: unknown;
};
next_payment?: {
amount?: number;
currency?: string;
date?: string;
[k: string]: unknown;
};
update_url?: string;
cancel_url?: string;
paused_at?: string;
paused_from?: string;
payment_information?:
| {
payment_method?: "card";
card_type?:
| "master"
| "visa"
| "american_express"
| "discover"
| "jcb"
| "maestro"
| "diners_club"
| "unionpay";
last_four_digits?: string;
expiry_date?: string;
[k: string]: unknown;
}
| {
payment_method?: "paypal";
[k: string]: unknown;
};
[k: string]: unknown;
}[];
[k: string]: unknown;
}
| Error;
/**
* An unsuccessful call to the Dashboard API will return a 200 response containing a field `success` set to `false` and an error object.
*/
export interface Error {
success?: boolean;
error?: {
/**
* See [list of error codes](/api-reference/intro/api-error-codes).
*/
code?: number;
message?: string;
[k: string]: unknown;
};
[k: string]: unknown;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment