@getopenpay/client
Version:
OpenPay API TypeScript SDK
63 lines (62 loc) • 2.43 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.instanceOfUpdateProductRequest = instanceOfUpdateProductRequest;
exports.UpdateProductRequestFromJSON = UpdateProductRequestFromJSON;
exports.UpdateProductRequestFromJSONTyped = UpdateProductRequestFromJSONTyped;
exports.UpdateProductRequestToJSON = UpdateProductRequestToJSON;
exports.UpdateProductRequestToJSONTyped = UpdateProductRequestToJSONTyped;
/**
* Check if a given object implements the UpdateProductRequest interface.
*/
function instanceOfUpdateProductRequest(value) {
return true;
}
function UpdateProductRequestFromJSON(json) {
return UpdateProductRequestFromJSONTyped(json, false);
}
function UpdateProductRequestFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'accountSku': json['account_sku'] == null ? undefined : json['account_sku'],
'customFields': json['custom_fields'] == null ? undefined : json['custom_fields'],
'defaultPriceId': json['default_price_id'] == null ? undefined : json['default_price_id'],
'description': json['description'] == null ? undefined : json['description'],
'features': json['features'] == null ? undefined : json['features'],
'isActive': json['is_active'] == null ? undefined : json['is_active'],
'name': json['name'] == null ? undefined : json['name'],
'unitLabel': json['unit_label'] == null ? undefined : json['unit_label'],
};
}
function UpdateProductRequestToJSON(json) {
return UpdateProductRequestToJSONTyped(json, false);
}
function UpdateProductRequestToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'account_sku': value['accountSku'],
'custom_fields': value['customFields'],
'default_price_id': value['defaultPriceId'],
'description': value['description'],
'features': value['features'],
'is_active': value['isActive'],
'name': value['name'],
'unit_label': value['unitLabel'],
};
}