przelewy24 0.1.9 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cc6328dca5bb47f41668f42efd91c7abb6e06341
4
- data.tar.gz: 5b7b5fe48b5dfe02027fa1c551efc87dbd64f22c
3
+ metadata.gz: 258c125771dfdd7a8d8c80931fd960dd782df619
4
+ data.tar.gz: 6dc6e6f040751ffa7f65c2f8a00b74c40bd68bf9
5
5
  SHA512:
6
- metadata.gz: 1a4396d63eb025733666f3483507acad0b05f233f9ffff28066029fe180f5ea98827daf210b0c3379a0f999346837bfb0c5bb284e37eb32761f2aea3affe1751
7
- data.tar.gz: 25a87f74a73c7297949a8230be239c810ca71edcdf9fe1c73989d9d410abe936ddd03982ca5f24e11c4a6310d4ca197538fabcbe1f46baabe0d8a7fb23da5e46
6
+ metadata.gz: 485059e57a4949723ca658e9d3abe2992a6c85a72d851e045339e3ebb1232f6403803e7a65d9cfd378c2996840e8a67fd1136f98c2661fd9b2aa2e413d4018c4
7
+ data.tar.gz: e9ab398a925fa4a2872e1fd1c7f7a7267b974fba32ddb0ce3d187453899bef4afa15fabf57ff08c07c699a5b7ed1a8e1ba1377ac049d947db30ffbba1e91a91a
@@ -1,9 +1,10 @@
1
1
  require 'przelewy24/ekspres/client'
2
- require 'przelewy24/ekspres/response'
2
+ require 'przelewy24/recurring/client'
3
3
  require 'przelewy24/client'
4
+ require 'przelewy24/http_response'
4
5
  require 'przelewy24/invalid_attributes'
5
6
  require 'przelewy24/invalid_gateway_url'
6
- require 'przelewy24/response'
7
+ require 'przelewy24/soap_response'
7
8
  require 'przelewy24/transaction'
8
9
  require 'przelewy24/version'
9
10
 
@@ -33,7 +33,7 @@ module Przelewy24
33
33
  http.request(post)
34
34
  end
35
35
 
36
- Response.new(response)
36
+ HttpResponse.new(response)
37
37
  end
38
38
 
39
39
  def create_transaction(data = {})
@@ -50,7 +50,7 @@ module Przelewy24
50
50
  http.request(post)
51
51
  end
52
52
 
53
- Response.new(response)
53
+ HttpResponse.new(response)
54
54
  end
55
55
 
56
56
  def verify_transaction(data = {})
@@ -71,7 +71,7 @@ module Przelewy24
71
71
  http.request(post)
72
72
  end
73
73
 
74
- Response.new(response)
74
+ HttpResponse.new(response)
75
75
  end
76
76
  end
77
77
  end
@@ -14,7 +14,7 @@ module Przelewy24
14
14
  'o_transactionIn' => transaction
15
15
  })
16
16
 
17
- Response.new(response.body[:register_transfer_response][:return])
17
+ SoapResponse.new(response.body[:register_transfer_response][:return])
18
18
  rescue Savon::SOAPFault => error
19
19
  raise InvalidAttributes
20
20
  end
@@ -1,5 +1,5 @@
1
1
  module Przelewy24
2
- class Response
2
+ class HttpResponse
3
3
  attr_reader :attributes
4
4
 
5
5
  def initialize(http_response)
@@ -30,7 +30,7 @@ module Przelewy24
30
30
  orderId: order_id
31
31
  })
32
32
 
33
- Response.new(response.body[:get_transaction_reference_response][:return])
33
+ SoapResponse.new(response.body[:get_transaction_reference_response][:return])
34
34
  end
35
35
 
36
36
  def charge_card(data = {})
@@ -45,7 +45,7 @@ module Przelewy24
45
45
  description: data[:description]
46
46
  })
47
47
 
48
- Response.new(response.body[:charge_card_response][:return])
48
+ SoapResponse.new(response.body[:charge_card_response][:return])
49
49
  end
50
50
 
51
51
  private
@@ -0,0 +1,20 @@
1
+ module Przelewy24
2
+ class SoapResponse
3
+ def initialize(savon_response)
4
+ @result = savon_response[:result]
5
+ @error = savon_response[:error]
6
+ end
7
+
8
+ def success?
9
+ @error[:error_code] == '0'
10
+ end
11
+
12
+ def result
13
+ @result
14
+ end
15
+
16
+ def error
17
+ @error
18
+ end
19
+ end
20
+ end
@@ -1,3 +1,3 @@
1
1
  module Przelewy24
2
- VERSION = '0.1.9'
2
+ VERSION = '0.1.10'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: przelewy24
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.9
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michał Młoźniak
@@ -72,12 +72,11 @@ files:
72
72
  - lib/przelewy24.rb
73
73
  - lib/przelewy24/client.rb
74
74
  - lib/przelewy24/ekspres/client.rb
75
- - lib/przelewy24/ekspres/response.rb
75
+ - lib/przelewy24/http_response.rb
76
76
  - lib/przelewy24/invalid_attributes.rb
77
77
  - lib/przelewy24/invalid_gateway_url.rb
78
78
  - lib/przelewy24/recurring/client.rb
79
- - lib/przelewy24/recurring/response.rb
80
- - lib/przelewy24/response.rb
79
+ - lib/przelewy24/soap_response.rb
81
80
  - lib/przelewy24/transaction.rb
82
81
  - lib/przelewy24/version.rb
83
82
  - przelewy24.gemspec
@@ -1,22 +0,0 @@
1
- module Przelewy24
2
- module Ekspres
3
- class Response
4
- def initialize(savon_response)
5
- @result = savon_response[:result]
6
- @error = savon_response[:error]
7
- end
8
-
9
- def success?
10
- @error[:error_code] == '0'
11
- end
12
-
13
- def result
14
- @result
15
- end
16
-
17
- def error
18
- @error
19
- end
20
- end
21
- end
22
- end
@@ -1,22 +0,0 @@
1
- module Przelewy24
2
- module Recurring
3
- class Response
4
- def initialize(savon_response)
5
- @result = savon_response[:result]
6
- @error = savon_response[:error]
7
- end
8
-
9
- def success?
10
- @error[:error_code] == '0'
11
- end
12
-
13
- def result
14
- @result
15
- end
16
-
17
- def error
18
- @error
19
- end
20
- end
21
- end
22
- end