Skip to content
forked from ETBD/Valutec

Ruby client for the Valutec Gift Card API

License

Notifications You must be signed in to change notification settings

funcard/valutec

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Valutec

This gem provides an interface to the Valutec Gift Card API, as documented.

Installation

gem "valutec", git: "https://github.com/funcard/Valutec"

An XML implementation is required in your project to parse the Valutec API responses.

Usage

Low-level Client:

require 'valutec'

client = Valutec::Api.new(
    client_key: "", 
    terminal_id: "", 
    server_id: "",
)

response = client.card_balance({
    "ProgramType" => "Gift",
    "CardNumber" => "11111222222",
})
puts response.to_h

High-Level Client:

require 'valutec'

client = Valutec::HighLevelApi.new(
    client_key: "", 
    terminal_id: "", 
    server_id: "",
)

begin
    balance = client.card_balance("11111222222")
    puts balance
rescue => e
    puts e
end

About

Ruby client for the Valutec Gift Card API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%