rock_rms 6.0.7 → 6.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: 1e008fb1fcc7c3fd5ae8b524a0766c89d1232b36fddf8c183bdb56ccf60e5bb1
4
- data.tar.gz: a8543f772e1c1feffbb5b233856346d21681442d7cd2309e251b8caba8c1c0f8
3
+ metadata.gz: a5c736d626c3e10da442946c804afb51495b72dbd639eb1618ddf02f5014373b
4
+ data.tar.gz: 530f44eb1fc23905e1c73f8fb1520758211437cd9ef274edc6cec40022912fab
5
5
  SHA512:
6
- metadata.gz: e314b9a967d888d66115508937ea4923ce2b33e542788a0c697352e89f6e491658f71307b369770d898306dfd3291d531c10567ac745a8076eaa52dd31db1a6f
7
- data.tar.gz: d4344e82e132d901b2024cdb8b3c49b530dba68aba909454810019080738069d9a9a5e43f17e441dd294edb75e177e52180d6c43b02bd098852383d4c5543269
6
+ metadata.gz: b9310ac0e808dc7b62cc60cea9aa8137db0d5905caec35ae13d5cb0e1d59f15980f2a06ae63bbaa7c3b63e66181292769a711f8c5ebb9bc8c2bf465c7c6f4ac3
7
+ data.tar.gz: 5791b298548d265583c4258a09817f6e38f2720c86e6044fa77d23cbf9c097d81654fff0013922ad997e8764cdb262104c2b83c11562a75ab97aa1c2a64de0de
@@ -1,10 +1,21 @@
1
1
  module RockRMS
2
2
  class Client
3
3
  module Gateway
4
+ PATH = 'FinancialGateways'.freeze
5
+
4
6
  def list_gateways(options = {})
5
- Response::Gateway.format(
6
- get('FinancialGateways', options)
7
- )
7
+ res = get(gateway_path, options)
8
+ Response::Gateway.format(res)
9
+ end
10
+
11
+ def delete_gateway(id)
12
+ delete(gateway_path(id))
13
+ end
14
+
15
+ private
16
+
17
+ def gateway_path(id = nil)
18
+ id ? "#{PATH}/#{id}" : PATH
8
19
  end
9
20
  end
10
21
  end
@@ -17,6 +17,16 @@ module RockRMS
17
17
  post(payment_detail_path, options)
18
18
  end
19
19
 
20
+ def update_payment_detail(id, foreign_key: nil, card_type: nil, last_4: nil)
21
+ options = {}
22
+
23
+ options['CreditCardTypeValueId'] = cast_card_type(card_type) if card_type
24
+ options['ForeignKey'] = foreign_key if foreign_key
25
+ options['AccountNumberMasked'] = "************#{last_4}" if last_4
26
+
27
+ patch(payment_detail_path(id), options)
28
+ end
29
+
20
30
  def delete_payment_detail(id)
21
31
  delete(payment_detail_path(id))
22
32
  end
@@ -53,6 +53,22 @@ module RockRMS
53
53
  post(people_path, options)
54
54
  end
55
55
 
56
+ def create_business(name:, email:, connection_status_value_id: nil, record_status_value_id: nil, record_type_value_id: 2)
57
+ options = {
58
+ 'IsSystem' => false,
59
+ 'LastName' => name,
60
+ 'Email' => email,
61
+ 'Gender' => 1,
62
+ 'ConnectionStatusValueId' => connection_status_value_id,
63
+ 'RecordStatusValueId' => record_status_value_id,
64
+ 'RecordTypeValueId' => record_type_value_id,
65
+ }
66
+
67
+ # RecordTypeValueId 2 = Business
68
+
69
+ post(people_path, options)
70
+ end
71
+
56
72
  def update_person(id, options = {})
57
73
  put(people_path(id), options)
58
74
  end
@@ -1,3 +1,3 @@
1
1
  module RockRMS
2
- VERSION = '6.0.7'.freeze
2
+ VERSION = '6.2.0'.freeze
3
3
  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: 6.0.7
4
+ version: 6.2.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: 2022-07-11 00:00:00.000000000 Z
11
+ date: 2022-07-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday