paypro 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/build.yml +54 -0
  3. data/.gitignore +8 -47
  4. data/.rspec +3 -0
  5. data/.rubocop.yml +37 -15
  6. data/Gemfile +12 -2
  7. data/LICENSE +1 -1
  8. data/README.md +65 -23
  9. data/Rakefile +5 -1
  10. data/bin/console +8 -0
  11. data/bin/setup +8 -0
  12. data/lib/data/{ca-bundle.crt → cacert.pem} +617 -298
  13. data/lib/pay_pro/api_client.rb +131 -0
  14. data/lib/pay_pro/client.rb +67 -0
  15. data/lib/pay_pro/config.rb +30 -0
  16. data/lib/pay_pro/endpoint.rb +19 -0
  17. data/lib/pay_pro/endpoints/chargebacks.rb +14 -0
  18. data/lib/pay_pro/endpoints/customers.rb +15 -0
  19. data/lib/pay_pro/endpoints/events.rb +14 -0
  20. data/lib/pay_pro/endpoints/installment_plan_periods.rb +13 -0
  21. data/lib/pay_pro/endpoints/installment_plans.rb +15 -0
  22. data/lib/pay_pro/endpoints/mandates.rb +15 -0
  23. data/lib/pay_pro/endpoints/pay_methods.rb +13 -0
  24. data/lib/pay_pro/endpoints/payments.rb +15 -0
  25. data/lib/pay_pro/endpoints/refunds.rb +14 -0
  26. data/lib/pay_pro/endpoints/subscription_periods.rb +13 -0
  27. data/lib/pay_pro/endpoints/subscriptions.rb +15 -0
  28. data/lib/pay_pro/endpoints/webhooks.rb +15 -0
  29. data/lib/pay_pro/entities/chargeback.rb +5 -0
  30. data/lib/pay_pro/entities/customer.rb +10 -0
  31. data/lib/pay_pro/entities/entity.rb +41 -0
  32. data/lib/pay_pro/entities/event.rb +5 -0
  33. data/lib/pay_pro/entities/installment_plan.rb +29 -0
  34. data/lib/pay_pro/entities/installment_plan_period.rb +5 -0
  35. data/lib/pay_pro/entities/list.rb +65 -0
  36. data/lib/pay_pro/entities/mandate.rb +5 -0
  37. data/lib/pay_pro/entities/pay_method.rb +6 -0
  38. data/lib/pay_pro/entities/payment.rb +23 -0
  39. data/lib/pay_pro/entities/refund.rb +11 -0
  40. data/lib/pay_pro/entities/resource.rb +13 -0
  41. data/lib/pay_pro/entities/subscription.rb +38 -0
  42. data/lib/pay_pro/entities/subscription_period.rb +5 -0
  43. data/lib/pay_pro/entities/webhook.rb +30 -0
  44. data/lib/pay_pro/errors.rb +36 -0
  45. data/lib/pay_pro/operations/creatable.rb +11 -0
  46. data/lib/pay_pro/operations/deletable.rb +11 -0
  47. data/lib/pay_pro/operations/getable.rb +11 -0
  48. data/lib/pay_pro/operations/listable.rb +11 -0
  49. data/lib/pay_pro/operations/requestable.rb +12 -0
  50. data/lib/pay_pro/operations/updatable.rb +11 -0
  51. data/lib/pay_pro/response.rb +21 -0
  52. data/lib/pay_pro/signature.rb +59 -0
  53. data/lib/pay_pro/util.rb +48 -0
  54. data/lib/{paypro → pay_pro}/version.rb +1 -1
  55. data/lib/pay_pro.rb +77 -0
  56. data/paypro.gemspec +18 -11
  57. metadata +67 -48
  58. data/.circleci/config.yml +0 -74
  59. data/VERSION +0 -1
  60. data/examples/create_payment.rb +0 -7
  61. data/lib/paypro/client.rb +0 -68
  62. data/lib/paypro/errors.rb +0 -7
  63. data/lib/paypro.rb +0 -16
  64. data/spec/paypro/client_spec.rb +0 -114
  65. data/spec/paypro_spec.rb +0 -13
  66. data/spec/spec_helper.rb +0 -7
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PayPro
4
+ class Subscription < Resource
5
+ include PayPro::Operations::Updatable
6
+
7
+ RESOURCE_PATH = 'subscriptions'
8
+
9
+ def cancel(**options)
10
+ api_request(method: 'delete', uri: resource_url, options: options)
11
+ end
12
+
13
+ def pause(**options)
14
+ api_request(method: 'post', uri: "#{resource_url}/pause", options: options)
15
+ end
16
+
17
+ def resume(**options)
18
+ api_request(method: 'post', uri: "#{resource_url}/resume", options: options)
19
+ end
20
+
21
+ def subscription_periods(**options)
22
+ api_request(
23
+ method: 'get',
24
+ uri: "#{resource_url}/subscription_periods",
25
+ options: options
26
+ )
27
+ end
28
+
29
+ def create_subscription_period(body = {}, **options)
30
+ api_request(
31
+ method: 'post',
32
+ uri: "#{resource_url}/subscription_periods",
33
+ body: body.to_json,
34
+ options: options
35
+ )
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PayPro
4
+ class SubscriptionPeriod < Entity; end
5
+ end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PayPro
4
+ class Webhook < Resource
5
+ include PayPro::Operations::Deletable
6
+ include PayPro::Operations::Updatable
7
+
8
+ RESOURCE_PATH = 'webhooks'
9
+
10
+ def self.create_event(
11
+ payload:,
12
+ signature:,
13
+ secret:,
14
+ timestamp:,
15
+ tolerance: PayPro::Signature::DEFAULT_TOLERANCE
16
+ )
17
+ signature_verifier = PayPro::Signature.new(
18
+ payload: payload,
19
+ timestamp: Time.at(timestamp),
20
+ secret: secret,
21
+ tolerance: tolerance
22
+ )
23
+
24
+ return unless signature_verifier.verify(signature: signature)
25
+
26
+ data = JSON.parse(payload)
27
+ PayPro::Event.create_from_data(data, api_client: nil)
28
+ end
29
+ end
30
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PayPro
4
+ class Error < StandardError
5
+ def initialize(
6
+ message: nil,
7
+ http_status: nil,
8
+ http_body: nil,
9
+ http_headers: nil,
10
+ code: nil
11
+ )
12
+ @message = message
13
+ @http_status = http_status
14
+ @http_body = http_body
15
+ @http_headers = http_headers
16
+ @code = code
17
+
18
+ super(@message)
19
+ end
20
+ end
21
+
22
+ class ConfigurationError < Error; end
23
+ class ConnectionError < Error; end
24
+ class AuthenticationError < Error; end
25
+ class ResourceNotFoundError < Error; end
26
+ class SignatureVerificationError < Error; end
27
+
28
+ class ValidationError < Error
29
+ def initialize(param:, **kwargs)
30
+ @param = param
31
+ kwargs[:message] = "#{kwargs[:message]}, with param: \"#{@param}\""
32
+
33
+ super(**kwargs)
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PayPro
4
+ module Operations
5
+ module Creatable
6
+ def create(body = {}, **options)
7
+ api_request(method: 'post', uri: resource_url, body: body.to_json, options: options)
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PayPro
4
+ module Operations
5
+ module Deletable
6
+ def delete(**options)
7
+ api_request(method: 'delete', uri: resource_url, options: options)
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PayPro
4
+ module Operations
5
+ module Getable
6
+ def get(id, **options)
7
+ api_request(method: 'get', uri: "#{resource_url}/#{CGI.escape(id)}", options: options)
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PayPro
4
+ module Operations
5
+ module Listable
6
+ def list(params = {}, **options)
7
+ api_request(method: 'get', uri: resource_url, params: params, options: options)
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PayPro
4
+ module Operations
5
+ module Requestable
6
+ def api_request(method:, uri:, params: {}, body: nil, options: {})
7
+ response = api_client.request(method: method, uri: uri, params: params, body: body, options: options)
8
+ Util.to_entity(response.data, params: params, api_client: api_client)
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PayPro
4
+ module Operations
5
+ module Updatable
6
+ def update(body = {}, **options)
7
+ api_request(method: 'patch', uri: resource_url, body: body.to_json, options: options)
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PayPro
4
+ class Response
5
+ attr_accessor :request_id,
6
+ :data,
7
+ :raw_body,
8
+ :status
9
+
10
+ def self.from_response(response_object)
11
+ response = new
12
+
13
+ response.data = JSON.parse(response_object.body)
14
+ response.raw_body = response_object.body
15
+ response.status = response_object.status
16
+ response.request_id = response_object.headers['x-request-id']
17
+
18
+ response
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,59 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PayPro
4
+ class Signature
5
+ # Default timestamp tolerance is 10 minutes
6
+ DEFAULT_TOLERANCE = 600
7
+
8
+ def initialize(
9
+ payload:,
10
+ timestamp:,
11
+ secret:,
12
+ tolerance: DEFAULT_TOLERANCE
13
+ )
14
+ raise ArgumentError, 'timestamp must be an instance of Time' unless timestamp.is_a?(Time)
15
+ raise ArgumentError, 'payload must be a String' unless payload.is_a?(String)
16
+ raise ArgumentError, 'secret must be a String' unless secret.is_a?(String)
17
+ raise ArgumentError, 'tolerance must be an Integer' unless tolerance.is_a?(Integer)
18
+
19
+ @payload = payload
20
+ @timestamp = timestamp.utc
21
+ @secret = secret
22
+ @tolerance = tolerance
23
+ end
24
+
25
+ def generate_signature
26
+ OpenSSL::HMAC.hexdigest(
27
+ OpenSSL::Digest.new('sha256'),
28
+ @secret,
29
+ signature_string
30
+ )
31
+ end
32
+
33
+ def verify(signature:)
34
+ unless OpenSSL.secure_compare(signature, generate_signature)
35
+ raise SignatureVerificationError.new(
36
+ message: 'Signature does not match',
37
+ http_body: @payload
38
+ )
39
+ end
40
+
41
+ if @timestamp < Time.now.utc - @tolerance
42
+ formatted_timestamp = @timestamp.strftime('%F %T')
43
+
44
+ raise SignatureVerificationError.new(
45
+ message: "Timestamp is outside the tolerance zone: #{formatted_timestamp}",
46
+ http_body: @payload
47
+ )
48
+ end
49
+
50
+ true
51
+ end
52
+
53
+ private
54
+
55
+ def signature_string
56
+ "#{@timestamp.to_i}.#{@payload}"
57
+ end
58
+ end
59
+ end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PayPro
4
+ class Util
5
+ class << self
6
+ # Searches the entities folder for a valid entity class based on a string. This string will
7
+ # be returned in the API as the 'type' parameter.
8
+ #
9
+ # If the class cannot be found it will fallback to the base class Entity.
10
+ def entity_class(string)
11
+ parts = string.split('_')
12
+ class_name = parts.map { |part| part.downcase.capitalize }.join
13
+ PayPro.const_get(class_name, false)
14
+ rescue NameError
15
+ Entity
16
+ end
17
+
18
+ def normalize_api_attributes(attributes)
19
+ new_attributes = attributes.dup
20
+
21
+ new_attributes.delete('type')
22
+ new_attributes['links'] = new_attributes.delete('_links') if new_attributes['_links']
23
+ new_attributes
24
+ end
25
+
26
+ # Creates an Enity class or returns the data if the data cannot be converted to an entity.
27
+ #
28
+ # It will try to find an API entity class, if it cannot be found it will fallback to the
29
+ # default Entity class.
30
+ def to_entity(data, api_client:, params: {})
31
+ case data
32
+ when Array
33
+ data.map { |i| to_entity(i, api_client: api_client) }
34
+ when Hash
35
+ if data.key?('type')
36
+ entity = entity_class(data['type']).create_from_data(data, api_client: api_client)
37
+ entity.filters = params if entity.is_a?(PayPro::List)
38
+ entity
39
+ else
40
+ data.transform_values { |value| to_entity(value, api_client: api_client) }
41
+ end
42
+ else
43
+ data
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PayPro
4
- VERSION = '1.0.0'
4
+ VERSION = '2.0.0'
5
5
  end
