UNPKG

wallee

Version:
37 lines (36 loc) 1.17 kB
/** * Check if a given object implements the AccountCreate interface. */ export function instanceOfAccountCreate(value) { if (!('scope' in value) || value['scope'] === undefined) return false; return true; } export function AccountCreateFromJSON(json) { return AccountCreateFromJSONTyped(json, false); } export function AccountCreateFromJSONTyped(json, ignoreDiscriminator) { if (json == null) { return json; } return { 'name': json['name'] == null ? undefined : json['name'], 'subaccountLimit': json['subaccountLimit'] == null ? undefined : json['subaccountLimit'], 'scope': json['scope'], 'parentAccount': json['parentAccount'] == null ? undefined : json['parentAccount'], }; } export function AccountCreateToJSON(json) { return AccountCreateToJSONTyped(json, false); } export function AccountCreateToJSONTyped(value, ignoreDiscriminator = false) { if (value == null) { return value; } return { 'name': value['name'], 'subaccountLimit': value['subaccountLimit'], 'scope': value['scope'], 'parentAccount': value['parentAccount'], }; }