@namespace("Switchboard") protocol AdviceSession { /** The main class for this protocol */ record AdviceSession { /** The primary key */ int id; int specialty_id; int advisor_id; int review_id; boolean chose_advisor; string state; boolean called; union {null, string} advice_session_image_token = null; array advice_session_image_tokens; string name; string email_address; string phone_number; int payment_amount; string promo_code; int offer_id; int location_id; int lawyer_id; int package_id; string package_name; } /** Options you can send for limiting AdviceSession results */ record AdviceSessionFetchOption { /** Which page of records to fetch */ int page = 1; /** How many records per page */ int per_page = 30; } /** Params to create a new AdviceSession */ record AdviceSessionCreateParams { int specialty_id; int advisor_id; string state; string client_name; string client_email_address; string client_phone_number; union {null, string} payment_gateway = null; string card_href; string name_on_card; union {null, string} advice_session_image_token = null; array advice_session_image_tokens; union {null, string} promo_code = null; } record AdviceSessionPromoCode { int promo_discount_amount_in_cents; int promo_advice_session_price_in_cents; } /** Returns a list of AdviceSession */ array index(AdviceSessionFetchOption options); /** Return a single AdviceSession */ array show(int id); /** Create a new AdviceSession */ array create(AdviceSessionCreateParams advice_session); /** Apply an Advice Session Promo Code */ array find_promo_code(string promo_code); }