data/lib/pay_pro.rb ADDED
@@ -0,0 +1,77 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'pay_pro/version'
4
+
5
+ require 'cgi'
6
+ require 'faraday'
7
+ require 'json'
8
+ require 'uri'
9
+ require 'openssl'
10
+
11
+ require 'pay_pro/api_client'
12
+ require 'pay_pro/client'
13
+ require 'pay_pro/config'
14
+ require 'pay_pro/errors'
15
+ require 'pay_pro/response'
16
+ require 'pay_pro/signature'
17
+ require 'pay_pro/util'
18
+
19
+ require 'pay_pro/operations/creatable'
20
+ require 'pay_pro/operations/deletable'
21
+ require 'pay_pro/operations/getable'
22
+ require 'pay_pro/operations/listable'
23
+ require 'pay_pro/operations/requestable'
24
+ require 'pay_pro/operations/updatable'
25
+
26
+ require 'pay_pro/endpoint'
27
+
28
+ require 'pay_pro/endpoints/chargebacks'
29
+ require 'pay_pro/endpoints/customers'
30
+ require 'pay_pro/endpoints/events'
31
+ require 'pay_pro/endpoints/installment_plan_periods'
32
+ require 'pay_pro/endpoints/installment_plans'
33
+ require 'pay_pro/endpoints/mandates'
34
+ require 'pay_pro/endpoints/pay_methods'
35
+ require 'pay_pro/endpoints/payments'
36
+ require 'pay_pro/endpoints/refunds'
37
+ require 'pay_pro/endpoints/subscription_periods'
38
+ require 'pay_pro/endpoints/subscriptions'
39
+ require 'pay_pro/endpoints/webhooks'
40
+
41
+ require 'pay_pro/entities/entity'
42
+ require 'pay_pro/entities/resource'
43
+
44
+ require 'pay_pro/entities/chargeback'
45
+ require 'pay_pro/entities/customer'
46
+ require 'pay_pro/entities/event'
47
+ require 'pay_pro/entities/installment_plan'
48
+ require 'pay_pro/entities/installment_plan_period'
49
+ require 'pay_pro/entities/list'
50
+ require 'pay_pro/entities/mandate'
51
+ require 'pay_pro/entities/pay_method'
52
+ require 'pay_pro/entities/payment'
53
+ require 'pay_pro/entities/refund'
54
+ require 'pay_pro/entities/subscription'
55
+ require 'pay_pro/entities/subscription_period'
56
+ require 'pay_pro/entities/webhook'
57
+
58
+ module PayPro
59
+ API_URL = 'https://api.paypro.nl'
60
+
61
+ class << self
62
+ def config
63
+ @config ||= Config.new
64
+ end
65
+
66
+ def configure
67
+ yield(config)
68
+ end
69
+
70
+ # Shortcut method to directly set the API key
71
+ def api_key=(api_key)
72
+ configure do |config|
73
+ config.api_key = api_key
74
+ end
75
+ end
76
+ end
77
+ end
data/paypro.gemspec CHANGED
@@ -1,23 +1,30 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require File.expand_path('lib/paypro/version', __dir__)
3
+ require File.expand_path('lib/pay_pro/version', __dir__)
4
4
 
