paytrail-client 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: ad5c0678e7dd0683a726354c82b1e2f5f8b8bc8b
4
- data.tar.gz: 68fab39c6af2dea6b9a6595f785b364649e2f996
3
+ metadata.gz: 7688bc32d7a5c6a3f8bca80fae3c405327e87acd
4
+ data.tar.gz: 00689379a953b8586d5ea6320a4d1dc2628e0a0e
5
5
  SHA512:
6
- metadata.gz: 18bf159b219a3a0fbc8097f3f246570a5a6177f9d742397fb22c114acbf7b03791562049a50cfd082916ecd4d09048ef1393e823249fd7794fc426602c18cc6f
7
- data.tar.gz: 97e91cff52ba11170e8efc62a6cf652a6ad42b30fba357147862f4574287d5407218db17dce8fa8445aeec898dad4f8de28abefe75b6b3e3ba10cf00c3a67b55
6
+ metadata.gz: 00fbc52510278ec6b7c41946cf9c518107353842de34e3507bb75270ea022e8a51ba4240263490beccfe68b027195d8a04bda316350693219bde666973029940
7
+ data.tar.gz: 9238f38bf982032418ee160a8b6716c71fdb112986840957815af41b986b427b7cc4ac369b3fcdd7ac28184be06216cb527e5ee0558e904e0648fd2d0fca1a1b
data/Gemfile CHANGED
@@ -1,4 +1,3 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in paytrail-client.gemspec
4
3
  gemspec
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # paytrail-client
2
2
 
3
- [![Build Status](https://travis-ci.org/anakinj/paytrail-client.svg?branch=master)](https://travis-ci.org/anakinj/paytrail-client)
3
+ [![Build Status](https://travis-ci.org/anakinj/paytrail-client.svg?branch=master)](https://travis-ci.org/anakinj/paytrail-client) [![Code Climate](https://codeclimate.com/github/anakinj/paytrail-client/badges/gpa.svg)](https://codeclimate.com/github/anakinj/paytrail-client) [![Test Coverage](https://codeclimate.com/github/anakinj/paytrail-client/badges/coverage.svg)](https://codeclimate.com/github/anakinj/paytrail-client/coverage) [![Gem Version](https://badge.fury.io/rb/paytrail-client.svg)](https://badge.fury.io/rb/paytrail-client)
4
+
5
+ Paytrail client for the Paytrail API. Please refer to the [Paytrail documentation](http://docs.paytrail.com/) for more information.
4
6
 
5
7
  ## Installation
6
8
 
@@ -10,15 +12,33 @@ Add this line to your application's Gemfile:
10
12
  gem 'paytrail-client'
11
13
  ```
12
14
 
13
- And then execute:
14
-
15
- $ bundle
16
-
17
- Or install it yourself as:
15
+ ## Usage
18
16
 
19
- $ gem install paytrail-client
17
+ ```ruby
18
+ require 'paytrail-client'
19
+
20
+ # Configure the client with your merchant credentials
21
+ PaytrailClient.configure do |config|
22
+ config.merchant_id = 12345
23
+ config.merchant_secret = 'your_merchant_secret'
24
+ end
25
+
26
+ # Call Paytrail API for a payment token.
27
+ # The client supports passing the object keys as snake_case or camelCase.
28
+ token = PaytrailClient::Payment.create(order_number: '1234',
29
+ currency: 'EUR',
30
+ locale: 'en_US',
31
+ url_set: {
32
+ success: 'http://www.example.org/success',
33
+ failure: 'http://www.example.org/failure',
34
+ notification: 'http://www.example.org/notification'
35
+ },
36
+ price: 100.50)
37
+
38
+ # Redirect to received url
39
+ redirect_to(token['url'])
20
40
 
21
- ## Usage
41
+ ```
22
42
 
23
43
  ## Contributing
24
44
 
@@ -1,3 +1,3 @@
1
1
  module PaytrailClient
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
@@ -10,14 +10,15 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ['antmanj@gmail.com']
11
11
 
12
12
  spec.summary = 'Simple paytrail client'
13
- spec.description = 'Client for querying the Paytrail REST API'
14
- spec.homepage = 'https://github.com/antmanj/paytrail-client'
13
+ spec.description = 'Client for consuming the Paytrail API'
14
+ spec.homepage = 'https://github.com/anakinj/paytrail-client'
15
15
  spec.license = 'MIT'
16
16
 
17
17
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
- spec.bindir = 'exe'
19
18
  spec.require_paths = ['lib']
20
19
 
20
+ spec.required_ruby_version = '>= 1.9'
21
+
21
22
  spec.add_runtime_dependency 'rest-client', '~> 1.8'
22
23
 
23
24
  spec.add_development_dependency 'bundler', '~> 1.10'
@@ -27,4 +28,5 @@ Gem::Specification.new do |spec|
27
28
  spec.add_development_dependency 'vcr', '~> 3.0'
28
29
  spec.add_development_dependency 'rspec', '~> 3.4'
29
30
  spec.add_development_dependency 'simplecov', '~> 0.11'
31
+ spec.add_development_dependency 'codeclimate-test-reporter', '~> 0.3.0'
30
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paytrail-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joakim Antman
8
8
  autorequire:
9
- bindir: exe
9
+ bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-08 00:00:00.000000000 Z
11
+ date: 2016-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client
@@ -122,7 +122,21 @@ dependencies:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0.11'
125
- description: Client for querying the Paytrail REST API
125
+ - !ruby/object:Gem::Dependency
126
+ name: codeclimate-test-reporter
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: 0.3.0
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: 0.3.0
139
+ description: Client for consuming the Paytrail API
126
140
  email:
127
141
  - antmanj@gmail.com
128
142
  executables: []
@@ -144,7 +158,7 @@ files:
144
158
  - lib/paytrail_client/request.rb
145
159
  - lib/paytrail_client/version.rb
146
160
  - paytrail-client.gemspec
147
- homepage: https://github.com/antmanj/paytrail-client
161
+ homepage: https://github.com/anakinj/paytrail-client
148
162
  licenses:
149
163
  - MIT
150
164
  metadata: {}
@@ -156,7 +170,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
156
170
  requirements:
157
171
  - - ">="
158
172
  - !ruby/object:Gem::Version
159
- version: '0'
173
+ version: '1.9'
160
174
  required_rubygems_version: !ruby/object:Gem::Requirement
161
175
  requirements:
162
176
  - - ">="