|
| 1 | +from datetime import datetime |
| 2 | +from typing import Any |
| 3 | + |
| 4 | +from pydantic import BaseModel |
| 5 | + |
| 6 | + |
| 7 | +class Currency(BaseModel): |
| 8 | + amount: float |
| 9 | + currency_type: str |
| 10 | + |
| 11 | + |
| 12 | +class EquityVestingEvent(BaseModel): |
| 13 | + """ |
| 14 | + vest_date: the date on which the vesting event happens |
| 15 | + vest_quantity: the total quantity of the vesting event |
| 16 | + vested_quantity: the quantity which is vested |
| 17 | + vest_performance_condition: sometimes, a vesting event is tied to extra condition like employee performance, |
| 18 | + i.e. it's not necessarily vested past the vest_date |
| 19 | + """ |
| 20 | + vest_date: datetime |
| 21 | + vest_quantity: float |
| 22 | + vested_quantity: float |
| 23 | + vest_performance_condition: bool |
| 24 | + |
| 25 | + |
| 26 | +class EquityGrant(BaseModel): |
| 27 | + """ |
| 28 | + external_stakeholder_identifier: the identifier of the equity grant owner in the third party system |
| 29 | + internal_stakeholder_identifier: the identifier of the equity grant owner within Rippling system, can be rwc id |
| 30 | + grant_unique_identifier: a unique identifier for the grant, i.e. different for each grant |
| 31 | + grant_name: the name of the grant |
| 32 | + grant_date: the date when the grant is created |
| 33 | + canceled_date: the date when the grant is canceled |
| 34 | + grant_price: the price of the grant |
| 35 | + expiration_date: the date when the grant is expired |
| 36 | + exercised_quantity: exercised quantity of the grant |
| 37 | + released_quantity: released quantity of the grant |
| 38 | + canceled_quantity: canceled quantity of the grant |
| 39 | + expired_quantity: expired quantity of the grant |
| 40 | + exercisable_quantity: exercisable quantity of the grant |
| 41 | + exercise_price: exercise price of the grant |
| 42 | + outstanding_quantity: outstanding quantity of the grant, also considered as valid quantity |
| 43 | + outstanding_vested_quantity: vested quantity within the outstanding quantity |
| 44 | + outstanding_unvested_quantity: unvested quantity within the outstanding quantity |
| 45 | + vesting_events: list of vesting events that belong to the grant |
| 46 | + extra: fields that are specific to some third parties and might not be needed in every use case |
| 47 | + """ |
| 48 | + |
| 49 | + external_stakeholder_identifier: str |
| 50 | + internal_stakeholder_identifier: str | None = None |
| 51 | + grant_unique_identifier: str |
| 52 | + grant_name: str |
| 53 | + grant_date: datetime |
| 54 | + canceled_date: datetime | None = None |
| 55 | + grant_price: Currency |
| 56 | + expiration_date: datetime | None = None |
| 57 | + grant_quantity: float |
| 58 | + exercised_quantity: float = 0.0 |
| 59 | + released_quantity: float = 0.0 |
| 60 | + canceled_quantity: float = 0.0 |
| 61 | + expired_quantity: float = 0.0 |
| 62 | + exercisable_quantity: float = 0.0 |
| 63 | + exercise_price: Currency | None = None |
| 64 | + outstanding_quantity: float |
| 65 | + outstanding_vested_quantity: float |
| 66 | + outstanding_unvested_quantity: float |
| 67 | + vesting_events: list[EquityVestingEvent] |
| 68 | + extras: dict[str, Any] |
0 commit comments