Sha256: db6b29badcd58a8598c08e1390e674b0e0894a1e54f9696926b72fdc1163bc6b

Contents?: true

Size: 325 Bytes

Versions: 2

Compression:

Stored size: 325 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

2 entries across 2 versions & 1 rubygems

Version Path
voucherify-1.5.0 lib/voucherify/service/validations.rb
voucherify-1.4.0 lib/voucherify/service/validations.rb