Schedule create raised "on must contain one of these keys: days_of_month, weekday_of_month"
pupubird opened this issue · 2 comments
pupubird commented
schedule = omise.Schedule.create(
every=1,
period='month',
on={'days_of_month': 20},
start_date='2023-11-20',
end_date='2024-11-19',
charge={
"customer": "cust_test_XXXXXXXX",
"amount": 2000,
"currency": "myr",
},
)
Hey, in omise=0.13.0, the above code will raise on must contain one of these keys: days_of_month, weekday_of_month
danfowler commented
Hi, can you try the following:
schedule = omise.Schedule.create(
every=1,
period='month',
on={'days_of_month': [20]}, # ← days_of_month must be a list
start_date='2023-11-20',
end_date='2024-11-19',
charge={
"customer": "cust_test_XXXXXXXX",
"amount": 2000,
"currency": "myr",
},
)
pupubird commented
Ah! Works well now, thanks!
…On Tue, 7 Nov 2023 at 10:23, Daniel Fowler ***@***.***> wrote:
Hi, can you try the following:
schedule = omise.Schedule.create(
every=1,
period='month',
on={'days_of_month': [20]}, # ← days_of_month must be a list
start_date='2023-11-20',
end_date='2024-11-19',
charge={
"customer": "cust_test_XXXXXXXX",
"amount": 2000,
"currency": "myr",
},
)
—
Reply to this email directly, view it on GitHub
<#69 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AINQQGE4D4NI3KQC445W32LYDGLSFAVCNFSM6AAAAAA67T6T32VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJXGIZDGMRYGE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>