omise / omise-ruby

Omise Ruby Library
https://docs.opn.ooo
MIT License
40 stars 20 forks source link

Allow shortened form of ordinal numbers on Scheduler #43

Closed som-m closed 3 years ago

som-m commented 3 years ago

Summary

QA

You should be able to use a shortened form of ordinal numbers when creating a schedule.

scheduler = Omise::Charge.schedule({
  customer:    "cust_test_5msjaq18bqd958d10ew",
  card:        "card_test_5msjanzl07ys23rctug",
  amount:      100000,
  description: "Membership fee"
})

schedule = scheduler.every(1).month(on: "2nd_monday")
  .start_date("2022-11-01")
  .end_date("2022-12-31")
  .start