Sha256: 0288c1769a820ab658a59a3fac9c0b8cf43eb7742fe633309581184d30c61b0e
Contents?: true
Size: 318 Bytes
Versions: 3
Compression:
Stored size: 318 Bytes
Contents
require 'uri' module Voucherify module Service class Validations attr_reader :client def initialize(client) @client = client end def validate_voucher(code, context = {}) @client.post("/vouchers/#{URI.encode(code)}/validate", context.to_json) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
voucherify-1.3.0 | lib/voucherify/service/validations.rb |
voucherify-1.2.0 | lib/voucherify/service/validations.rb |
voucherify-1.1.0 | lib/voucherify/service/validations.rb |