@getopenpay/client
Version:
OpenPay API TypeScript SDK
53 lines (52 loc) • 2.07 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.instanceOfSubscriptionPauseRequest = instanceOfSubscriptionPauseRequest;
exports.SubscriptionPauseRequestFromJSON = SubscriptionPauseRequestFromJSON;
exports.SubscriptionPauseRequestFromJSONTyped = SubscriptionPauseRequestFromJSONTyped;
exports.SubscriptionPauseRequestToJSON = SubscriptionPauseRequestToJSON;
exports.SubscriptionPauseRequestToJSONTyped = SubscriptionPauseRequestToJSONTyped;
/**
* Check if a given object implements the SubscriptionPauseRequest interface.
*/
function instanceOfSubscriptionPauseRequest(value) {
return true;
}
function SubscriptionPauseRequestFromJSON(json) {
return SubscriptionPauseRequestFromJSONTyped(json, false);
}
function SubscriptionPauseRequestFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'isPreview': json['is_preview'] == null ? undefined : json['is_preview'],
'numberOfBillingCyclesToSkip': json['number_of_billing_cycles_to_skip'] == null ? undefined : json['number_of_billing_cycles_to_skip'],
'resumptionDate': json['resumption_date'] == null ? undefined : (new Date(json['resumption_date'])),
};
}
function SubscriptionPauseRequestToJSON(json) {
return SubscriptionPauseRequestToJSONTyped(json, false);
}
function SubscriptionPauseRequestToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'is_preview': value['isPreview'],
'number_of_billing_cycles_to_skip': value['numberOfBillingCyclesToSkip'],
'resumption_date': value['resumptionDate'] == null ? undefined : (value['resumptionDate'].toISOString()),
};
}