@getopenpay/client
Version:
OpenPay API TypeScript SDK
88 lines (87 loc) • 4.83 kB
JavaScript
;
/* 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.instanceOfExportPaymentIntentsRequest = instanceOfExportPaymentIntentsRequest;
exports.ExportPaymentIntentsRequestFromJSON = ExportPaymentIntentsRequestFromJSON;
exports.ExportPaymentIntentsRequestFromJSONTyped = ExportPaymentIntentsRequestFromJSONTyped;
exports.ExportPaymentIntentsRequestToJSON = ExportPaymentIntentsRequestToJSON;
exports.ExportPaymentIntentsRequestToJSONTyped = ExportPaymentIntentsRequestToJSONTyped;
const DateTimeFilter_1 = require("./DateTimeFilter");
const IntRangeFilter_1 = require("./IntRangeFilter");
const PaymentIntentStatus_1 = require("./PaymentIntentStatus");
const PaymentProviderType_1 = require("./PaymentProviderType");
const SearchFilter_1 = require("./SearchFilter");
/**
* Check if a given object implements the ExportPaymentIntentsRequest interface.
*/
function instanceOfExportPaymentIntentsRequest(value) {
return true;
}
function ExportPaymentIntentsRequestFromJSON(json) {
return ExportPaymentIntentsRequestFromJSONTyped(json, false);
}
function ExportPaymentIntentsRequestFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'amountAtom': json['amount_atom'] == null ? undefined : (0, IntRangeFilter_1.IntRangeFilterFromJSON)(json['amount_atom']),
'createdAt': json['created_at'] == null ? undefined : (0, DateTimeFilter_1.DateTimeFilterFromJSON)(json['created_at']),
'customerId': json['customer_id'] == null ? undefined : json['customer_id'],
'expand': json['expand'] == null ? undefined : json['expand'],
'invoiceId': json['invoice_id'] == null ? undefined : json['invoice_id'],
'isRefunded': json['is_refunded'] == null ? undefined : json['is_refunded'],
'limit': json['limit'] == null ? undefined : json['limit'],
'pageNumber': json['page_number'] == null ? undefined : json['page_number'],
'pageSize': json['page_size'] == null ? undefined : json['page_size'],
'paymentMethodId': json['payment_method_id'] == null ? undefined : json['payment_method_id'],
'paymentProvider': json['payment_provider'] == null ? undefined : (0, PaymentProviderType_1.PaymentProviderTypeFromJSON)(json['payment_provider']),
'processorPaymentId': json['processor_payment_id'] == null ? undefined : json['processor_payment_id'],
'refundAmountAtom': json['refund_amount_atom'] == null ? undefined : (0, IntRangeFilter_1.IntRangeFilterFromJSON)(json['refund_amount_atom']),
'search': json['search'] == null ? undefined : (0, SearchFilter_1.SearchFilterFromJSON)(json['search']),
'sortDescending': json['sort_descending'] == null ? undefined : json['sort_descending'],
'sortKey': json['sort_key'] == null ? undefined : json['sort_key'],
'status': json['status'] == null ? undefined : (0, PaymentIntentStatus_1.PaymentIntentStatusFromJSON)(json['status']),
'updatedAt': json['updated_at'] == null ? undefined : (0, DateTimeFilter_1.DateTimeFilterFromJSON)(json['updated_at']),
};
}
function ExportPaymentIntentsRequestToJSON(json) {
return ExportPaymentIntentsRequestToJSONTyped(json, false);
}
function ExportPaymentIntentsRequestToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'amount_atom': (0, IntRangeFilter_1.IntRangeFilterToJSON)(value['amountAtom']),
'created_at': (0, DateTimeFilter_1.DateTimeFilterToJSON)(value['createdAt']),
'customer_id': value['customerId'],
'expand': value['expand'],
'invoice_id': value['invoiceId'],
'is_refunded': value['isRefunded'],
'limit': value['limit'],
'page_number': value['pageNumber'],
'page_size': value['pageSize'],
'payment_method_id': value['paymentMethodId'],
'payment_provider': (0, PaymentProviderType_1.PaymentProviderTypeToJSON)(value['paymentProvider']),
'processor_payment_id': value['processorPaymentId'],
'refund_amount_atom': (0, IntRangeFilter_1.IntRangeFilterToJSON)(value['refundAmountAtom']),
'search': (0, SearchFilter_1.SearchFilterToJSON)(value['search']),
'sort_descending': value['sortDescending'],
'sort_key': value['sortKey'],
'status': (0, PaymentIntentStatus_1.PaymentIntentStatusToJSON)(value['status']),
'updated_at': (0, DateTimeFilter_1.DateTimeFilterToJSON)(value['updatedAt']),
};
}