module Kojn
Constants
- VERSION
Public Class Methods
[](key)
click to toggle source
Config setters/getters
# File lib/kojn.rb, line 76 def self.[](key) self.send(key) end
[]=(key, value)
click to toggle source
# File lib/kojn.rb, line 80 def self.[]=(key, value) self.send("#{key}=", value) end
crypto()
click to toggle source
# File lib/kojn.rb, line 53 def self.crypto raise MissingConfigExecption.new("API key not set") unless self.api_key @@crypto ||= Kojn::Crypto.new return @@crypto end
invoices()
click to toggle source
# File lib/kojn.rb, line 61 def self.invoices raise MissingConfigExecption.new("API key not set") unless self.api_key @@transacions ||= Kojn::Invoices.new return @@transacions end
ipn(params)
click to toggle source
# File lib/kojn.rb, line 69 def self.ipn(params) raise MissingConfigExecption.new("API key not set") unless self.api_key return Kojn::Ipn.new(params) end
parse_object!(object, klass)
click to toggle source
# File lib/kojn/transaction.rb, line 9 def self.parse_object!(object, klass) object = JSON.parse(object) if object.is_a? String klass.new(object) end
parse_objects!(string, klass)
click to toggle source
# File lib/kojn/transaction.rb, line 2 def self.parse_objects!(string, klass) objects = JSON.parse(string) objects.collect do |t_json| Kojn.parse_object!(t_json, klass) end end
setup() { |self| ... }
click to toggle source
# File lib/kojn.rb, line 84 def self.setup yield self end