5
5
  Gem::Specification.new do |s|
6
6
  s.name = 'paypro'
7
7
  s.version = PayPro::VERSION
8
- s.license = 'MIT'
9
- s.homepage = 'https://github.com/paypronl/paypro-ruby-v1'
10
8
  s.author = 'PayPro'
11
- s.email = 'support@paypro.nl'
12
- s.summary = 'Ruby client for PayPro API v1'
9
+ s.email = ['support@paypro.nl']
10
+
11
+ s.summary = 'Ruby library for the PayPro API'
12
+ s.description = 'Online payments for entrepreneurs that want maximum growth'
13
+ s.homepage = 'https://www.paypro.nl'
14
+ s.license = 'MIT'
15
+ s.required_ruby_version = Gem::Requirement.new('>= 3.0.0')
13
16
 
14
- s.required_ruby_version = '>= 2.4.0'
15
- s.add_dependency 'faraday', '>= 0.13', '< 2'
17
+ s.metadata['homepage_uri'] = s.homepage
18
+ s.metadata['source_code_uri'] = 'https://github.com/paypronl/paypro-ruby'
19
+ s.metadata['rubygems_mfa_required'] = 'true'
16
20
 
17
- s.add_development_dependency 'rspec', '~> 3.6'
21
+ # Specify which files should be added to the gem when it is released.
22
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
23
+ s.files = Dir.chdir(File.expand_path(__dir__)) do
24
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
25
+ end
18
26
 
