mandarin-api 0.3.1 → 0.4.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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/mandarin_api.rb +4 -9
- data/lib/mandarin_api/payment_manager.rb +1 -1
- data/mandarin-api.gemspec +1 -1
- data/spec/lib/mandarin_api/payment_manager_spec.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d26d560afb95e6d1924115c5c6a95f3212a249cc
|
4
|
+
data.tar.gz: 5c64b4f9f8a43cc07b22e3aaa1657f80b5ddf1b8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd31f05153afbe749e926487464ec729fe8707623cab89d4d769a830067ca40a8362ebf54b62dcd840278a8240c0782470494aa08f40ebf6737f51876b07dd5c
|
7
|
+
data.tar.gz: 61308ee7e37a8bbf39ee4a19a8370fcfc4eedf9cf719a56f7c67c1109eb5e1830a26c784677fbe63c25909be4c1f4fb5c0a694a1719b1bf47d195db75458e95a
|
data/Gemfile.lock
CHANGED
data/lib/mandarin_api.rb
CHANGED
@@ -31,24 +31,19 @@ module MandarinApi
|
|
31
31
|
|
32
32
|
def self.payout(order_id, amount, assigned_card_uuid, custom_values = [])
|
33
33
|
params = {
|
34
|
-
order_id: order_id, amount: amount,
|
35
|
-
|
34
|
+
order_id: order_id, amount: amount, assigned_card_uuid: assigned_card_uuid,
|
35
|
+
custom_values: custom_values
|
36
36
|
}
|
37
37
|
MandarinApi::PaymentManager.new.perform_payout params
|
38
38
|
end
|
39
39
|
|
40
40
|
def self.refund(order_id, transaction_uuid, amount)
|
41
|
-
params = {
|
42
|
-
order_id: order_id, transaction_uuid: transaction_uuid,
|
43
|
-
amount: amount
|
44
|
-
}
|
41
|
+
params = { order_id: order_id, transaction_uuid: transaction_uuid, amount: amount }
|
45
42
|
MandarinApi::PaymentManager.new.perform_refund params
|
46
43
|
end
|
47
44
|
|
48
45
|
def self.rebill(order_id, amount, transaction_uuid)
|
49
|
-
params = {
|
50
|
-
order_id: order_id, amount: amount, transaction_uuid: transaction_uuid
|
51
|
-
}
|
46
|
+
params = { order_id: order_id, amount: amount, transaction_uuid: transaction_uuid }
|
52
47
|
MandarinApi::PaymentManager.new.perform_rebill params
|
53
48
|
end
|
54
49
|
|
@@ -56,7 +56,7 @@ module MandarinApi
|
|
56
56
|
payment: { order_id: params[:order_id], action: action },
|
57
57
|
target: { transaction: params[:transaction_uuid] }
|
58
58
|
}
|
59
|
-
body[:payment][:price] = params[:
|
59
|
+
body[:payment][:price] = params[:amount] if params[:amount]
|
60
60
|
body
|
61
61
|
end
|
62
62
|
|
data/mandarin-api.gemspec
CHANGED