mpi_client 0.0.13 → 0.0.14

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.
@@ -1,11 +1,15 @@
1
1
  module MPIClient
2
2
  module AccountManagement
3
3
  class Response
4
- attr_reader :response_source, :error_code, :error_message, :errors, \
5
- :merchant_id, :site_name, :site_url, :certificate_subject, \
6
- :acquirer_bin, :country_code, :password, :certificate,
7
- :private_key, :directory_server_url, :brand, :response_url, \
8
- :client_url, :term_url, :account_id
4
+
5
+ ATTRIBUTES = [:merchant_id, :site_name, :site_url,
6
+ :certificate_subject, :acquirer_bin, :country_code,
7
+ :password, :certificate, :private_key,
8
+ :directory_server_url, :brand, :response_url,
9
+ :client_url, :term_url, :account_id]
10
+
11
+ attr_reader :response_source, :error_code, :error_message, :errors
12
+ attr_reader *ATTRIBUTES
9
13
 
10
14
  def initialize(response_source)
11
15
  @response_source = response_source
@@ -25,7 +29,14 @@ module MPIClient
25
29
  else
26
30
  set_account_attributes doc.xpath("//Transaction/*")
27
31
  end
32
+ end
28
33
 
34
+ def data
35
+ {}.tap do |result|
36
+ ATTRIBUTES.each do |attr|
37
+ result[attr] = send(attr)
38
+ end
39
+ end
29
40
  end
30
41
 
31
42
  private
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mpi_client
3
3
  version: !ruby/object:Gem::Version
4
- hash: 5
4
+ hash: 3
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 13
10
- version: 0.0.13
9
+ - 14
10
+ version: 0.0.14
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dmitry Plashchynski
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-11-15 00:00:00 +02:00
19
+ date: 2010-11-16 00:00:00 +02:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency