firekassa 0.1.1 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0a663cb7f57a14f62f0314b777f83539532d591e77c516f773ebaf45919fe1ca
4
- data.tar.gz: dac4b997543d93289431ec98b2dd2e0d761c55941bc2d2b04760c8f136864cc3
3
+ metadata.gz: 88c9813fd744f9bc156dc9c9a2e8e10103b8e506eba1971372749eacfe715660
4
+ data.tar.gz: 90696bb7b0008ed6f341f5100da4a0aaac89d4944bd67627da1dea394e8dc28c
5
5
  SHA512:
6
- metadata.gz: a0631685d5fe44e607e41a5b71856253d56f8a50927fd0f2702fd3fe59bd3bf1dcdfcf0837ef350520b2e2dad1155aad172cb6b7a44eae4e7427173b875f02a7
7
- data.tar.gz: 610c39e084c30e0b941c46a861fc71cba5a59cd664af668bbe0d3f0c5eae6277380d9d8df7775713439b608a8aa70738fe1c3c966fba5e76b289592598e01395
6
+ metadata.gz: 3046b7f1c1e06b5f677cba35157f75ddcdd57f696fb0640923667b7b339146a0ba08427fa5f654490a5f24ad82e07754cc693c6dfaad1d008d99205b9fc84855
7
+ data.tar.gz: 485217788a1763ecce7f8b2db8bbd8b49b033b7bdbf70825e3151ed76ce60a8b3f9a09de164a215f3b28af480ac557f135a6202f378772da9f3bd6f223ee1d68
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- firekassa (0.1.1)
4
+ firekassa (0.1.3)
5
5
  faraday (~> 1.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -61,12 +61,36 @@ See more info in tests and [API method reference](https://admin.vanilapay.com/ap
61
61
 
62
62
  #### To create deposit:
63
63
  ```ruby
64
- Firekassa::Deposit.new.create(deposit_data) # => { trx data... }
64
+ deposit_data = {
65
+ order_id: "123", # payment ID from your system
66
+ method: "h2h-a", # host to host payment
67
+ amount: "5000.0",
68
+ # callbacks
69
+ notification_url: "http://some.url/callback",
70
+ success_url: "http://some.url/callback",
71
+ fail_url: "http://some.url/callback",
72
+ # card credentials
73
+ card_number: "4242424242424242",
74
+ card_expire: "01/25",
75
+ card_cvv: "123"
76
+ }
77
+ result = Firekassa::Deposit.new.create(deposit_data)
78
+ payment_url = result['payment_url'] # Customer should visit this link to proceed the payment
65
79
  ```
66
80
  See more info in tests and [API method reference](https://admin.vanilapay.com/api/doc/v2#/operations/createDepositTransaction)
67
81
 
68
82
  #### To create withdrawal:
69
83
  ```ruby
84
+ withdraw_data = {
85
+ order_id: "123123", # payment ID from your system
86
+ method: "card",
87
+ account: "4242424242424242",
88
+ amount: "100.00",
89
+ # callbacks
90
+ notification_url: "http://some.url/callback",
91
+ success_url: "http://some.url/callback",
92
+ fail_url: "http://some.url/callback"
93
+ }
70
94
  Firekassa::Withdraw.new.create(withdraw_data) # => { trx data... }
71
95
  ```
72
96
  See more info in tests and [API method reference](https://admin.vanilapay.com/api/doc/v2#/operations/createWithdrawalTransaction)
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "firekassa/config"
4
+ require "firekassa/client"
5
+
6
+ module Firekassa
7
+ # Invoice API
8
+ class Invoice < Client
9
+ def create(data)
10
+ path = "/api/v2/invoices"
11
+ send_request(method: :post, path: path, body: data)
12
+ end
13
+ end
14
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Firekassa
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.3"
5
5
  end
data/lib/firekassa.rb CHANGED
@@ -7,6 +7,7 @@ require "firekassa/balance"
7
7
  require "firekassa/transaction"
8
8
  require "firekassa/deposit"
9
9
  require "firekassa/withdraw"
10
+ require "firekassa/invoice"
10
11
 
11
12
  # Head module
12
13
  module Firekassa
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.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexey Kuznetsov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-20 00:00:00.000000000 Z
11
+ date:
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -90,6 +90,7 @@ files:
90
90
  - lib/firekassa/config.rb
91
91
  - lib/firekassa/deposit.rb
92
92
  - lib/firekassa/errors.rb
93
+ - lib/firekassa/invoice.rb
93
94
  - lib/firekassa/transaction.rb
94
95
  - lib/firekassa/version.rb
95
96
  - lib/firekassa/withdraw.rb