19
- s.files = `git ls-files`.split("\n")
20
- s.test_files = Dir.glob('spec/**/*_spec.rb')
27
+ s.add_dependency 'faraday', '>= 1.10'
21
28
 
22
- s.require_path = 'lib'
29
+ s.require_paths = ['lib']
23
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paypro
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - PayPro
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-05 00:00:00.000000000 Z
11
+ date: 2024-10-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -16,63 +16,84 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.13'
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '2'
19
+ version: '1.10'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - ">="
28
25
  - !ruby/object:Gem::Version
29
- version: '0.13'
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '2'
33
- - !ruby/object:Gem::Dependency
34
- name: rspec
35
- requirement: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: '3.6'
40
- type: :development
41
- prerelease: false
42
- version_requirements: !ruby/object:Gem::Requirement
43
- requirements:
44
- - - "~>"
45
- - !ruby/object:Gem::Version
46
- version: '3.6'
47
- description:
48
- email: support@paypro.nl
26
+ version: '1.10'
27
+ description: Online payments for entrepreneurs that want maximum growth
28
+ email:
29
+ - support@paypro.nl
49
30
  executables: []
50
31
  extensions: []
51
32
  extra_rdoc_files: []
52
33
  files:
53
- - ".circleci/config.yml"
34
+ - ".github/workflows/build.yml"
54
35
  - ".gitignore"
