UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

61 lines (60 loc) 2.45 kB
"use strict"; /* tslint:disable */ /* eslint-disable */ /** * OpenPay API * super charge your subscription management. * * The version of the OpenAPI document: 1.2.1 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.instanceOfCreateRefundRequest = instanceOfCreateRefundRequest; exports.CreateRefundRequestFromJSON = CreateRefundRequestFromJSON; exports.CreateRefundRequestFromJSONTyped = CreateRefundRequestFromJSONTyped; exports.CreateRefundRequestToJSON = CreateRefundRequestToJSON; exports.CreateRefundRequestToJSONTyped = CreateRefundRequestToJSONTyped; const CurrencyEnum_1 = require("./CurrencyEnum"); const RefundReasonEnum_1 = require("./RefundReasonEnum"); /** * Check if a given object implements the CreateRefundRequest interface. */ function instanceOfCreateRefundRequest(value) { return true; } function CreateRefundRequestFromJSON(json) { return CreateRefundRequestFromJSONTyped(json, false); } function CreateRefundRequestFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'amountAtom': json['amount_atom'] == null ? undefined : json['amount_atom'], 'chargeId': json['charge_id'] == null ? undefined : json['charge_id'], 'currency': json['currency'] == null ? undefined : (0, CurrencyEnum_1.CurrencyEnumFromJSON)(json['currency']), 'description': json['description'] == null ? undefined : json['description'], 'paymentIntentId': json['payment_intent_id'] == null ? undefined : json['payment_intent_id'], 'reason': json['reason'] == null ? undefined : (0, RefundReasonEnum_1.RefundReasonEnumFromJSON)(json['reason']), }; } function CreateRefundRequestToJSON(json) { return CreateRefundRequestToJSONTyped(json, false); } function CreateRefundRequestToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'amount_atom': value['amountAtom'], 'charge_id': value['chargeId'], 'currency': (0, CurrencyEnum_1.CurrencyEnumToJSON)(value['currency']), 'description': value['description'], 'payment_intent_id': value['paymentIntentId'], 'reason': (0, RefundReasonEnum_1.RefundReasonEnumToJSON)(value['reason']), }; }