Balance Sheet Components - Schedule of Allowance for Sales Returns (Details) - USD ($) $ in Thousands |
6 Months Ended | 12 Months Ended |
|---|---|---|
Jun. 30, 2019 |
Dec. 31, 2018 |
|
| Movement in Valuation Allowances and Reserves [Roll Forward] | ||
| Beginning balance | $ (21,897) | |
| Ending balance | (14,259) | $ (21,897) |
| Allowance for Sales Returns | ||
| Movement in Valuation Allowances and Reserves [Roll Forward] | ||
| Beginning balance | (7,335) | (6,907) |
| Charged to revenue | (6,728) | (17,396) |
| Utilization of sales return/incentive reserve | 8,813 | 16,968 |
| Ending balance | $ (5,250) | $ (7,335) |