/* tslint:disable */ /* eslint-disable */ /** * Paystack * The OpenAPI specification of the Paystack API that merchants and developers can harness to build financial solutions in Africa. * * The version of the Paystack Node library: 1.0.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ import { exists, mapValues } from '../runtime'; /** * * @export * @interface RefundCreate */ export interface RefundCreate { /** * Transaction reference or id * @type {string} * @memberof RefundCreate */ transaction: string; /** * Amount ( in kobo if currency is NGN, pesewas, if currency is GHS, and cents, if currency is ZAR ) to be refunded to the customer. * Amount cannot be more than the original transaction amount * @type {number} * @memberof RefundCreate */ amount?: number; /** * Three-letter ISO currency. Allowed values are NGN, GHS, ZAR or USD * @type {string} * @memberof RefundCreate */ currency?: string; /** * Customer reason * @type {string} * @memberof RefundCreate */ customerNote?: string; /** * Merchant reason * @type {string} * @memberof RefundCreate */ merchantNote?: string; } export function RefundCreateFromJSON(json: any): RefundCreate { return RefundCreateFromJSONTyped(json, false); } export function RefundCreateFromJSONTyped(json: any, ignoreDiscriminator: boolean): RefundCreate { if ((json === undefined) || (json === null)) { return json; } return { 'transaction': json['transaction'], 'amount': !exists(json, 'amount') ? undefined : json['amount'], 'currency': !exists(json, 'currency') ? undefined : json['currency'], 'customerNote': !exists(json, 'customer_note') ? undefined : json['customer_note'], 'merchantNote': !exists(json, 'merchant_note') ? undefined : json['merchant_note'], }; } export function RefundCreateToJSON(value?: RefundCreate | null): any { if (value === undefined) { return undefined; } if (value === null) { return null; } return { 'transaction': value.transaction, 'amount': value.amount, 'currency': value.currency, 'customer_note': value.customerNote, 'merchant_note': value.merchantNote, }; }