Files
sdk-js/src/models/SubscriptionPrice.ts
2025-08-09 20:29:17 -03:00

84 lines
2.0 KiB
TypeScript

/* tslint:disable */
/* eslint-disable */
/**
* Tribufu API
* API to access Tribufu services.
*
* The version of the OpenAPI document: 1.2.0
* Contact: contact@tribufu.com
*
* 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 SubscriptionPrice
*/
export interface SubscriptionPrice {
/**
*
* @type {string}
* @memberof SubscriptionPrice
*/
currency: string | null;
/**
*
* @type {number}
* @memberof SubscriptionPrice
*/
amount: number;
/**
*
* @type {number}
* @memberof SubscriptionPrice
*/
renewal?: number | null;
}
/**
* Check if a given object implements the SubscriptionPrice interface.
*/
export function instanceOfSubscriptionPrice(value: object): value is SubscriptionPrice {
if (!('currency' in value) || value['currency'] === undefined) return false;
if (!('amount' in value) || value['amount'] === undefined) return false;
return true;
}
export function SubscriptionPriceFromJSON(json: any): SubscriptionPrice {
return SubscriptionPriceFromJSONTyped(json, false);
}
export function SubscriptionPriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): SubscriptionPrice {
if (json == null) {
return json;
}
return {
'currency': json['currency'],
'amount': json['amount'],
'renewal': json['renewal'] == null ? undefined : json['renewal'],
};
}
export function SubscriptionPriceToJSON(json: any): SubscriptionPrice {
return SubscriptionPriceToJSONTyped(json, false);
}
export function SubscriptionPriceToJSONTyped(value?: SubscriptionPrice | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'currency': value['currency'],
'amount': value['amount'],
'renewal': value['renewal'],
};
}