bambora-client 0.1.3 → 0.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 395e9139c238631535595895b2f59ace8bbdb7ec65c853b44aa4eca6f85466bc
4
- data.tar.gz: 6ccfb72d9d62005daf0327540d97bd86293494b86fb9f6ba5420738efd149d55
3
+ metadata.gz: 0ba08f9e38a85141dce37a2cc1ef6b85a7935ecda24d06abc4811cfbd467e1d4
4
+ data.tar.gz: 5d5608a1401b10ced7a4881456941531346e8fb903da6e7016785fa6bcc7e586
5
5
  SHA512:
6
- metadata.gz: d07e4984c23a99253a872596138de6a654d671995fedcf041a1eafeddbd68631f027395a04c084ad5ff82805216467a4b8ff7ee3401f501b2c2902f004406732
7
- data.tar.gz: 1b8d8fea61f5f2e12cd2b667492c787dcdf30e3d62157ffb823cdbf836fd2ea273c30f4f6427da3ce57b7c1a84b68e317bc6fa91779292bd2012b630f21c0835
6
+ metadata.gz: 68935433385cd450909aee6f18ed9dce231d68e6c4d960bc33f888f0ae5ce7ed83936b66f58d1ca9db9989487505009cbd0459a058c6b3ba4b7bee88ad0a5f60
7
+ data.tar.gz: 348eaec713407d64e216e64f462c6d3c2298e1d3b84caa31d85b8424fba19f6ddf4e6a5803a664143894a29a58d913e4a55770cfe0e4a1668fbd07626d3eda06
@@ -1,3 +1,7 @@
1
+ ## 0.2.0 (2020-05-11)
2
+
3
+ - Add `Bambora::V1::ProfileResource#get` method
4
+
1
5
  ## 0.1.3 (2020-04-30)
2
6
 
3
7
  - Ensure Batch Report returns empty array `:record` in response at the very least
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bambora-client (0.1.2)
4
+ bambora-client (0.1.3)
5
5
  excon (< 1.0)
6
6
  faraday (< 1.0)
7
7
  gyoku (~> 1.0)
@@ -29,7 +29,7 @@ GEM
29
29
  method_source (0.9.2)
30
30
  mime-types (3.3.1)
31
31
  mime-types-data (~> 3.2015)
32
- mime-types-data (3.2019.1009)
32
+ mime-types-data (3.2020.0425)
33
33
  multipart-post (2.1.1)
34
34
  multiparty (0.2.0)
35
35
  mime-types
@@ -90,4 +90,4 @@ DEPENDENCIES
90
90
  webmock (~> 3.7)
91
91
 
92
92
  BUNDLED WITH
93
- 2.1.0
93
+ 2.1.1
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Bambora
4
4
  class Client
5
- VERSION = '0.1.3'
5
+ VERSION = '0.2.0'
6
6
  end
7
7
  end
@@ -58,6 +58,48 @@ module Bambora
58
58
  client.post(path: sub_path, body: card_data, api_key: api_key)
59
59
  end
60
60
 
61
+ ##
62
+ # Get a Bambora payment profile given a customer code.
63
+ #
64
+ # @example
65
+ #
66
+ # client = Bambora::Rest::JSONClient(base_url: '...', api_key: '...', merchant_id: '...')
67
+ # profiles = Bambora::V1::ProfileResource(client: client)
68
+ # customer_code = '02355E2e58Bf488EAB4EaFAD7083dB6A'
69
+ #
70
+ # profiles.get(customer_code: customer_code)
71
+ # # => {
72
+ # # :code => 1,
73
+ # # :message => "Operation Successful",
74
+ # # :customer_code => "02355E2e58Bf488EAB4EaFAD7083dB6A",
75
+ # # :status => "A",
76
+ # # :last_transaction => "1900-01-01T00:00:00",
77
+ # # :modified_date => "1900-01-01T00:00:00",
78
+ # # :card => { :name => "", :number => "", :card_type => "" },
79
+ # # :language => "en",
80
+ # # :velocity_group => "",
81
+ # # :profile_group => "",
82
+ # # :account_ref => "",
83
+ # # :billing =>
84
+ # # {
85
+ # # :name => "Harry Lewis",
86
+ # # :address_line1 => "",
87
+ # # :address_line2 => "",
88
+ # # :city => "",
89
+ # # :province => "",
90
+ # # :country => "",
91
+ # # :postal_code => "",
92
+ # # :phone_number => "",
93
+ # # :email_address => ""},
94
+ # # :custom => { :ref1 => "", :ref2 => "", :ref3 => "", :ref4 => "", :ref5 => "" }}
95
+ #
96
+ # @param customer_code [String] A unique identifier for the associated payment profile.
97
+ #
98
+ # @return [Hash] Payment profile details.
99
+ def get(customer_code:)
100
+ client.get(path: "#{sub_path}/#{customer_code}", api_key: api_key)
101
+ end
102
+
61
103
  ##
62
104
  # Delete a Bambora payment profile given a customer code.
63
105
  #
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bambora-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cassidy K
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-30 00:00:00.000000000 Z
11
+ date: 2020-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon