@getopenpay/client
Version:
OpenPay API TypeScript SDK
57 lines (56 loc) • 2.04 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.instanceOfCreatePortalSessionRequest = instanceOfCreatePortalSessionRequest;
exports.CreatePortalSessionRequestFromJSON = CreatePortalSessionRequestFromJSON;
exports.CreatePortalSessionRequestFromJSONTyped = CreatePortalSessionRequestFromJSONTyped;
exports.CreatePortalSessionRequestToJSON = CreatePortalSessionRequestToJSON;
exports.CreatePortalSessionRequestToJSONTyped = CreatePortalSessionRequestToJSONTyped;
/**
* Check if a given object implements the CreatePortalSessionRequest interface.
*/
function instanceOfCreatePortalSessionRequest(value) {
if (!('customerId' in value) || value['customerId'] === undefined)
return false;
if (!('returnUrl' in value) || value['returnUrl'] === undefined)
return false;
return true;
}
function CreatePortalSessionRequestFromJSON(json) {
return CreatePortalSessionRequestFromJSONTyped(json, false);
}
function CreatePortalSessionRequestFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'customerId': json['customer_id'],
'expiresInHours': json['expires_in_hours'] == null ? undefined : json['expires_in_hours'],
'returnUrl': json['return_url'],
};
}
function CreatePortalSessionRequestToJSON(json) {
return CreatePortalSessionRequestToJSONTyped(json, false);
}
function CreatePortalSessionRequestToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'customer_id': value['customerId'],
'expires_in_hours': value['expiresInHours'],
'return_url': value['returnUrl'],
};
}