/* tslint:disable */ /* eslint-disable */ /** * Sonatype Guide API * REST API into [Sonatype Guide](https://guide.sonatype.com). * * The version of the OpenAPI document: 202607 * * * 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'; /** * * @export * @interface BillingDTO */ export interface BillingDTO { /** * * @type {Date} * @memberof BillingDTO */ billingPeriodEnd?: Date; /** * * @type {Date} * @memberof BillingDTO */ billingPeriodStart?: Date; /** * * @type {number} * @memberof BillingDTO */ monthlyCost?: number; /** * * @type {string} * @memberof BillingDTO */ paymentMethod?: string; /** * * @type {string} * @memberof BillingDTO */ status?: BillingDTOStatusEnum; } /** * @export */ export const BillingDTOStatusEnum = { Future: 'FUTURE', InTrial: 'IN_TRIAL', Active: 'ACTIVE', NonRenewing: 'NON_RENEWING', Paused: 'PAUSED', Cancelled: 'CANCELLED', Transferred: 'TRANSFERRED' } as const; export type BillingDTOStatusEnum = typeof BillingDTOStatusEnum[keyof typeof BillingDTOStatusEnum]; /** * Check if a given object implements the BillingDTO interface. */ export function instanceOfBillingDTO(value: object): value is BillingDTO { return true; } export function BillingDTOFromJSON(json: any): BillingDTO { return BillingDTOFromJSONTyped(json, false); } export function BillingDTOFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillingDTO { if (json == null) { return json; } return { 'billingPeriodEnd': json['billingPeriodEnd'] == null ? undefined : (new Date(json['billingPeriodEnd'])), 'billingPeriodStart': json['billingPeriodStart'] == null ? undefined : (new Date(json['billingPeriodStart'])), 'monthlyCost': json['monthlyCost'] == null ? undefined : json['monthlyCost'], 'paymentMethod': json['paymentMethod'] == null ? undefined : json['paymentMethod'], 'status': json['status'] == null ? undefined : json['status'], }; } export function BillingDTOToJSON(json: any): BillingDTO { return BillingDTOToJSONTyped(json, false); } export function BillingDTOToJSONTyped(value?: BillingDTO | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'billingPeriodEnd': value['billingPeriodEnd'] == null ? value['billingPeriodEnd'] : value['billingPeriodEnd'].toISOString().substring(0,10), 'billingPeriodStart': value['billingPeriodStart'] == null ? value['billingPeriodStart'] : value['billingPeriodStart'].toISOString().substring(0,10), 'monthlyCost': value['monthlyCost'], 'paymentMethod': value['paymentMethod'], 'status': value['status'], }; }