@getopenpay/client
Version:
OpenPay API TypeScript SDK
77 lines (76 loc) • 3.8 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.instanceOfPaymentIntentQueryParams = instanceOfPaymentIntentQueryParams;
exports.PaymentIntentQueryParamsFromJSON = PaymentIntentQueryParamsFromJSON;
exports.PaymentIntentQueryParamsFromJSONTyped = PaymentIntentQueryParamsFromJSONTyped;
exports.PaymentIntentQueryParamsToJSON = PaymentIntentQueryParamsToJSON;
exports.PaymentIntentQueryParamsToJSONTyped = PaymentIntentQueryParamsToJSONTyped;
const DateTimeFilter_1 = require("./DateTimeFilter");
const IntRangeFilter_1 = require("./IntRangeFilter");
const PaymentIntentStatus_1 = require("./PaymentIntentStatus");
const SearchFilter_1 = require("./SearchFilter");
/**
* Check if a given object implements the PaymentIntentQueryParams interface.
*/
function instanceOfPaymentIntentQueryParams(value) {
return true;
}
function PaymentIntentQueryParamsFromJSON(json) {
return PaymentIntentQueryParamsFromJSONTyped(json, false);
}
function PaymentIntentQueryParamsFromJSONTyped(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'],
'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'],
'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 PaymentIntentQueryParamsToJSON(json) {
return PaymentIntentQueryParamsToJSONTyped(json, false);
}
function PaymentIntentQueryParamsToJSONTyped(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'],
'page_number': value['pageNumber'],
'page_size': value['pageSize'],
'payment_method_id': value['paymentMethodId'],
'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']),
};
}