wallee
Version:
TypeScript/JavaScript client for wallee
47 lines (46 loc) • 2.66 kB
JavaScript
import { SubscriptionProductComponentReferenceFromJSON, SubscriptionProductComponentReferenceToJSON, } from './SubscriptionProductComponentReference';
import { SubscriptionProductComponentGroupFromJSON, SubscriptionProductComponentGroupToJSON, } from './SubscriptionProductComponentGroup';
import { TaxClassFromJSON, TaxClassToJSON, } from './TaxClass';
/**
* Check if a given object implements the SubscriptionProductComponent interface.
*/
export function instanceOfSubscriptionProductComponent(value) {
return true;
}
export function SubscriptionProductComponentFromJSON(json) {
return SubscriptionProductComponentFromJSONTyped(json, false);
}
export function SubscriptionProductComponentFromJSONTyped(json, ignoreDiscriminator) {
if (json == null) {
return json;
}
return {
'taxClass': json['taxClass'] == null ? undefined : TaxClassFromJSON(json['taxClass']),
'description': json['description'] == null ? undefined : json['description'],
'componentChangeWeight': json['componentChangeWeight'] == null ? undefined : json['componentChangeWeight'],
'maximalQuantity': json['maximalQuantity'] == null ? undefined : json['maximalQuantity'],
'version': json['version'] == null ? undefined : json['version'],
'minimalQuantity': json['minimalQuantity'] == null ? undefined : json['minimalQuantity'],
'reference': json['reference'] == null ? undefined : SubscriptionProductComponentReferenceFromJSON(json['reference']),
'linkedSpaceId': json['linkedSpaceId'] == null ? undefined : json['linkedSpaceId'],
'quantityStep': json['quantityStep'] == null ? undefined : json['quantityStep'],
'sortOrder': json['sortOrder'] == null ? undefined : json['sortOrder'],
'componentGroup': json['componentGroup'] == null ? undefined : SubscriptionProductComponentGroupFromJSON(json['componentGroup']),
'name': json['name'] == null ? undefined : json['name'],
'id': json['id'] == null ? undefined : json['id'],
'defaultComponent': json['defaultComponent'] == null ? undefined : json['defaultComponent'],
};
}
export function SubscriptionProductComponentToJSON(json) {
return SubscriptionProductComponentToJSONTyped(json, false);
}
export function SubscriptionProductComponentToJSONTyped(value, ignoreDiscriminator = false) {
if (value == null) {
return value;
}
return {
'taxClass': TaxClassToJSON(value['taxClass']),
'reference': SubscriptionProductComponentReferenceToJSON(value['reference']),
'componentGroup': SubscriptionProductComponentGroupToJSON(value['componentGroup']),
};
}