sisow 1.1.0 → 1.1.1

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.
data/.rbenv-version ADDED
@@ -0,0 +1 @@
1
+ 1.9.3-p194
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sisow (1.0.1)
4
+ sisow (1.1.0)
5
5
  crack
6
6
  hashie
7
7
  httpi
data/README.rdoc CHANGED
@@ -65,6 +65,9 @@ Setting up a payment looks like this:
65
65
  :cancel_url => 'http://example.com', # where the user is sent when he cancels the payment
66
66
  :callback_url => 'http://example.com', # where a failed (not cancelled) payment will be reported
67
67
  :notify_url => 'http://example.com', # where the payment status will be reported
68
+ :locale => 'GB' # for Paypal payments. Only GB and US are currently valid.
69
+ # Any other option (or leaving it out entirely) will default
70
+ # to a Dutch payment page
68
71
  }
69
72
 
70
73
  payment = Sisow::IdealPayment.new(payment_attributes)
data/lib/sisow/issuer.rb CHANGED
@@ -3,6 +3,21 @@ module Sisow
3
3
  attr_accessor :id, :name
4
4
 
5
5
  def self.list
6
+ @list ||= find_all_from_api
7
+ end
8
+
9
+ def self.find(issuer_id)
10
+ list.select { |issuer| issuer.id.to_i == issuer_id.to_i }.first
11
+ end
12
+
13
+ def initialize(attributes = {})
14
+ @id = attributes[:id]
15
+ @name = attributes[:name]
16
+ end
17
+
18
+ private
19
+
20
+ def self.find_all_from_api
6
21
  hash = Sisow::Api::DirectoryRequest.perform
7
22
 
8
23
  hash.issuer = [ hash.issuer ] unless hash.issuer.is_a?(Array)
@@ -15,10 +30,5 @@ module Sisow
15
30
  end
16
31
  end
17
32
 
18
- def initialize(attributes = {})
19
- @id = attributes[:id]
20
- @name = attributes[:name]
21
- end
22
-
23
33
  end
24
34
  end
data/lib/sisow/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sisow
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
@@ -11,4 +11,12 @@ describe Sisow::Issuer do
11
11
  end
12
12
  end
13
13
 
14
+ it "should find an issuer by ID" do
15
+ VCR.use_cassette('issuer') do
16
+ issuer = Sisow::Issuer.find(99)
17
+ issuer.class.should == Sisow::Issuer
18
+ issuer.name.should =~ /Sisow Bank/
19
+ end
20
+ end
21
+
14
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sisow
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-21 00:00:00.000000000 Z
12
+ date: 2012-10-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httpi
@@ -147,6 +147,7 @@ extensions: []
147
147
  extra_rdoc_files: []
148
148
  files:
149
149
  - .gitignore
150
+ - .rbenv-version
150
151
  - .rvmrc
151
152
  - .travis.yml
152
153
  - Gemfile
@@ -212,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
213
  version: '0'
213
214
  requirements: []
214
215
  rubyforge_project: sisow
215
- rubygems_version: 1.8.24
216
+ rubygems_version: 1.8.23
216
217
  signing_key:
217
218
  specification_version: 3
218
219
  summary: Rails gem for payments through Sisow.