UniformInvoiceLottery
一個統一發票兌獎的 Gem,還有自動更新功能,還真不賴。自己說。
Installation
Add this line to your application's Gemfile:
gem 'uniform_invoice_lottery'
And then execute:
$ bundle
Or install it yourself as:
$ gem install uniform_invoice_lottery
Usage
require 'uniform_invoice_lottery'
prize = UniformInvoiceLottery.check '82930261', time: Time.new(2015, 7, 26)
prize = UniformInvoiceLottery.check '82930261', year: 2015, month: 7 day: 26
puts prize.amount # => "10000000"
puts prize.title # => "特別獎"
Contributing
- Fork it ( https://github.com/Yukaii/uniform_invoice_lottery/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request