paysio 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. data/.gitignore +2 -0
  2. data/.travis.yml +9 -0
  3. data/CONTRIBUTORS +1 -0
  4. data/Gemfile +2 -0
  5. data/Gemfile.lock +42 -0
  6. data/History.txt +4 -0
  7. data/LICENSE +21 -0
  8. data/README.rdoc +12 -0
  9. data/Rakefile +12 -0
  10. data/VERSION +1 -0
  11. data/bin/paysio +7 -0
  12. data/gemfiles/default-with-activesupport.gemfile +3 -0
  13. data/gemfiles/json.gemfile +4 -0
  14. data/gemfiles/yajl.gemfile +4 -0
  15. data/lib/data/ca-certificates.crt +3918 -0
  16. data/lib/paysio/account.rb +4 -0
  17. data/lib/paysio/api_operations/create.rb +16 -0
  18. data/lib/paysio/api_operations/delete.rb +11 -0
  19. data/lib/paysio/api_operations/list.rb +16 -0
  20. data/lib/paysio/api_operations/update.rb +15 -0
  21. data/lib/paysio/api_resource.rb +33 -0
  22. data/lib/paysio/charge.rb +39 -0
  23. data/lib/paysio/coupon.rb +7 -0
  24. data/lib/paysio/customer.rb +51 -0
  25. data/lib/paysio/errors/api_connection_error.rb +4 -0
  26. data/lib/paysio/errors/api_error.rb +4 -0
  27. data/lib/paysio/errors/authentication_error.rb +4 -0
  28. data/lib/paysio/errors/card_error.rb +11 -0
  29. data/lib/paysio/errors/invalid_request_error.rb +10 -0
  30. data/lib/paysio/errors/paysio_error.rb +20 -0
  31. data/lib/paysio/event.rb +5 -0
  32. data/lib/paysio/json.rb +21 -0
  33. data/lib/paysio/list_object.rb +14 -0
  34. data/lib/paysio/paysio_object.rb +159 -0
  35. data/lib/paysio/singleton_api_resource.rb +20 -0
  36. data/lib/paysio/util.rb +100 -0
  37. data/lib/paysio/version.rb +3 -0
  38. data/lib/paysio.rb +252 -0
  39. data/paysio.gemspec +28 -0
  40. data/test/test_helper.rb +162 -0
  41. data/test/test_paysio.rb +479 -0
  42. data/test/test_paysio_with_active_support.rb +2 -0
  43. metadata +193 -0
data/.gitignore ADDED
@@ -0,0 +1,2 @@
1
+ /pkg
2
+ .rvmrc
data/.travis.yml ADDED
@@ -0,0 +1,9 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.8.7
4
+ - 1.9.2
5
+ - 1.9.3
6
+ gemfile:
7
+ - gemfiles/default-with-activesupport.gemfile
8
+ - gemfiles/json.gemfile
9
+ - gemfiles/yajl.gemfile
data/CONTRIBUTORS ADDED
@@ -0,0 +1 @@
1
+ Iskander Haziev <gvalmon@gmail.com>
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source "https://rubygems.org"
2
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,42 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ paysio (1.0.0)
5
+ multi_json (>= 1.0.4, < 2)
6
+ rest-client (~> 1.4)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ activesupport (3.2.12)
12
+ i18n (~> 0.6)
13
+ multi_json (~> 1.0)
14
+ bourne (1.1.2)
15
+ mocha (= 0.10.5)
16
+ i18n (0.6.1)
17
+ metaclass (0.0.1)
18
+ mime-types (1.21)
19
+ mocha (0.10.5)
20
+ metaclass (~> 0.0.1)
21
+ multi_json (1.6.0)
22
+ rake (10.0.3)
23
+ rest-client (1.6.7)
24
+ mime-types (>= 1.16)
25
+ shoulda (3.3.2)
26
+ shoulda-context (~> 1.0.1)
27
+ shoulda-matchers (~> 1.4.1)
28
+ shoulda-context (1.0.2)
29
+ shoulda-matchers (1.4.2)
30
+ activesupport (>= 3.0.0)
31
+ bourne (~> 1.1.2)
32
+ test-unit (2.5.4)
33
+
34
+ PLATFORMS
35
+ ruby
36
+
37
+ DEPENDENCIES
38
+ mocha
39
+ paysio!
40
+ rake
41
+ shoulda
42
+ test-unit
data/History.txt ADDED
@@ -0,0 +1,4 @@
1
+ === 1.0 2013-02-13
2
+
3
+ * 1 major enhancement:
4
+ * Initial release
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2013 Paysio.com. (https://paysio.com)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,12 @@
1
+ == Installation
2
+
3
+ $ gem install paysio
4
+
5
+ == Usage
6
+
7
+ Paysio.api_key = 'YOUR_API_KEY'
8
+ Paysio::Charges.all
9
+
10
+ == Development
11
+
12
+ Test cases can be run with: `bundle exec rake test`
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ task :default => [:test]
2
+
3
+ task :test do
4
+ ret = true
5
+ Dir["test/**/*.rb"].each do |f|
6
+ ret = ret && ruby(f, '')
7
+ end
8
+ exit(ret)
9
+ end
10
+
11
+ require 'bundler'
12
+ Bundler::GemHelper.install_tasks
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 1.0.0
data/bin/paysio ADDED
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env ruby
2
+ irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
3
+
4
+ libs = " -r irb/completion"
5
+ libs << " -r #{File.dirname(__FILE__) + '/../lib/paysio'}"
6
+ puts "Loading pays.io gem"
7
+ exec "#{irb} #{libs} --simple-prompt"
@@ -0,0 +1,3 @@
1
+ source "https://rubygems.org"
2
+ gemspec :path => File.join(File.dirname(__FILE__), "..")
3
+ gem "activesupport"
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+ gemspec :path => File.join(File.dirname(__FILE__), "..")
3
+ gem "json"
4
+ gem "activesupport"
@@ -0,0 +1,4 @@
1
+ source "https://rubygems.org"
2
+ gemspec :path => File.join(File.dirname(__FILE__), "..")
3
+ gem "yajl-ruby"
4
+ gem "activesupport"