/* tslint:disable */
/* eslint-disable */
/**
 * RMI Backend
 * Rug Munch Intelligence — institutional-grade crypto intelligence API. 13+ chains, 96 data providers, 8 MCP tools, x402 paid tier, sovereign-first FOSS.
 *
 * The version of the OpenAPI document: 2026.06.21
 * 
 *
 * 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 ReceiptResponse
 */
export interface ReceiptResponse {
    /**
     * 
     * @type {string}
     * @memberof ReceiptResponse
     */
    txHash: string;
    /**
     * 
     * @type {string}
     * @memberof ReceiptResponse
     */
    tool: string;
    /**
     * 
     * @type {string}
     * @memberof ReceiptResponse
     */
    agentId?: string | null;
    /**
     * 
     * @type {number}
     * @memberof ReceiptResponse
     */
    amountUsd: number;
    /**
     * 
     * @type {string}
     * @memberof ReceiptResponse
     */
    chain?: string | null;
    /**
     * 
     * @type {string}
     * @memberof ReceiptResponse
     */
    paidAt?: string | null;
    /**
     * 
     * @type {string}
     * @memberof ReceiptResponse
     */
    tier?: string | null;
}

/**
 * Check if a given object implements the ReceiptResponse interface.
 */
export function instanceOfReceiptResponse(value: object): value is ReceiptResponse {
    if ((!('txHash' in value) && !('tx_hash' in value)) || (value['txHash'] === undefined && value['tx_hash'] === undefined)) return false;
    if (!('tool' in value) || value['tool'] === undefined) return false;
    if ((!('amountUsd' in value) && !('amount_usd' in value)) || (value['amountUsd'] === undefined && value['amount_usd'] === undefined)) return false;
    return true;
}

export function ReceiptResponseFromJSON(json: any): ReceiptResponse {
    return ReceiptResponseFromJSONTyped(json, false);
}

export function ReceiptResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ReceiptResponse {
    if (json == null) {
        return json;
    }
    return {
        
        'txHash': json['tx_hash'],
        'tool': json['tool'],
        'agentId': json['agent_id'] == null ? undefined : json['agent_id'],
        'amountUsd': json['amount_usd'],
        'chain': json['chain'] == null ? undefined : json['chain'],
        'paidAt': json['paid_at'] == null ? undefined : json['paid_at'],
        'tier': json['tier'] == null ? undefined : json['tier'],
    };
}

export function ReceiptResponseToJSON(json: any): ReceiptResponse {
    return ReceiptResponseToJSONTyped(json, false);
}

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

    return {
        
        'tx_hash': value['txHash'],
        'tool': value['tool'],
        'agent_id': value['agentId'],
        'amount_usd': value['amountUsd'],
        'chain': value['chain'],
        'paid_at': value['paidAt'],
        'tier': value['tier'],
    };
}

