Если вдруг пользователь хочет закрыть сайт, сохраняю куку, которая в последствии должна эту кнопку показать;
2. Он переходит по url вместе с параметрами discount=direct и ему показывается кнопка;в том месте где ты проверяешь наличие discount=direct, добавь проверку содержимого localstorage
Request body
In the request body, supply a Files resource with the following properties as the metadata. For more information, see the document on media upload.
..............
parents[] list The IDs of the parent folders which contain the file.
If not specified as part of a create request, the file will be placed directly in the user's My Drive folder. If not specified as part of a copy request, the file will inherit any discoverable parents of the source file. Update requests must use the addParents and removeParents parameters to modify the parents list