File size: 347 Bytes
1e92f2d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
import wpcom from 'calypso/lib/wp';
export interface Purchase {
ID: string;
active: boolean;
expiry_message: string;
is_cancelable: boolean;
product_slug: string;
user_id: string;
}
export async function fetchSitePurchases( siteId: number ): Promise< Purchase[] > {
return wpcom.req.get( {
path: `/sites/${ siteId }/purchases`,
} );
}
|