36
+ - ".rspec"
55
37
  - ".rubocop.yml"
56
38
  - Gemfile
57
39
  - LICENSE
58
40
  - README.md
59
41
  - Rakefile
60
- - VERSION
61
- - examples/create_payment.rb
62
- - lib/data/ca-bundle.crt
63
- - lib/paypro.rb
64
- - lib/paypro/client.rb
65
- - lib/paypro/errors.rb
66
- - lib/paypro/version.rb
42
+ - bin/console
43
+ - bin/setup
44
+ - lib/data/cacert.pem
45
+ - lib/pay_pro.rb
46
+ - lib/pay_pro/api_client.rb
47
+ - lib/pay_pro/client.rb
48
+ - lib/pay_pro/config.rb
49
+ - lib/pay_pro/endpoint.rb
50
+ - lib/pay_pro/endpoints/chargebacks.rb
51
+ - lib/pay_pro/endpoints/customers.rb
52
+ - lib/pay_pro/endpoints/events.rb
53
+ - lib/pay_pro/endpoints/installment_plan_periods.rb
54
+ - lib/pay_pro/endpoints/installment_plans.rb
55
+ - lib/pay_pro/endpoints/mandates.rb
56
+ - lib/pay_pro/endpoints/pay_methods.rb
57
+ - lib/pay_pro/endpoints/payments.rb
58
+ - lib/pay_pro/endpoints/refunds.rb
59
+ - lib/pay_pro/endpoints/subscription_periods.rb
60
+ - lib/pay_pro/endpoints/subscriptions.rb
61
+ - lib/pay_pro/endpoints/webhooks.rb
62
+ - lib/pay_pro/entities/chargeback.rb
63
+ - lib/pay_pro/entities/customer.rb
64
+ - lib/pay_pro/entities/entity.rb
65
+ - lib/pay_pro/entities/event.rb
66
+ - lib/pay_pro/entities/installment_plan.rb
67
+ - lib/pay_pro/entities/installment_plan_period.rb
68
+ - lib/pay_pro/entities/list.rb
69
+ - lib/pay_pro/entities/mandate.rb
70
+ - lib/pay_pro/entities/pay_method.rb
71
+ - lib/pay_pro/entities/payment.rb
72
+ - lib/pay_pro/entities/refund.rb
73
+ - lib/pay_pro/entities/resource.rb
74
+ - lib/pay_pro/entities/subscription.rb
75
+ - lib/pay_pro/entities/subscription_period.rb
76
+ - lib/pay_pro/entities/webhook.rb
77
+ - lib/pay_pro/errors.rb
78
+ - lib/pay_pro/operations/creatable.rb
79
+ - lib/pay_pro/operations/deletable.rb
80
+ - lib/pay_pro/operations/getable.rb
81
+ - lib/pay_pro/operations/listable.rb
82
+ - lib/pay_pro/operations/requestable.rb
83
+ - lib/pay_pro/operations/updatable.rb
84
+ - lib/pay_pro/response.rb
85
+ - lib/pay_pro/signature.rb
86
+ - lib/pay_pro/util.rb
87
+ - lib/pay_pro/version.rb
67
88
  - paypro.gemspec
