firekassa 0.1.2 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +16 -29
- data/firekassa-0.1.4.gem +0 -0
- data/lib/firekassa/deposit.rb +22 -2
- data/lib/firekassa/version.rb +1 -1
- data/lib/firekassa/withdraw.rb +35 -5
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9c4f6a9f6641a5454d34b135a2c20b7a6b8565828978d19e1122382afa407da
|
4
|
+
data.tar.gz: 06d66a38d9e38e6428884c635a97a54acc707daaccc928d79181228410ecba2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b66ca0d6e6a903ec7565738614584a3da88c2d8d12573fb3b864be544c8bd5a579d12feea452f4e8c4565875d19032d623fcb4ad11634a87815a27605827ad27
|
7
|
+
data.tar.gz: 77d9cb7e9f6206277b0d778eb8004bf92e54f5f7289ec22f5f37820ce278bc63c5212a844573a6bd3d53c615d9bd4e2b38b822de005bc304b9529cd999b8b138
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -34,7 +34,6 @@ Now you can make API calls
|
|
34
34
|
```ruby
|
35
35
|
Firekassa::Balance.new.get # => { "balance": "2000.0" }
|
36
36
|
```
|
37
|
-
See [API method reference](https://admin.vanilapay.com/api/doc/v2#/operations/getBalance)
|
38
37
|
|
39
38
|
### Account
|
40
39
|
|
@@ -42,14 +41,13 @@ See [API method reference](https://admin.vanilapay.com/api/doc/v2#/operations/ge
|
|
42
41
|
```ruby
|
43
42
|
Firekassa::Account.new.list # => items: [ ... ]
|
44
43
|
```
|
45
|
-
See more info in tests
|
44
|
+
See more info in tests
|
46
45
|
|
47
46
|
#### To show your concrete account info:
|
48
47
|
```ruby
|
49
48
|
Firekassa::Balance.new.show(account_id) # => { account_data... }
|
50
49
|
```
|
51
|
-
See more info in tests
|
52
|
-
|
50
|
+
See more info in tests
|
53
51
|
|
54
52
|
### Transactions
|
55
53
|
|
@@ -57,73 +55,62 @@ See more info in tests and [API method reference](https://admin.vanilapay.com/ap
|
|
57
55
|
```ruby
|
58
56
|
Firekassa::Transaction.new.list # => {items:[ trxs...] }
|
59
57
|
```
|
60
|
-
See more info in tests
|
58
|
+
See more info in tests
|
61
59
|
|
62
|
-
#### To create deposit:
|
60
|
+
#### To create deposit type:card:
|
63
61
|
```ruby
|
64
62
|
deposit_data = {
|
65
63
|
order_id: "123", # payment ID from your system
|
66
|
-
method: "h2h-a", # host to host payment
|
67
64
|
amount: "5000.0",
|
68
65
|
# callbacks
|
69
66
|
notification_url: "http://some.url/callback",
|
70
67
|
success_url: "http://some.url/callback",
|
71
68
|
fail_url: "http://some.url/callback",
|
72
|
-
# card credentials
|
73
|
-
card_number: "4242424242424242",
|
74
|
-
card_expire: "01/25",
|
75
|
-
card_cvv: "123"
|
76
69
|
}
|
77
|
-
result = Firekassa::Deposit.new.
|
78
|
-
|
70
|
+
result = Firekassa::Deposit.new.create_card(deposit_data)
|
71
|
+
# it responds card credentials for making payment
|
79
72
|
```
|
80
|
-
See more info in tests
|
73
|
+
See more info in tests
|
81
74
|
|
82
|
-
#### To create withdrawal:
|
75
|
+
#### To create withdrawal type:card:
|
83
76
|
```ruby
|
77
|
+
# for card
|
84
78
|
withdraw_data = {
|
85
79
|
order_id: "123123", # payment ID from your system
|
86
|
-
method: "card",
|
87
80
|
account: "4242424242424242",
|
81
|
+
site_account: 'sber',
|
88
82
|
amount: "100.00",
|
89
83
|
# callbacks
|
90
84
|
notification_url: "http://some.url/callback",
|
91
|
-
success_url: "http://some.url/callback",
|
92
|
-
fail_url: "http://some.url/callback"
|
93
85
|
}
|
94
|
-
Firekassa::Withdraw.new.
|
86
|
+
Firekassa::Withdraw.new.create_card(withdraw_data) # => { trx data... }
|
95
87
|
```
|
96
|
-
See more info in tests
|
88
|
+
See more info in tests
|
97
89
|
|
98
90
|
#### To show transaction data:
|
99
91
|
```ruby
|
100
92
|
Firekassa::Transaction.new.show(deposit_id) # => { trx data... }
|
101
93
|
```
|
102
|
-
See more info in tests
|
94
|
+
See more info in tests
|
103
95
|
|
104
96
|
#### Cancel transaction:
|
105
97
|
```ruby
|
106
98
|
Firekassa::Transaction.new.cancel(id) # => { trx data... }
|
107
99
|
```
|
108
|
-
See more info in tests
|
100
|
+
See more info in tests
|
109
101
|
|
110
|
-
#### To get currency rate for withdrawal:
|
111
|
-
```ruby
|
112
|
-
Firekassa::Withdraw.new.currency_rate(data) # => { rate data... }
|
113
|
-
```
|
114
|
-
See more info in tests and [API method reference](https://admin.vanilapay.com/api/doc/v2#/operations/getWithdrawalRate)
|
115
102
|
|
116
103
|
#### To download transaction receipt:
|
117
104
|
```ruby
|
118
105
|
Firekassa::Transaction.new.download_receipt(id)
|
119
106
|
```
|
120
|
-
See more info in tests
|
107
|
+
See more info in tests
|
121
108
|
|
122
109
|
To send transaction receipt to email:
|
123
110
|
```ruby
|
124
111
|
Firekassa::Transaction.new.send_to_email(id)
|
125
112
|
```
|
126
|
-
See more info in tests
|
113
|
+
See more info in tests
|
127
114
|
|
128
115
|
## Development
|
129
116
|
|
data/firekassa-0.1.4.gem
ADDED
Binary file
|
data/lib/firekassa/deposit.rb
CHANGED
@@ -6,9 +6,29 @@ require "firekassa/client"
|
|
6
6
|
module Firekassa
|
7
7
|
# Deposit API
|
8
8
|
class Deposit < Client
|
9
|
-
def create(data)
|
10
|
-
path = "/api/v2/deposit"
|
9
|
+
def create(type, data)
|
10
|
+
path = "/api/v2/deposit/#{type}"
|
11
11
|
send_request(method: :post, path: path, body: data)
|
12
12
|
end
|
13
|
+
|
14
|
+
def create_card(data)
|
15
|
+
create(:card, data)
|
16
|
+
end
|
17
|
+
|
18
|
+
def create_sbp(data)
|
19
|
+
create(:sbp, data)
|
20
|
+
end
|
21
|
+
|
22
|
+
def create_sbpa(data)
|
23
|
+
create("sbp-a", data)
|
24
|
+
end
|
25
|
+
|
26
|
+
def create_usdt_trc20(data)
|
27
|
+
create("usdt-trc20", data)
|
28
|
+
end
|
29
|
+
|
30
|
+
def create_usdt_erc20(data)
|
31
|
+
create("usdt-erc20", data)
|
32
|
+
end
|
13
33
|
end
|
14
34
|
end
|
data/lib/firekassa/version.rb
CHANGED
data/lib/firekassa/withdraw.rb
CHANGED
@@ -6,13 +6,43 @@ require "firekassa/client"
|
|
6
6
|
module Firekassa
|
7
7
|
# Withdraw API
|
8
8
|
class Withdraw < Client
|
9
|
-
def
|
10
|
-
|
11
|
-
|
9
|
+
def create_card(data)
|
10
|
+
create(:card, data)
|
11
|
+
end
|
12
|
+
|
13
|
+
def create_sbp(data)
|
14
|
+
create(:sbp, data)
|
15
|
+
end
|
16
|
+
|
17
|
+
def create_phone(data)
|
18
|
+
create(:phone, data)
|
19
|
+
end
|
20
|
+
|
21
|
+
def create_qiwi_wallet(data)
|
22
|
+
create("qiwi-wallet", data)
|
23
|
+
end
|
24
|
+
|
25
|
+
def create_yoomoney(data)
|
26
|
+
create(:yoomoney, data)
|
27
|
+
end
|
28
|
+
|
29
|
+
def create_usdt_trc20(data)
|
30
|
+
create("usdt-trc20", data)
|
31
|
+
end
|
32
|
+
|
33
|
+
def create_usdt_erc20(data)
|
34
|
+
create("usdt-erc20", data)
|
35
|
+
end
|
36
|
+
|
37
|
+
def sbp_banks
|
38
|
+
paht = "/api/v2/sbp-banks"
|
39
|
+
send_request(method: :get, path: paht)
|
12
40
|
end
|
13
41
|
|
14
|
-
|
15
|
-
|
42
|
+
private
|
43
|
+
|
44
|
+
def create(type, data)
|
45
|
+
path = "/api/v2/withdrawal/#{type}"
|
16
46
|
send_request(method: :post, path: path, body: data)
|
17
47
|
end
|
18
48
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: firekassa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexey Kuznetsov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -82,6 +82,7 @@ files:
|
|
82
82
|
- LICENSE.txt
|
83
83
|
- README.md
|
84
84
|
- Rakefile
|
85
|
+
- firekassa-0.1.4.gem
|
85
86
|
- firekassa.gemspec
|
86
87
|
- lib/firekassa.rb
|
87
88
|
- lib/firekassa/account.rb
|