rock_rms 8.20.0 → 8.22.0

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
  SHA256:
3
- metadata.gz: c691d56692e51a977969f06bdb9a990a42ed6b51e20fedd4b0ad38ff89e85ac1
4
- data.tar.gz: e5c8f79f5e471bd1a5ab0d8d1a5144d7ed13bba4ba851a0a6d72c9c6973567f4
3
+ metadata.gz: a7f73d80641abc5b8aa251bb82553e316d755f4e5c28fc1146f30d8b735ecd20
4
+ data.tar.gz: fdd6ce2022a980d102b7210d552bb1a6e8fb4d390b7934110af3e350e8241de4
5
5
  SHA512:
6
- metadata.gz: 12d44c778099cd60f59f42ca0a5bc7c19f974db21d91c2946dbeb6e3d80e5c177a2457a5ef9b72cdb05383b5f85cd08bd20e44edc09fc5d556f86ed8c5114426
7
- data.tar.gz: f6fe6941f2218816806adcd5429f551db13148d9e79c6b34989479861832dc308dbc7bc256a27ccba2a6040257c562baaf7ccb512f1b96c1c4c7bde132693224
6
+ metadata.gz: 41cb76b8c8ac39e43f4346fa6f4ad987b1ddec615c257692abb1aaad0e3ecb8da538f63c8b48736741327590a71647f57dc1684f88abcbd6f327aff5fc396f9d
7
+ data.tar.gz: a1bac72066d3360453cfd0c2fac0cfc273b38344f13a8156e025f74922002cd04bc01ea63e05f5d9564023c9abacf5305b7fe92d87f9b319fa3635eb7895f47c
@@ -6,23 +6,31 @@ module RockRMS
6
6
  Response::PaymentDetail.format(res)
7
7
  end
8
8
 
9
- def create_payment_detail(payment_type:, foreign_key: nil, card_type: nil, last_4: nil)
9
+ def create_payment_detail(
10
+ payment_type: nil,
11
+ foreign_key: nil,
12
+ card_type: nil,
13
+ last_4: nil,
14
+ currency_type_value_id: nil
15
+ )
10
16
  options = {
11
- 'CurrencyTypeValueId' => cast_payment_type(payment_type),
17
+ 'CurrencyTypeValueId' => currency_type_value_id || cast_payment_type(payment_type),
12
18
  'CreditCardTypeValueId' => cast_card_type(card_type),
13
19
  'ForeignKey' => foreign_key
14
20
  }
21
+
15
22
  options['AccountNumberMasked'] = "************#{last_4}" if last_4
16
23
 
17
24
  post(payment_detail_path, options)
18
25
  end
19
26
 
20
- def update_payment_detail(id, foreign_key: nil, card_type: nil, last_4: nil)
27
+ def update_payment_detail(id, foreign_key: nil, card_type: nil, last_4: nil, currency_type_value_id: nil)
21
28
  options = {}
22
29
 
23
30
  options['CreditCardTypeValueId'] = cast_card_type(card_type) if card_type
24
31
  options['ForeignKey'] = foreign_key if foreign_key
25
32
  options['AccountNumberMasked'] = "************#{last_4}" if last_4
33
+ options['CurrencyTypeValueId'] = currency_type_value_id if currency_type_value_id
26
34
 
27
35
  patch(payment_detail_path(id), options)
28
36
  end
@@ -1,3 +1,3 @@
1
1
  module RockRMS
2
- VERSION = '8.20.0'.freeze
2
+ VERSION = '8.22.0'.freeze
3
3
  end
@@ -12,13 +12,6 @@ RSpec.describe RockRMS::Client::PaymentDetail, type: :model do
12
12
  end
13
13
 
14
14
  describe '#create_payment_detail' do
15
- context 'arguments' do
16
- it 'require `payment_type`' do
17
- expect { client.create_payment_detail }
18
- .to raise_error(ArgumentError, /payment_type/)
19
- end
20
- end
21
-
22
15
  subject(:resource) do
23
16
  client.create_payment_detail(payment_type: 'card', card_type: 'amex')
24
17
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rock_rms
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.20.0
4
+ version: 8.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Taylor Brooks
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-20 00:00:00.000000000 Z
11
+ date: 2024-04-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday