UNPKG

@getopenpay/client

Version:

OpenPay API TypeScript SDK

56 lines (55 loc) 2.22 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.instanceOfAuthorizePaymentMethodRequest = instanceOfAuthorizePaymentMethodRequest; exports.AuthorizePaymentMethodRequestFromJSON = AuthorizePaymentMethodRequestFromJSON; exports.AuthorizePaymentMethodRequestFromJSONTyped = AuthorizePaymentMethodRequestFromJSONTyped; exports.AuthorizePaymentMethodRequestToJSON = AuthorizePaymentMethodRequestToJSON; exports.AuthorizePaymentMethodRequestToJSONTyped = AuthorizePaymentMethodRequestToJSONTyped; const CurrencyEnum_1 = require("./CurrencyEnum"); /** * Check if a given object implements the AuthorizePaymentMethodRequest interface. */ function instanceOfAuthorizePaymentMethodRequest(value) { if (!('paymentMethodId' in value) || value['paymentMethodId'] === undefined) return false; return true; } function AuthorizePaymentMethodRequestFromJSON(json) { return AuthorizePaymentMethodRequestFromJSONTyped(json, false); } function AuthorizePaymentMethodRequestFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'authorizeAmountAtom': json['authorize_amount_atom'] == null ? undefined : json['authorize_amount_atom'], 'currency': json['currency'] == null ? undefined : (0, CurrencyEnum_1.CurrencyEnumFromJSON)(json['currency']), 'paymentMethodId': json['payment_method_id'], }; } function AuthorizePaymentMethodRequestToJSON(json) { return AuthorizePaymentMethodRequestToJSONTyped(json, false); } function AuthorizePaymentMethodRequestToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'authorize_amount_atom': value['authorizeAmountAtom'], 'currency': (0, CurrencyEnum_1.CurrencyEnumToJSON)(value['currency']), 'payment_method_id': value['paymentMethodId'], }; }