/* tslint:disable */
/* eslint-disable */
/**
 * Tribufu API
 * API to access Tribufu services.
 *
 * The version of the OpenAPI document: 1.3.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 ProductPrice
 */
export interface ProductPrice {
    /**
     * 
     * @type {string}
     * @memberof ProductPrice
     */
    currency: string | null;
    /**
     * 
     * @type {number}
     * @memberof ProductPrice
     */
    amount?: number;
    /**
     * 
     * @type {number}
     * @memberof ProductPrice
     */
    renewal?: number | null;
}

/**
 * Check if a given object implements the ProductPrice interface.
 */
export function instanceOfProductPrice(value: object): value is ProductPrice {
    if (!('currency' in value) || value['currency'] === undefined) return false;
    return true;
}

export function ProductPriceFromJSON(json: any): ProductPrice {
    return ProductPriceFromJSONTyped(json, false);
}

export function ProductPriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProductPrice {
    if (json == null) {
        return json;
    }
    return {
        
        'currency': json['currency'],
        'amount': json['amount'] == null ? undefined : json['amount'],
        'renewal': json['renewal'] == null ? undefined : json['renewal'],
    };
}

export function ProductPriceToJSON(json: any): ProductPrice {
    return ProductPriceToJSONTyped(json, false);
}

export function ProductPriceToJSONTyped(value?: ProductPrice | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {
        
        'currency': value['currency'],
        'amount': value['amount'],
        'renewal': value['renewal'],
    };
}

