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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4d915e0b1f5d9bd316207797bae8588277a1ab41
4
- data.tar.gz: a5c02e3876d9d249de648157344d4234471bc82e
3
+ metadata.gz: d26d560afb95e6d1924115c5c6a95f3212a249cc
4
+ data.tar.gz: 5c64b4f9f8a43cc07b22e3aaa1657f80b5ddf1b8
5
5
  SHA512:
6
- metadata.gz: 1963fb92ed527f4f8c4d44be2691e5dbac8cfc44ca35b51d6c7aeeee87054c9d59f87a6ad12ce7e012bd099a195e74187b659f8c1b9b8f9e6e7bd33613d54407
7
- data.tar.gz: 197b41facf0619ef4a3a1cafc8f06b0c2b63be8fbfe3a093c2d67735bda73e4a81bc813399034cab8174d614551127d142420fb88262410805dfa84c9f32f9dc
6
+ metadata.gz: cd31f05153afbe749e926487464ec729fe8707623cab89d4d769a830067ca40a8362ebf54b62dcd840278a8240c0782470494aa08f40ebf6737f51876b07dd5c
7
+ data.tar.gz: 61308ee7e37a8bbf39ee4a19a8370fcfc4eedf9cf719a56f7c67c1109eb5e1830a26c784677fbe63c25909be4c1f4fb5c0a694a1719b1bf47d195db75458e95a
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mandarin-api (0.3.1)
4
+ mandarin-api (0.4.0)
5
5
  rest-client (>= 2.0, < 3.0)
6
6
 
7
7
  GEM
@@ -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
- assigned_card_uuid: assigned_card_uuid, custom_values: custom_values
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[:price] if params[:price]
59
+ body[:payment][:price] = params[:amount] if params[:amount]
60
60
  body
61
61
  end
62
62
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'mandarin-api'
5
- s.version = '0.3.1'
5
+ s.version = '0.4.0'
6
6
  s.authors = ['Vladimir Bogaevsky']
7
7
  s.email = 'gitvbogaevsky@gmail.com'
8
8
  s.licenses = ['MIT']
@@ -110,7 +110,7 @@ RSpec.describe MandarinApi::PaymentManager do
110
110
  let(:params_w_price) do
111
111
  {
112
112
  order_id: 123_321, transaction_uuid: '43913ddc000c4d3990fddbd3980c1725',
113
- price: 1_000
113
+ amount: 1_000
114
114
  }
115
115
  end
116
116
  it 'calls wrapper instance with args' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mandarin-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Bogaevsky