tazapay 0.1.2 → 0.1.3
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/CHANGELOG.md +4 -0
- data/CODE_OF_CONDUCT.md +1 -1
- data/Gemfile.lock +1 -1
- data/README.md +33 -2
- data/lib/tazapay/bank.rb +0 -2
- data/lib/tazapay/checkout.rb +0 -2
- data/lib/tazapay/client.rb +0 -4
- data/lib/tazapay/errors.rb +1 -1
- data/lib/tazapay/metadata.rb +48 -0
- data/lib/tazapay/user.rb +0 -2
- data/lib/tazapay/version.rb +1 -1
- data/lib/tazapay.rb +1 -0
- data/tazapay.gemspec +1 -1
- 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: b450d94fc7d24206476c392110db8e1defd931c6a8b9f31b127ecbe1f4ff6cf0
|
4
|
+
data.tar.gz: 6c082cdd772f23a90fc78ed6aadd8d4d0ab0538ec7254d3c6dbe7f229a6e6537
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07f5a205b8d63fa6459e9ca0af995e3b215c358761fd444bc8b9100451c2f1d6106ba4f179785ec7f3908022d5f1f2a408dec31366d3c0f61429508f0760698e
|
7
|
+
data.tar.gz: b2c84373e543b873bd1aac04dcb33802db28e02ed0ea391b9b7ef0723dd298ec813dcafd1ca9b5c4bc40f4e10da88ce817eee61048e8cd56796fbeaeed478884
|
data/CHANGELOG.md
CHANGED
data/CODE_OF_CONDUCT.md
CHANGED
@@ -39,7 +39,7 @@ This Code of Conduct applies within all community spaces, and also applies when
|
|
39
39
|
|
40
40
|
## Enforcement
|
41
41
|
|
42
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at
|
42
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at m2lxkuz@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
|
43
43
|
|
44
44
|
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
45
45
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
# Tazapay
|
2
2
|
|
3
|
-
|
3
|
+
Tazapay API ruby client
|
4
4
|
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
6
5
|
|
7
6
|
## Installation
|
8
7
|
|
@@ -108,6 +107,38 @@ tazapay_bank.make_primary(bank_id: bank_id, account_id: user_id)
|
|
108
107
|
See more details in tests
|
109
108
|
|
110
109
|
|
110
|
+
### Metadata
|
111
|
+
|
112
|
+
```ruby
|
113
|
+
|
114
|
+
tazapay_metadata = Tazapay::Metadata.new
|
115
|
+
|
116
|
+
# See https://docs.tazapay.com/reference/country-configuration-api
|
117
|
+
tazapay_metadata.country_config(country)
|
118
|
+
|
119
|
+
# See https://docs.tazapay.com/reference/invoice-currency-api
|
120
|
+
tazapay_metadata.invoice_currency(buyer_country:, seller_country:)
|
121
|
+
|
122
|
+
# See https://docs.tazapay.com/reference/collection-methods-api
|
123
|
+
tazapay_metadata.collection_methods(buyer_country:, seller_country:, invoice_currency:, amount:)
|
124
|
+
|
125
|
+
# See https://docs.tazapay.com/reference/disburse-methods-api
|
126
|
+
tazapay_metadata.disbursement_methods(buyer_country:, seller_country:, invoice_currency:, amount:)
|
127
|
+
|
128
|
+
# Doc upload URL
|
129
|
+
tazapay_metadata.doc_upload_url
|
130
|
+
|
131
|
+
# KYB Doc
|
132
|
+
tazapay_metadata.kyb_doc(country)
|
133
|
+
|
134
|
+
# See https://docs.tazapay.com/reference/get-milestone-schemes
|
135
|
+
tazapay_metadata.milestone_scheme
|
136
|
+
|
137
|
+
```
|
138
|
+
|
139
|
+
See more details in tests
|
140
|
+
|
141
|
+
|
111
142
|
## Development
|
112
143
|
|
113
144
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
data/lib/tazapay/bank.rb
CHANGED
data/lib/tazapay/checkout.rb
CHANGED
data/lib/tazapay/client.rb
CHANGED
data/lib/tazapay/errors.rb
CHANGED
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "tazapay/config"
|
4
|
+
require "tazapay/client"
|
5
|
+
|
6
|
+
module Tazapay
|
7
|
+
# Metadata API
|
8
|
+
class Metadata < Client
|
9
|
+
def country_config(country)
|
10
|
+
path = "v1/metadata/countryconfig?country=#{country}"
|
11
|
+
send_request(method: :get, path: path)
|
12
|
+
end
|
13
|
+
|
14
|
+
def invoice_currency(buyer_country:, seller_country:)
|
15
|
+
path = "v1/metadata/invoicecurrency?buyer_country=#{buyer_country}&seller_country=#{seller_country}"
|
16
|
+
send_request(method: :get, path: path)
|
17
|
+
end
|
18
|
+
|
19
|
+
def collection_methods(buyer_country:, seller_country:, invoice_currency:, amount:)
|
20
|
+
path = "v1/metadata/collect?buyer_country=#{buyer_country}" \
|
21
|
+
"&seller_country=#{seller_country}&invoice_currency=#{invoice_currency}" \
|
22
|
+
"&amount=#{amount}"
|
23
|
+
send_request(method: :get, path: path)
|
24
|
+
end
|
25
|
+
|
26
|
+
def disbursement_methods(buyer_country:, seller_country:, invoice_currency:, amount:)
|
27
|
+
path = "v1/metadata/disburse?buyer_country=#{buyer_country}" \
|
28
|
+
"&seller_country=#{seller_country}&invoice_currency=#{invoice_currency}" \
|
29
|
+
"&amount=#{amount}"
|
30
|
+
send_request(method: :get, path: path)
|
31
|
+
end
|
32
|
+
|
33
|
+
def doc_upload_url
|
34
|
+
path = "/v1/metadata/doc/upload"
|
35
|
+
send_request(method: :get, path: path)
|
36
|
+
end
|
37
|
+
|
38
|
+
def kyb_doc(country)
|
39
|
+
path = "/v1/metadata/kyb/doc?country=#{country}"
|
40
|
+
send_request(method: :get, path: path)
|
41
|
+
end
|
42
|
+
|
43
|
+
def milestone_scheme
|
44
|
+
path = "v1/metadata/milestone/scheme"
|
45
|
+
send_request(method: :get, path: path)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
data/lib/tazapay/user.rb
CHANGED
data/lib/tazapay/version.rb
CHANGED
data/lib/tazapay.rb
CHANGED
data/tazapay.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.name = "tazapay"
|
9
9
|
spec.version = Tazapay::VERSION
|
10
10
|
spec.authors = ["Alexey Kuznetsov"]
|
11
|
-
spec.email = ["
|
11
|
+
spec.email = ["m2lxkuz@gmail.com"]
|
12
12
|
|
13
13
|
spec.summary = "Tazapay payments API ruby client"
|
14
14
|
spec.description = "Tazapay payments API ruby client"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tazapay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexey Kuznetsov
|
@@ -68,7 +68,7 @@ dependencies:
|
|
68
68
|
version: '3.18'
|
69
69
|
description: Tazapay payments API ruby client
|
70
70
|
email:
|
71
|
-
-
|
71
|
+
- m2lxkuz@gmail.com
|
72
72
|
executables: []
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
@@ -88,6 +88,7 @@ files:
|
|
88
88
|
- lib/tazapay/client.rb
|
89
89
|
- lib/tazapay/config.rb
|
90
90
|
- lib/tazapay/errors.rb
|
91
|
+
- lib/tazapay/metadata.rb
|
91
92
|
- lib/tazapay/user.rb
|
92
93
|
- lib/tazapay/version.rb
|
93
94
|
- sig/tazapay.rbs
|