48 lines
693 B
Python
48 lines
693 B
Python
import os
|
|
|
|
name = "Set availability"
|
|
|
|
kind = "action"
|
|
|
|
id = "setavailable"
|
|
|
|
showstatus = True
|
|
|
|
skipstep = {
|
|
"checkavailable": "validTo >= 3600"
|
|
}
|
|
|
|
availabletime = int(os.environ.get("AVAILABLE_DURATION",3))
|
|
|
|
duration = availabletime - 1
|
|
|
|
keys = [
|
|
{
|
|
"keytitle": "option",
|
|
"keyvalue": 1,
|
|
},
|
|
{
|
|
"keytitle": "duration",
|
|
"keyvalue": duration,
|
|
},
|
|
]
|
|
|
|
method = "PUT"
|
|
|
|
path = "https://rentmasseur.com/api/v1/account/dashboard/availability"
|
|
|
|
headers = {
|
|
"Authorization": {
|
|
"output": "access_token",
|
|
"prefix": "Bearer ",
|
|
},
|
|
}
|
|
|
|
outputs = {
|
|
"available_until": "validTo"
|
|
}
|
|
|
|
prints = {
|
|
"Available until": "available_until"
|
|
}
|