firekassa 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: db5ff926e9fd5ab6bb87cab375fc60b81a77a20b0e6eecc842d1fe50eb082a6f
4
+ data.tar.gz: 5c7132fae80d82a16434c86c1031ccfbda92444b152f800a10d6375517b7c1d6
5
+ SHA512:
6
+ metadata.gz: 7eb4c901a6c19a7fc7872681198b730a5180177deb219552e8286f4e74be4eebe5fd3413b8951f7b845b0680ce4088e25dbf2440be91fd82cb8d1ef93f85deaf
7
+ data.tar.gz: 8b787aebfb3cf550ab4924b269cf483f8e29a958742a2078d6c63a98fad743ee7e1c82eb5dea49772d096c44daebddc476d6364236e1aa86b70f2f004a43a900
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,21 @@
1
+ require:
2
+ - rubocop-rspec
3
+ - rubocop-rake
4
+
5
+ AllCops:
6
+ TargetRubyVersion: 2.6
7
+ NewCops: enable
8
+
9
+ Style/StringLiterals:
10
+ Enabled: true
11
+ EnforcedStyle: double_quotes
12
+
13
+ Style/StringLiteralsInInterpolation:
14
+ Enabled: true
15
+ EnforcedStyle: double_quotes
16
+
17
+ Layout/LineLength:
18
+ Max: 120
19
+
20
+ Lint/DuplicateMethods:
21
+ Enabled: false
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2023-04-19
4
+
5
+ - Initial release
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at a.kuznetsov@okft.io. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in firekassa.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "rspec", "~> 3.0"
11
+
12
+ gem "rubocop", "~> 1.21"
13
+ gem "rubocop-rake"
14
+ gem "rubocop-rspec"
data/Gemfile.lock ADDED
@@ -0,0 +1,112 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ firekassa (0.1.0)
5
+ faraday (~> 1.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ addressable (2.8.1)
11
+ public_suffix (>= 2.0.2, < 6.0)
12
+ ast (2.4.2)
13
+ coderay (1.1.3)
14
+ crack (0.4.5)
15
+ rexml
16
+ diff-lcs (1.5.0)
17
+ faraday (1.10.3)
18
+ faraday-em_http (~> 1.0)
19
+ faraday-em_synchrony (~> 1.0)
20
+ faraday-excon (~> 1.1)
21
+ faraday-httpclient (~> 1.0)
22
+ faraday-multipart (~> 1.0)
23
+ faraday-net_http (~> 1.0)
24
+ faraday-net_http_persistent (~> 1.0)
25
+ faraday-patron (~> 1.0)
26
+ faraday-rack (~> 1.0)
27
+ faraday-retry (~> 1.0)
28
+ ruby2_keywords (>= 0.0.4)
29
+ faraday-em_http (1.0.0)
30
+ faraday-em_synchrony (1.0.0)
31
+ faraday-excon (1.1.0)
32
+ faraday-httpclient (1.0.1)
33
+ faraday-multipart (1.0.4)
34
+ multipart-post (~> 2)
35
+ faraday-net_http (1.0.1)
36
+ faraday-net_http_persistent (1.2.0)
37
+ faraday-patron (1.0.0)
38
+ faraday-rack (1.0.0)
39
+ faraday-retry (1.0.3)
40
+ hashdiff (1.0.1)
41
+ json (2.6.3)
42
+ method_source (1.0.0)
43
+ multipart-post (2.3.0)
44
+ parallel (1.22.1)
45
+ parser (3.2.1.0)
46
+ ast (~> 2.4.1)
47
+ pry (0.14.2)
48
+ coderay (~> 1.1)
49
+ method_source (~> 1.0)
50
+ public_suffix (5.0.1)
51
+ rainbow (3.1.1)
52
+ rake (13.0.1)
53
+ regexp_parser (2.7.0)
54
+ rexml (3.2.5)
55
+ rspec (3.9.0)
56
+ rspec-core (~> 3.9.0)
57
+ rspec-expectations (~> 3.9.0)
58
+ rspec-mocks (~> 3.9.0)
59
+ rspec-core (3.9.1)
60
+ rspec-support (~> 3.9.1)
61
+ rspec-expectations (3.9.0)
62
+ diff-lcs (>= 1.2.0, < 2.0)
63
+ rspec-support (~> 3.9.0)
64
+ rspec-mocks (3.9.1)
65
+ diff-lcs (>= 1.2.0, < 2.0)
66
+ rspec-support (~> 3.9.0)
67
+ rspec-support (3.9.2)
68
+ rubocop (1.45.1)
69
+ json (~> 2.3)
70
+ parallel (~> 1.10)
71
+ parser (>= 3.2.0.0)
72
+ rainbow (>= 2.2.2, < 4.0)
73
+ regexp_parser (>= 1.8, < 3.0)
74
+ rexml (>= 3.2.5, < 4.0)
75
+ rubocop-ast (>= 1.24.1, < 2.0)
76
+ ruby-progressbar (~> 1.7)
77
+ unicode-display_width (>= 2.4.0, < 3.0)
78
+ rubocop-ast (1.26.0)
79
+ parser (>= 3.2.1.0)
80
+ rubocop-capybara (2.17.1)
81
+ rubocop (~> 1.41)
82
+ rubocop-rake (0.6.0)
83
+ rubocop (~> 1.0)
84
+ rubocop-rspec (2.19.0)
85
+ rubocop (~> 1.33)
86
+ rubocop-capybara (~> 2.17)
87
+ ruby-progressbar (1.13.0)
88
+ ruby2_keywords (0.0.5)
89
+ unicode-display_width (2.4.2)
90
+ vcr (5.1.0)
91
+ webmock (3.18.1)
92
+ addressable (>= 2.8.0)
93
+ crack (>= 0.3.2)
94
+ hashdiff (>= 0.4.0, < 2.0.0)
95
+
96
+ PLATFORMS
97
+ arm64-darwin-21
98
+ x86_64-linux
99
+
100
+ DEPENDENCIES
101
+ firekassa!
102
+ pry (~> 0.12)
103
+ rake (~> 13.0)
104
+ rspec (~> 3.0)
105
+ rubocop (~> 1.21)
106
+ rubocop-rake
107
+ rubocop-rspec
108
+ vcr (~> 5.1)
109
+ webmock (~> 3.18)
110
+
111
+ BUNDLED WITH
112
+ 2.4.7
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 Alexey Kuznetsov
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,85 @@
1
+ # Firekassa
2
+
3
+ Ruby Client of Firekassa API
4
+
5
+ ## Installation
6
+
7
+ Install the gem and add to the application's Gemfile by executing:
8
+
9
+ $ bundle add firekassa
10
+
11
+ If bundler is not being used to manage dependencies, install the gem by executing:
12
+
13
+ $ gem install firekassa
14
+
15
+ ## Usage
16
+
17
+ ### Configure
18
+
19
+ When you get your Site approved you can use it's secret key for making API requests.
20
+
21
+ ```ruby
22
+ require 'firekassa'
23
+
24
+ Firekassa.configure do |config|
25
+ config.base_url = "<BASE API URL>" # "https://admin.vanilapay.com"
26
+ config.api_token = "<YOUR SITE SECRET KEY>"
27
+ end
28
+ ```
29
+ Now you can make API calls
30
+
31
+ ### Balance
32
+
33
+ To get yoour account balance:
34
+
35
+ ```ruby
36
+ Firekassa::Balance.new.get # => { "balance": "2000.0" }
37
+ ```
38
+ See [API method reference](https://admin.vanilapay.com/api/doc/v2#/operations/getBalance)
39
+
40
+ ### Account
41
+
42
+ To list your Site accounts:
43
+ ```ruby
44
+ Firekassa::Account.new.list # => items: [ ... ]
45
+ ```
46
+ See more info in tests and [API method reference](https://admin.vanilapay.com/api/doc/v2#/operations/getSiteAccounts)
47
+
48
+ To show your concrete account info:
49
+ ```ruby
50
+ Firekassa::Balance.new.show(account_id) # => { account_data... }
51
+ ```
52
+ See more info in tests and [API method reference](https://admin.vanilapay.com/api/doc/v2#/operations/getSiteAccount)
53
+
54
+
55
+ ### Deposit
56
+
57
+ To create deposit:
58
+ ```ruby
59
+ Firekassa::Deposit.new.create(deposit_data) # => { trx data... }
60
+ ```
61
+ See more info in tests and [API method reference](https://admin.vanilapay.com/api/doc/v2#/operations/createDepositTransaction)
62
+
63
+ To show deposit data:
64
+ ```ruby
65
+ Firekassa::Deposit.new.show(deposit_id) # => { trx data... }
66
+ ```
67
+ See more info in tests and [API method reference](https://admin.vanilapay.com/api/doc/v2#/operations/getTransaction)
68
+
69
+ ## Development
70
+
71
+ 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.
72
+
73
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
74
+
75
+ ## Contributing
76
+
77
+ Bug reports and pull requests are welcome on GitHub at https://github.com/lxkuz/firekassa-ruby-client. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/lxkuz/firekassa-ruby-client/blob/main/CODE_OF_CONDUCT.md).
78
+
79
+ ## License
80
+
81
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
82
+
83
+ ## Code of Conduct
84
+
85
+ Everyone interacting in the Firekassa project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/lxkuz/firekassa-ruby-client/blob/main/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
data/firekassa.gemspec ADDED
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/firekassa/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "firekassa"
7
+ spec.version = Firekassa::VERSION
8
+ spec.authors = ["Alexey Kuznetsov"]
9
+ spec.email = ["a.kuznetsov@okft.io"]
10
+
11
+ spec.summary = "Ruby Client of Firekassa API"
12
+ spec.description = "Ruby Client of Firekassa API"
13
+ spec.homepage = "https://fp-dev4.fkcore.com/api/doc/v2"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = ">= 2.6.0"
16
+
17
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
18
+
19
+ spec.metadata["homepage_uri"] = spec.homepage
20
+ spec.metadata["source_code_uri"] = "https://github.com/lxkuz/firekassa-ruby-client"
21
+ spec.metadata["changelog_uri"] = "https://github.com/lxkuz/firekassa-ruby-client/blob/main/CHANGELOG.md"
22
+
23
+ # Specify which files should be added to the gem when it is released.
24
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
+ spec.files = Dir.chdir(__dir__) do
26
+ `git ls-files -z`.split("\x0").reject do |f|
27
+ (File.expand_path(f) == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor)})
28
+ end
29
+ end
30
+ spec.bindir = "exe"
31
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
32
+ spec.require_paths = ["lib"]
33
+
34
+ # Uncomment to register a new dependency of your gem
35
+ # spec.add_dependency "example-gem", "~> 1.0"
36
+
37
+ # For more information and examples about making a new gem, check out our
38
+ # guide at: https://bundler.io/guides/creating_gem.html
39
+
40
+ spec.add_dependency "faraday", "~> 1.0"
41
+ spec.add_development_dependency "pry", "~> 0.12"
42
+ spec.add_development_dependency "vcr", "~> 5.1"
43
+ spec.add_development_dependency "webmock", "~> 3.18"
44
+ spec.metadata["rubygems_mfa_required"] = "true"
45
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "firekassa/config"
4
+ require "firekassa/client"
5
+
6
+ module Firekassa
7
+ # Site accounts API
8
+ class Account < Client
9
+ def list
10
+ path = "/api/v2/accounts"
11
+ send_request(method: :get, path: path)
12
+ end
13
+
14
+ def show(id)
15
+ path = "/api/v2/accounts/#{id}"
16
+ send_request(method: :get, path: path)
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "firekassa/config"
4
+ require "firekassa/client"
5
+
6
+ module Firekassa
7
+ # Get site balance API
8
+ class Balance < Client
9
+ def get
10
+ path = "/api/v2/balance"
11
+ send_request(method: :get, path: path)
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Base implementation of the MTN API client
4
+
5
+ # Includes methods common to collections, disbursements and remittances
6
+
7
+ require "faraday"
8
+
9
+ require "firekassa/config"
10
+ require "firekassa/errors"
11
+
12
+ module Firekassa
13
+ # Base API client
14
+ class Client
15
+ def send_request(method:, path:, headers: {}, body: {})
16
+ conn = faraday_with_block(url: Firekassa.config.base_url)
17
+ conn.headers = build_headers(headers)
18
+ case method.to_s
19
+ when "get" then response = conn.get(path)
20
+ when "post" then response = conn.post(path, body.to_json)
21
+ end
22
+ interpret_response(response)
23
+ end
24
+
25
+ def interpret_response(resp)
26
+ body = resp.body.empty? ? "" : JSON.parse(resp.body)
27
+ response = {
28
+ body: body,
29
+ code: resp.status
30
+ }
31
+ handle_error(response[:body], response[:code]) unless resp.status >= 200 && resp.status < 300
32
+ body
33
+ end
34
+
35
+ def handle_error(response_body, response_code)
36
+ raise Firekassa::Error.new(response_body, response_code)
37
+ end
38
+
39
+ private
40
+
41
+ def build_headers(headers)
42
+ {
43
+ "Authorization" => "Bearer #{Firekassa.config.api_token}",
44
+ "Content-Type" => "application/json"
45
+ }.merge(headers)
46
+ end
47
+
48
+ def faraday_with_block(options)
49
+ Faraday.new(options)
50
+ block = Firekassa.config.faraday_block
51
+ if block
52
+ Faraday.new(options, &block)
53
+ else
54
+ Faraday.new(options)
55
+ end
56
+ end
57
+ end
58
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Firekassa
4
+ # Configuration storage
5
+ class Config
6
+ attr_accessor :base_url, :api_token, :faraday_block
7
+
8
+ def initialize
9
+ @base_url = nil
10
+ @api_token = nil
11
+ @faraday_block = nil
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "firekassa/config"
4
+ require "firekassa/client"
5
+
6
+ module Firekassa
7
+ # Get site deposit API
8
+ class Deposit < Client
9
+ def create(data)
10
+ path = "/api/v2/deposit"
11
+ send_request(method: :post, path: path, body: data)
12
+ end
13
+
14
+ def show(id)
15
+ path = "/api/v2/transactions/#{id}"
16
+ send_request(method: :get, path: path)
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,23 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Error handling for unsuccessful responses from the Firekassa API
4
+
5
+ module Firekassa
6
+ # Standard API error
7
+ class Error < StandardError
8
+ attr_reader :code, :data
9
+
10
+ def initialize(message, code)
11
+ @code = code
12
+ @data = message
13
+ super("Error code #{code} #{message}")
14
+ end
15
+ end
16
+
17
+ # Validation error
18
+ class ValidationError < StandardError
19
+ def initialize(msg = message)
20
+ super(msg)
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Firekassa
4
+ VERSION = "0.1.0"
5
+ end
data/lib/firekassa.rb ADDED
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "firekassa/config"
4
+ require "firekassa/version"
5
+ require "firekassa/balance"
6
+ require "firekassa/deposit"
7
+ require "firekassa/account"
8
+
9
+ # Head module
10
+ module Firekassa
11
+ class << self
12
+ attr_accessor :config
13
+ end
14
+
15
+ def self.config
16
+ @config ||= Config.new
17
+ end
18
+
19
+ def self.reset
20
+ @config = Config.new
21
+ end
22
+
23
+ def self.configure
24
+ yield(config)
25
+ end
26
+ end
data/sig/firekassa.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module Firekassa
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,123 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: firekassa
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Alexey Kuznetsov
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-04-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: faraday
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: pry
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.12'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.12'
41
+ - !ruby/object:Gem::Dependency
42
+ name: vcr
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '5.1'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '5.1'
55
+ - !ruby/object:Gem::Dependency
56
+ name: webmock
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.18'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.18'
69
+ description: Ruby Client of Firekassa API
70
+ email:
71
+ - a.kuznetsov@okft.io
72
+ executables: []
73
+ extensions: []
74
+ extra_rdoc_files: []
75
+ files:
76
+ - ".rspec"
77
+ - ".rubocop.yml"
78
+ - CHANGELOG.md
79
+ - CODE_OF_CONDUCT.md
80
+ - Gemfile
81
+ - Gemfile.lock
82
+ - LICENSE.txt
83
+ - README.md
84
+ - Rakefile
85
+ - firekassa.gemspec
86
+ - lib/firekassa.rb
87
+ - lib/firekassa/account.rb
88
+ - lib/firekassa/balance.rb
89
+ - lib/firekassa/client.rb
90
+ - lib/firekassa/config.rb
91
+ - lib/firekassa/deposit.rb
92
+ - lib/firekassa/errors.rb
93
+ - lib/firekassa/version.rb
94
+ - sig/firekassa.rbs
95
+ homepage: https://fp-dev4.fkcore.com/api/doc/v2
96
+ licenses:
97
+ - MIT
98
+ metadata:
99
+ allowed_push_host: https://rubygems.org
100
+ homepage_uri: https://fp-dev4.fkcore.com/api/doc/v2
101
+ source_code_uri: https://github.com/lxkuz/firekassa-ruby-client
102
+ changelog_uri: https://github.com/lxkuz/firekassa-ruby-client/blob/main/CHANGELOG.md
103
+ rubygems_mfa_required: 'true'
104
+ post_install_message:
105
+ rdoc_options: []
106
+ require_paths:
107
+ - lib
108
+ required_ruby_version: !ruby/object:Gem::Requirement
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ version: 2.6.0
113
+ required_rubygems_version: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ requirements: []
119
+ rubygems_version: 3.1.6
120
+ signing_key:
121
+ specification_version: 4
122
+ summary: Ruby Client of Firekassa API
123
+ test_files: []