-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* temp * add change plan logic; sort available plans * add charges * add gap
- Loading branch information
Showing
12 changed files
with
755 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* Schematic API | ||
* Schematic API | ||
* | ||
* The version of the OpenAPI document: 0.1 | ||
* | ||
* | ||
* 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 { PreviewSubscriptionChangeResponseData } from "./PreviewSubscriptionChangeResponseData"; | ||
import { | ||
PreviewSubscriptionChangeResponseDataFromJSON, | ||
PreviewSubscriptionChangeResponseDataFromJSONTyped, | ||
PreviewSubscriptionChangeResponseDataToJSON, | ||
} from "./PreviewSubscriptionChangeResponseData"; | ||
|
||
/** | ||
* | ||
* @export | ||
* @interface PreviewCheckoutResponse | ||
*/ | ||
export interface PreviewCheckoutResponse { | ||
/** | ||
* | ||
* @type {PreviewSubscriptionChangeResponseData} | ||
* @memberof PreviewCheckoutResponse | ||
*/ | ||
data: PreviewSubscriptionChangeResponseData; | ||
/** | ||
* Input parameters | ||
* @type {object} | ||
* @memberof PreviewCheckoutResponse | ||
*/ | ||
params: object; | ||
} | ||
|
||
/** | ||
* Check if a given object implements the PreviewCheckoutResponse interface. | ||
*/ | ||
export function instanceOfPreviewCheckoutResponse( | ||
value: object, | ||
): value is PreviewCheckoutResponse { | ||
if (!("data" in value) || value["data"] === undefined) return false; | ||
if (!("params" in value) || value["params"] === undefined) return false; | ||
return true; | ||
} | ||
|
||
export function PreviewCheckoutResponseFromJSON( | ||
json: any, | ||
): PreviewCheckoutResponse { | ||
return PreviewCheckoutResponseFromJSONTyped(json, false); | ||
} | ||
|
||
export function PreviewCheckoutResponseFromJSONTyped( | ||
json: any, | ||
ignoreDiscriminator: boolean, | ||
): PreviewCheckoutResponse { | ||
if (json == null) { | ||
return json; | ||
} | ||
return { | ||
data: PreviewSubscriptionChangeResponseDataFromJSON(json["data"]), | ||
params: json["params"], | ||
}; | ||
} | ||
|
||
export function PreviewCheckoutResponseToJSON( | ||
value?: PreviewCheckoutResponse | null, | ||
): any { | ||
if (value == null) { | ||
return value; | ||
} | ||
return { | ||
data: PreviewSubscriptionChangeResponseDataToJSON(value["data"]), | ||
params: value["params"], | ||
}; | ||
} |
86 changes: 86 additions & 0 deletions
86
react/src/api/models/PreviewSubscriptionChangeResponseData.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
/** | ||
* Schematic API | ||
* Schematic API | ||
* | ||
* The version of the OpenAPI document: 0.1 | ||
* | ||
* | ||
* 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"; | ||
/** | ||
* The created resource | ||
* @export | ||
* @interface PreviewSubscriptionChangeResponseData | ||
*/ | ||
export interface PreviewSubscriptionChangeResponseData { | ||
/** | ||
* | ||
* @type {number} | ||
* @memberof PreviewSubscriptionChangeResponseData | ||
*/ | ||
dueNow: number; | ||
/** | ||
* | ||
* @type {number} | ||
* @memberof PreviewSubscriptionChangeResponseData | ||
*/ | ||
newCharges: number; | ||
/** | ||
* | ||
* @type {number} | ||
* @memberof PreviewSubscriptionChangeResponseData | ||
*/ | ||
proration: number; | ||
} | ||
|
||
/** | ||
* Check if a given object implements the PreviewSubscriptionChangeResponseData interface. | ||
*/ | ||
export function instanceOfPreviewSubscriptionChangeResponseData( | ||
value: object, | ||
): value is PreviewSubscriptionChangeResponseData { | ||
if (!("dueNow" in value) || value["dueNow"] === undefined) return false; | ||
if (!("newCharges" in value) || value["newCharges"] === undefined) | ||
return false; | ||
if (!("proration" in value) || value["proration"] === undefined) return false; | ||
return true; | ||
} | ||
|
||
export function PreviewSubscriptionChangeResponseDataFromJSON( | ||
json: any, | ||
): PreviewSubscriptionChangeResponseData { | ||
return PreviewSubscriptionChangeResponseDataFromJSONTyped(json, false); | ||
} | ||
|
||
export function PreviewSubscriptionChangeResponseDataFromJSONTyped( | ||
json: any, | ||
ignoreDiscriminator: boolean, | ||
): PreviewSubscriptionChangeResponseData { | ||
if (json == null) { | ||
return json; | ||
} | ||
return { | ||
dueNow: json["due_now"], | ||
newCharges: json["new_charges"], | ||
proration: json["proration"], | ||
}; | ||
} | ||
|
||
export function PreviewSubscriptionChangeResponseDataToJSON( | ||
value?: PreviewSubscriptionChangeResponseData | null, | ||
): any { | ||
if (value == null) { | ||
return value; | ||
} | ||
return { | ||
due_now: value["dueNow"], | ||
new_charges: value["newCharges"], | ||
proration: value["proration"], | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.