paypro 0.0.1 → 2.0.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.
Files changed (67) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/build.yml +54 -0
  3. data/.gitignore +8 -44
  4. data/.rspec +3 -0
  5. data/.rubocop.yml +36 -17
  6. data/Gemfile +14 -2
  7. data/LICENSE +1 -1
  8. data/README.md +77 -15
  9. data/Rakefile +7 -1
  10. data/bin/console +8 -0
  11. data/bin/setup +8 -0
  12. data/lib/data/{ca-bundle.crt → cacert.pem} +1724 -2013
  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/pay_pro/version.rb +5 -0
  55. data/lib/pay_pro.rb +77 -0
  56. data/paypro.gemspec +20 -11
  57. metadata +69 -45
  58. data/.circleci/config.yml +0 -54
  59. data/VERSION +0 -1
  60. data/examples/create_payment.rb +0 -5
  61. data/lib/paypro/client.rb +0 -66
  62. data/lib/paypro/errors.rb +0 -4
  63. data/lib/paypro/version.rb +0 -3
  64. data/lib/paypro.rb +0 -14
  65. data/spec/paypro/client_spec.rb +0 -112
  66. data/spec/paypro_spec.rb +0 -11
  67. data/spec/spec_helper.rb +0 -5
@@ -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
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module PayPro
4
+ VERSION = '2.0.0'
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,21 +1,30 @@
1
- require File.expand_path('../lib/paypro/version', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ require File.expand_path('lib/pay_pro/version', __dir__)
2
4
 
3
5
  Gem::Specification.new do |s|
4
6
  s.name = 'paypro'
5
7
  s.version = PayPro::VERSION
6
- s.license = 'MIT'
7
- s.homepage = 'https://github.com/paypronl/paypro-ruby-v1'
8
8
  s.author = 'PayPro'
9
- s.email = 'support@paypro.nl'
10
- 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')
11
16
 
12
- s.required_ruby_version = '>= 2.0.0'
13
- s.add_dependency 'faraday', '~> 0.13'
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'
14
20
 
15
- 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
16
26
 
17
- s.files = `git ls-files`.split("\n")
18
- s.test_files = Dir.glob('spec/**/*_spec.rb')
27
+ s.add_dependency 'faraday', '>= 1.10'
19
28
 
20
- s.require_path = 'lib'
29
+ s.require_paths = ['lib']
21
30
  end
metadata CHANGED
@@ -1,72 +1,99 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paypro
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
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: 2017-08-29 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
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0.13'
19
+ version: '1.10'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '0.13'
27
- - !ruby/object:Gem::Dependency
28
- name: rspec
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - "~>"
32
- - !ruby/object:Gem::Version
33
- version: '3.6'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - "~>"
39
- - !ruby/object:Gem::Version
40
- version: '3.6'
41
- description:
42
- email: support@paypro.nl
26
+ version: '1.10'
27
+ description: Online payments for entrepreneurs that want maximum growth
28
+ email:
29
+ - support@paypro.nl
43
30
  executables: []
44
31
  extensions: []
45
32
  extra_rdoc_files: []
46
33
  files:
47
- - ".circleci/config.yml"
34
+ - ".github/workflows/build.yml"
48
35
  - ".gitignore"
36
+ - ".rspec"
49
37
  - ".rubocop.yml"
50
38
  - Gemfile
51
39
  - LICENSE
52
40
  - README.md
53
41
  - Rakefile
54
- - VERSION
55
- - examples/create_payment.rb
56
- - lib/data/ca-bundle.crt
57
- - lib/paypro.rb
58
- - lib/paypro/client.rb
59
- - lib/paypro/errors.rb
60
- - 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
61
88
  - paypro.gemspec
62
- - spec/paypro/client_spec.rb
63
- - spec/paypro_spec.rb
64
- - spec/spec_helper.rb
65
- homepage: https://github.com/paypronl/paypro-ruby-v1
89
+ homepage: https://www.paypro.nl
66
90
  licenses:
67
91
  - MIT
68
- metadata: {}
69
- 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:
70
97
  rdoc_options: []
71
98
  require_paths:
72
99
  - lib
@@ -74,18 +101,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
74
101
  requirements:
75
102
  - - ">="
76
103
  - !ruby/object:Gem::Version
77
- version: 2.0.0
104
+ version: 3.0.0
78
105
  required_rubygems_version: !ruby/object:Gem::Requirement
79
106
  requirements:
80
107
  - - ">="
81
108
  - !ruby/object:Gem::Version
82
109
  version: '0'
83
110
  requirements: []
84
- rubyforge_project:
85
- rubygems_version: 2.5.2
86
- signing_key:
111
+ rubygems_version: 3.2.33
112
+ signing_key:
87
113
  specification_version: 4
88
- summary: Ruby client for PayPro API v1
89
- test_files:
90
- - spec/paypro/client_spec.rb
91
- - spec/paypro_spec.rb
114
+ summary: Ruby library for the PayPro API
115
+ test_files: []
data/.circleci/config.yml DELETED
@@ -1,54 +0,0 @@
1
- defaults: &defaults
2
- working_directory: ~/repo
3
-
4
- steps:
5
- - checkout
6
-
7
- - run:
8
- name: install dependencies
9
- command: |
10
- bundle install --jobs=4 --retry=3 --path vendor/bundle
11
-
12
- - run:
13
- name: run rubocop
14
- command: bundle exec rubocop
15
-
16
- - run:
17
- name: run tests
18
- command: |
19
- mkdir /tmp/test-results
20
- bundle exec rspec --format progress \
21
- --format RspecJunitFormatter \
22
- --out /tmp/test-results/rspec.xml \
23
- --format progress
24
-
25
- - store_test_results:
26
- path: /tmp/test-results
27
- - store_artifacts:
28
- path: /tmp/test-results
29
- destination: test-results
30
-
31
- version: 2
32
- jobs:
33
- build-ruby-2.4.1:
34
- <<: *defaults
35
- docker:
36
- - image: circleci/ruby:2.4.1
37
-
38
- build-ruby-2.3.3:
39
- <<: *defaults
40
- docker:
41
- - image: circleci/ruby:2.3.3
42
-
43
- build-ruby-2.2.7:
44
- <<: *defaults
45
- docker:
46
- - image: circleci/ruby:2.2.7
47
-
48
- workflows:
49
- version: 2
50
- build:
51
- jobs:
52
- - build-ruby-2.4.1
53
- - build-ruby-2.3.3
54
- - build-ruby-2.2.7
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.0.1
@@ -1,5 +0,0 @@
1
- require 'paypro'
2
-
3
- client = PayPro::Client.new('b507a4d8ea7911f0d955383852990df3')
4
- client.command = 'get_all_pay_methods'
5
- client.execute