paysafe 0.12.0 → 0.13.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
  SHA256:
3
- metadata.gz: 739e977d16a44e8436de3b59ab0afd10c50f25dbde30cba5e7c0ed3736c15224
4
- data.tar.gz: e22eed86a829496812f4658869f0fab19ba1650a3450ef818ce7efb2bafa9d26
3
+ metadata.gz: ceabdeb4ef69eb4c874761adac23f1222684b86d58c9b7a5669e3ef3a3ac8380
4
+ data.tar.gz: 47427331ceebcd8165707c143868deceb98a9dc1b0a82f8ee77620c9a6a92443
5
5
  SHA512:
6
- metadata.gz: 5e0f63eca5bf8e62a5688d38c94f65efb6547e8a71a02f79877b13ab47c18d7af42fe9e94141958e935c4316da3cd6551cdd24fe9577dbb450472d009211a2c7
7
- data.tar.gz: 5ce5c49924cbe72b71973a39b74ff23ddd1427d53ca48ee7bd5e6318e5f145929b9ef1b87493bfd1ab3578dcf71e699e290cefb44adc43179271016cf5ec7298
6
+ metadata.gz: 344a98415e3903abdd735cefe0d3f18674c6ea7483bb40f18a3c7b207d8d15fa4598785dda153c3f6e16a83333f48a44abe5deb34eb68a6638c74fa97f872430
7
+ data.tar.gz: 2effc19f46fa3755b2a4f866a6d40a8de9a1ec4a5f907792d38a221088ad67d7d8cb89f4dcd8c3f9ab34bd2acd1f95851a2bd3bd09ded4027fc92817fec940b1
@@ -1,41 +1,24 @@
1
- name: Paysafe
1
+ name: Tests
2
2
 
3
- on: [push]
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
4
8
 
5
9
  jobs:
6
10
  build:
7
11
  runs-on: ubuntu-latest
8
12
  strategy:
9
13
  matrix:
10
- ruby: [ '2.4', '2.5', '2.6', '2.7' ]
14
+ ruby: [ '2.5', '2.6', '2.7', '3.0' ]
11
15
  name: Ruby ${{ matrix.ruby }}
12
16
  steps:
13
17
  - uses: actions/checkout@v2
14
-
15
- - uses: actions/setup-ruby@v1
18
+ - uses: ruby/setup-ruby@v1
16
19
  with:
17
20
  ruby-version: ${{ matrix.ruby }}
18
-
19
- - uses: actions/cache@v1
20
- with:
21
- path: vendor/bundle
22
- key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
23
- restore-keys: |
24
- ${{ runner.os }}-gems-
25
-
26
- - name: Install rubygems
27
- run: |
28
- gem update --system --no-document
29
-
30
- - name: Install bundler
31
- run: |
32
- gem install bundler --no-document
33
-
34
- - name: Install dependencies
35
- run: |
36
- bundle config path vendor/bundle
37
- bundle install --jobs 4 --retry 3
38
-
21
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
39
22
  - name: Run Tests
40
23
  env:
41
24
  PAYSAFE_ACCOUNT_NUMBER: test
@@ -1,9 +1,11 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
- ## Unreleased
4
+ ## 0.13.0 (2021-01-14)
5
5
 
6
- ...
6
+ * Renamed client `timeouts` option to `timeout`.
7
+ * Requires Ruby 2.5 and up.
8
+ * Added Ruby 3.0 build to CI.
7
9
 
8
10
  ## 0.12.0 (2020-05-14)
9
11
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- paysafe (0.12.0)
4
+ paysafe (0.13.0)
5
5
  http (>= 4, < 5)
6
6
 
7
7
  GEM
@@ -11,12 +11,12 @@ GEM
11
11
  public_suffix (>= 2.0.2, < 5.0)
12
12
  ansi (1.5.0)
13
13
  builder (3.2.4)
14
- crack (0.4.3)
15
- safe_yaml (~> 1.0.0)
14
+ crack (0.4.5)
15
+ rexml
16
16
  domain_name (0.5.20190701)
17
17
  unf (>= 0.0.5, < 1.0.0)
18
- dotenv (2.7.5)
19
- ffi (1.12.2)
18
+ dotenv (2.7.6)
19
+ ffi (1.14.2)
20
20
  ffi-compiler (1.0.1)
21
21
  ffi (>= 1.0.0)
22
22
  rake
@@ -29,24 +29,24 @@ GEM
29
29
  http-cookie (1.0.3)
30
30
  domain_name (~> 0.5)
31
31
  http-form_data (2.3.0)
32
- http-parser (1.2.1)
32
+ http-parser (1.2.3)
33
33
  ffi-compiler (>= 1.0, < 2.0)
34
- minitest (5.14.0)
34
+ minitest (5.14.3)
35
35
  minitest-mock_expectations (1.1.3)
36
36
  minitest-reporters (1.4.2)
37
37
  ansi
38
38
  builder
39
39
  minitest (>= 5.0)
40
40
  ruby-progressbar
41
- public_suffix (4.0.3)
42
- rake (13.0.1)
41
+ public_suffix (4.0.6)
42
+ rake (13.0.3)
43
+ rexml (3.2.4)
43
44
  ruby-progressbar (1.10.1)
44
- safe_yaml (1.0.5)
45
45
  unf (0.1.4)
46
46
  unf_ext
47
47
  unf_ext (0.0.7.7)
48
- vcr (5.1.0)
49
- webmock (3.8.3)
48
+ vcr (6.0.0)
49
+ webmock (3.11.1)
50
50
  addressable (>= 2.3.6)
51
51
  crack (>= 0.3.2)
52
52
  hashdiff (>= 0.4.0, < 2.0.0)
