rock_rms 6.0.6 → 6.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rock_rms/resources/payment_detail.rb +10 -0
- data/lib/rock_rms/resources/person.rb +16 -0
- data/lib/rock_rms/resources/saved_payment_method.rb +4 -0
- data/lib/rock_rms/response/saved_payment_method.rb +1 -0
- data/lib/rock_rms/version.rb +1 -1
- data/spec/rock_rms/resources/saved_payment_method_spec.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50017d792afc7f4304715fe75cb68760b009877d27ea8331eaab91286b88095a
|
4
|
+
data.tar.gz: d1aa86a4092b9f6fa44bc2cf0ae85f8dda656432b4a901f7254f231b1b131995
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59a28cb036b889eff884c4c2f3fb777a2977929019098c9ebc344cf1505e3df2901771b49690a165336bcc2696d997e6891eb6d0aadb3f4132b0f204c4f229ff
|
7
|
+
data.tar.gz: bfd0035a62b2a89211f7d50f1a312b70423814da3c29d551b50e7b1e74117445a7e36e150c1680fae2946d451c0f45bc9d783a4b8d9f7085fe5376e4a95b5dca
|
@@ -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
|
@@ -9,6 +9,7 @@ module RockRMS
|
|
9
9
|
def create_saved_payment_method(
|
10
10
|
gateway_id:,
|
11
11
|
gateway_person_id: nil,
|
12
|
+
is_default: 0,
|
12
13
|
payment_detail_id:,
|
13
14
|
person_alias_id:,
|
14
15
|
name:,
|
@@ -17,6 +18,7 @@ module RockRMS
|
|
17
18
|
options = {
|
18
19
|
'FinancialGatewayId' => gateway_id,
|
19
20
|
'FinancialPaymentDetailId' => payment_detail_id,
|
21
|
+
'IsDefault' => is_default,
|
20
22
|
'Name' => name,
|
21
23
|
'PersonAliasId' => person_alias_id,
|
22
24
|
'ReferenceNumber' => reference_number
|
@@ -33,6 +35,7 @@ module RockRMS
|
|
33
35
|
id,
|
34
36
|
gateway_id: nil,
|
35
37
|
gateway_person_id: nil,
|
38
|
+
is_default: nil,
|
36
39
|
payment_detail_id: nil,
|
37
40
|
person_alias_id: nil,
|
38
41
|
name: nil,
|
@@ -42,6 +45,7 @@ module RockRMS
|
|
42
45
|
|
43
46
|
options['FinancialGatewayId'] = gateway_id if gateway_id
|
44
47
|
options['GatewayPersonIdentifier'] = gateway_person_id if gateway_person_id
|
48
|
+
options['IsDefault'] = is_default if is_default
|
45
49
|
options['FinancialPaymentDetailId'] = payment_detail_id if payment_detail_id
|
46
50
|
options['Name'] = name if name
|
47
51
|
options['PersonAliasId'] = person_alias_id if person_alias_id
|
data/lib/rock_rms/version.rb
CHANGED
@@ -60,6 +60,7 @@ RSpec.describe RockRMS::Client::SavedPaymentMethod, type: :model do
|
|
60
60
|
'Name' => 'Sapphire Preferred',
|
61
61
|
'ReferenceNumber' => 'card_1234',
|
62
62
|
'PersonAliasId' => 1,
|
63
|
+
'IsDefault' => 0,
|
63
64
|
'FinancialGatewayId' => 2,
|
64
65
|
'FinancialPaymentDetailId' => 1
|
65
66
|
).and_call_original
|
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
|
4
|
+
version: 6.1.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-
|
11
|
+
date: 2022-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|