68
- - spec/paypro/client_spec.rb
69
- - spec/paypro_spec.rb
70
- - spec/spec_helper.rb
71
- homepage: https://github.com/paypronl/paypro-ruby-v1
89
+ homepage: https://www.paypro.nl
72
90
  licenses:
73
91
  - MIT
74
- metadata: {}
75
- post_install_message:
92
+ metadata:
93
+ homepage_uri: https://www.paypro.nl
94
+ source_code_uri: https://github.com/paypronl/paypro-ruby
95
+ rubygems_mfa_required: 'true'
96
+ post_install_message:
76
97
  rdoc_options: []
77
98
  require_paths:
78
99
  - lib
@@ -80,17 +101,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
80
101
  requirements:
81
102
  - - ">="
82
103
  - !ruby/object:Gem::Version
83
- version: 2.4.0
104
+ version: 3.0.0
84
105
  required_rubygems_version: !ruby/object:Gem::Requirement
85
106
  requirements:
86
107
  - - ">="
87
108
  - !ruby/object:Gem::Version
88
109
  version: '0'
89
110
  requirements: []
90
- rubygems_version: 3.1.6
91
- signing_key:
111
+ rubygems_version: 3.2.33
112
+ signing_key:
92
113
  specification_version: 4
93
- summary: Ruby client for PayPro API v1
94
- test_files:
95
- - spec/paypro/client_spec.rb
96
- - spec/paypro_spec.rb
114
+ summary: Ruby library for the PayPro API
115
+ test_files: []
data/.circleci/config.yml DELETED
@@ -1,74 +0,0 @@
1
- defaults: &defaults
2
- working_directory: ~/repo
3
-
4
- resource_class: small
5
-
6
- steps:
7
- - checkout
8
-
9
- - run:
10
- name: install dependencies
11
- command: |
12
- bundle install --jobs=4 --retry=3 --path vendor/bundle
13
-
14
- - run:
15
- name: run rubocop
16
- command: bundle exec rubocop
17
-
18
- - run:
19
- name: run tests
20
- command: |
21
- mkdir /tmp/test-results
22
- bundle exec rspec --format progress \
23
- --format RspecJunitFormatter \
24
- --out /tmp/test-results/rspec.xml \
25
- --format progress
26
-
27
- - store_test_results:
28
- path: /tmp/test-results
29
- - store_artifacts:
30
- path: /tmp/test-results
31
- destination: test-results
32
-
33
- version: 2.1
34
- jobs:
35
- build-ruby-3_1_2:
36
- <<: *defaults
37
- docker:
38
- - image: cimg/ruby:3.1.2
39
-
40
- build-ruby-3_0_4:
41
- <<: *defaults
42
- docker:
43
- - image: cimg/ruby:3.0.4
44
-
45
- build-ruby-2_7_6:
46
- <<: *defaults
47
- docker:
48
- - image: cimg/ruby:2.7.6
49
-
50
- build-ruby-2_6_10:
51
- <<: *defaults
52
- docker:
53
- - image: cimg/ruby:2.6.10
54
-
55
- build-ruby-2_5_9:
56
- <<: *defaults
57
- docker:
58
- - image: cimg/ruby:2.5.9
59
-
60
- build-ruby-2_4_10:
61
- <<: *defaults
62
- docker:
63
- - image: cimg/ruby:2.4.10
64
-
65
- workflows:
66
- version: 2
67
- build:
68
- jobs:
69
- - build-ruby-3_1_2
70
- - build-ruby-3_0_4
71
- - build-ruby-2_7_6
72
- - build-ruby-2_6_10
73
- - build-ruby-2_5_9
74
- - build-ruby-2_4_10
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 1.0.0