Balance Sheet Components - Schedule of Allowance for Sales Incentives (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 Incentives | ||
| Movement in Valuation Allowances and Reserves [Roll Forward] | ||
| Beginning balance | (13,750) | (10,442) |
| Charged to revenue | (16,663) | (50,958) |
| Utilization of sales return/incentive reserve | 21,830 | 47,650 |
| Ending balance | $ (8,583) | $ (13,750) |