@@ -66,4 +66,4 @@ DEPENDENCIES
66
66
  webmock
67
67
 
68
68
  BUNDLED WITH
69
- 2.0.2
69
+ 2.1.4
data/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # The Paysafe Ruby Gem
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/paysafe.svg)][gem]
3
+ [![Gem Version](https://badge.fury.io/rb/paysafe.svg)](https://badge.fury.io/rb/paysafe)
4
4
  ![Build Status](https://github.com/javierjulio/paysafe/workflows/Paysafe/badge.svg?branch=master)
5
5
 
6
- A well tested Ruby interface to the [Paysafe REST API](paysafe_api_reference) (formerly Optimal Payments). Requires Ruby 2.4 and up. Not all API actions are supported yet. Since the Paysafe API uses camelCase, this gem will handle converting to and from snake_case for you.
6
+ A well tested Ruby interface to the [Paysafe REST API](paysafe_api_reference) (formerly Optimal Payments). Requires Ruby 2.5 and up. Not all API actions are supported yet. Since the Paysafe API uses camelCase, this gem will handle converting to and from snake_case for you.
7
7
 
8
8
  ## Installation
9
9
 
@@ -25,12 +25,14 @@ Create and configure a client with your API authentication.
25
25
 
26
26
  ```ruby
27
27
  client = Paysafe::REST::Client.new(
28
- api_key: 'your api key',
29
- api_secret: 'you api secret',
30
- test_mode: false, # to enable Production requests (default is true)
28
+ api_key: 'your_api_key',
29
+ api_secret: 'your_api_secret',
30
+ test_mode: false, # to enable Production requests, default is `true`
31
31
  account_number: '1234', # used for the Card Payments API
32
- # Provide optional timeouts
33
- # timeouts: { connect: 2, read: 5, write: 10 }
32
+ # Provide optional timeouts in seconds
33
+ # timeout: { connect: 2, read: 5, write: 10 }
34
+ # Or as a global timeout in seconds
35
+ # timeout: 20
34
36
  )
35
37
  ```
36
38
 
@@ -97,5 +99,4 @@ Bug reports and pull requests for missing API support are welcome on GitHub at h
97
99
 
98
100
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
99
101
 
100
- [gem]: https://rubygems.org/gems/paysafe
101
102
  [paysafe_api_reference]: https://developer.paysafe.com/en/api-reference/
@@ -19,8 +19,8 @@ require "paysafe/verification"
19
19
  require "paysafe/authorization"
20
20
  require "paysafe/refinements/camel_case"
21
21
  require "paysafe/refinements/snake_case"
22
- require "paysafe/rest/client"
23
22
  require "paysafe/configuration"
23
+ require "paysafe/rest/client"
24
24
  require "paysafe/api/base_api"
25
25
  require "paysafe/api/card_payments_api"
26
26
  require "paysafe/api/customer_vault_api"
@@ -25,7 +25,7 @@ module Paysafe
25
25
  def http_client
26
26
  HTTP
27
27
  .headers(HEADERS)
28
- .timeout(@config.timeouts ? @config.timeouts : :null)
28
+ .timeout(@config.timeout || :null)
29
29
  .basic_auth(user: @config.api_key, pass: @config.api_secret)
30
30
  end
31
31
 
@@ -4,7 +4,7 @@ module Paysafe
4
4
  API_TEST = 'https://api.test.paysafe.com'
5
5
  API_LIVE = 'https://api.paysafe.com'
6
6
 
7
- attr_reader :account_number, :api_base, :api_key, :api_secret, :test_mode, :timeouts
7
+ attr_reader :account_number, :api_base, :api_key, :api_secret, :test_mode, :timeout
8
8
 
9
9
  def initialize(**options)
10
10
  @test_mode = true
@@ -3,14 +3,14 @@ module Paysafe
3
3
  class Client
4
4
  extend Forwardable
5
5
 
6
- delegate [:account_number, :api_base, :api_key, :api_secret, :test_mode, :timeouts] => :@config
6
+ delegate [:account_number, :api_base, :api_key, :api_secret, :test_mode, :timeout] => :@config
7
7
 
8
8
  # Initializes a new Client object
9
9
  #
10
10
  # @param options [Hash]
11
11
  # @return [Paysafe::REST::Client]
12
12
  def initialize(**options)
13
- @config = Configuration.new(options)
13
+ @config = Configuration.new(**options)
14
14
  end
15
15
 
16
16
  # @return [Hash]
@@ -1,3 +1,3 @@
1
1
  module Paysafe
2
- VERSION = "0.12.0"
2
+ VERSION = "0.13.0"
3
3
  end
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
20
  spec.require_paths = ["lib"]
21
21
 
22
- spec.required_ruby_version = '>= 2.4'
22
+ spec.required_ruby_version = '>= 2.5'
23
23
 
24
24
  spec.add_dependency "http", '>= 4', '< 5'
25
25
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paysafe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Javier Julio
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-14 00:00:00.000000000 Z
11
+ date: 2021-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http
@@ -201,14 +201,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
201
201
  requirements:
202
202
  - - ">="
203
203
  - !ruby/object:Gem::Version
204
- version: '2.4'
204
+ version: '2.5'
205
205
  required_rubygems_version: !ruby/object:Gem::Requirement
206
206
  requirements:
207
207
  - - ">="
208
208
  - !ruby/object:Gem::Version
209
209
  version: '0'
210
210
  requirements: []
211
- rubygems_version: 3.1.3
211
+ rubygems_version: 3.1.4
212
212
  signing_key:
213
213
  specification_version: 4
214
214
  summary: A Ruby interface to the Paysafe REST API.