@namespace("Switchboard") protocol Account { record AccountAddress { string address_line1; union { null, string } address_line2; string city; union { null, string } county; string postal_code; } record UpsertParams { /** Account id field in sales force */ int id; AccountAddress address; string contact_email; union { null, string } contact_name; union { null, string } phone_number; } /** The main account record data type */ record Account { /** Account id field in sales force */ int id; /** Avvo's internal customer id */ int customer_id; AccountAddress address; string contact_email; union { null, string } contact_name; union { null, string } phone_number; /** Date of first invoice for the customer, YYYY-mm-dd */ union { null, string } start_date; } /** REQUEST DATA TYPES */ record UpsertRequest { UpsertParams account; } /** Procedures */ array update(UpsertParams params); }