securionpay 0.3.0 → 1.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.
data/.ruby-version DELETED
@@ -1 +0,0 @@
1
- 2.2.4
data/.travis.yml DELETED
@@ -1,9 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.2.5
4
- - 2.3.1
5
- before_install: gem install bundler -v 1.11.2
6
- script: "bundle exec rake test"
7
- addons:
8
- code_climate:
9
- repo_token: 9e10e5375f827b391dd6360f98a949ff799ecfa0f0ab730ba590193116953842
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in securionpay-ruby.gemspec
4
- gemspec
data/README.md DELETED
@@ -1,113 +0,0 @@
1
- # SecurionPay ruby gem
2
-
3
- [![Build Status](https://travis-ci.org/gwilczynski/securionpay-ruby.svg?branch=master)](https://travis-ci.org/gwilczynski/securionpay-ruby)
4
- [![Code Climate](https://codeclimate.com/github/gwilczynski/securionpay-ruby/badges/gpa.svg)](https://codeclimate.com/github/gwilczynski/securionpay-ruby)
5
- [![Test Coverage](https://codeclimate.com/github/gwilczynski/securionpay-ruby/badges/coverage.svg)](https://codeclimate.com/github/gwilczynski/securionpay-ruby/coverage)
6
- [![Issue Count](https://codeclimate.com/github/gwilczynski/securionpay-ruby/badges/issue_count.svg)](https://codeclimate.com/github/gwilczynski/securionpay-ruby)
7
- [![Dependency Status](https://gemnasium.com/badges/github.com/gwilczynski/securionpay-ruby.svg)](https://gemnasium.com/github.com/gwilczynski/securionpay-ruby)
8
-
9
- If you don't already have SecurionPay account you can create it [here](https://securionpay.com/register).
10
-
11
- ## Installation
12
-
13
- Add this line to your application's Gemfile:
14
-
15
- ```ruby
16
- gem 'securionpay'
17
- ```
18
-
19
- And then execute:
20
-
21
- $ bundle
22
-
23
- Or install it yourself as:
24
-
25
- $ gem install securionpay
26
-
27
- ## Usage
28
-
29
- Configuration:
30
-
31
-
32
- ```ruby
33
- SecurionPay::Configuration.private_key = 'private_key'
34
- ```
35
-
36
- If you want connect do different backent:
37
-
38
- ```ruby
39
- SecurionPay::Configuration.service_url = 'https://api.chuck.norris.com'
40
- ```
41
-
42
- ### Create a new Card
43
- Creates a new card object.
44
-
45
- ```ruby
46
- customer_id = 'cust_id'
47
- card = {
48
- number: '4242424242424242',
49
- expMonth: '11',
50
- expYear: '2022',
51
- cvc: '123',
52
- cardholderName: 'John Doe',
53
- }
54
-
55
- SecurionPay::Cards.create(customer_id, card)
56
- ```
57
-
58
- ### Retrieve an existing Card
59
-
60
- Retrieve an existing card object.
61
-
62
- ```ruby
63
- customer_id = 'cust_id'
64
- card_id = 'card_id'
65
-
66
- SecurionPay::Cards.retrieve(customer_id, card_id)
67
- ```
68
-
69
- ### Update an existing Card
70
-
71
- Update an existing card object.
72
-
73
- ```ruby
74
- customer_id = 'cust_id'
75
- card_id = 'card_id'
76
- card = {
77
- cardholderName: 'Mr Bean'
78
- }
79
- SecurionPay::Cards.update(customer_id, card_id, card)
80
- ```
81
-
82
- ### Delete a Card
83
-
84
- Deletes an existing card object.
85
-
86
- ```ruby
87
- customer_id = 'cust_id'
88
- card_id = 'card_id'
89
- SecurionPay::Cards.delete(customer_id, card_id)
90
- ```
91
-
92
- ### List Cards
93
-
94
- List card objects for given customer.
95
-
96
- ```ruby
97
- customer_id = 'cust_id'
98
- SecurionPay::Cards.list(customer_id)
99
- ```
100
-
101
- ## Development
102
-
103
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `bundle exec rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
104
-
105
- For mutation testing, run `mutant --include lib --require securionpay --use rspec SecurionPay*`
106
-
107
- If you want to run integration tests: ``
108
-
109
- 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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
110
-
111
- ## Contributing
112
-
113
- Bug reports and pull requests are welcome on GitHub at https://github.com/securionpay/securionpay-ruby
data/Rakefile DELETED
@@ -1,7 +0,0 @@
1
- require 'bundler/gem_tasks'
2
- require 'rspec/core/rake_task'
3
-
4
- RSpec::Core::RakeTask.new
5
-
6
- task :default => :spec
7
- task :test => :spec
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- set -vx
5
-
6
- bundle install
7
-
8
- # Do any other automated setup that you need to do here
@@ -1,13 +0,0 @@
1
- module SecurionPay
2
- module Builders
3
- class PathBuilder
4
- def self.build_card_path(customer_id, card_id = nil)
5
- if card_id
6
- "/customers/#{customer_id}/cards/#{card_id}"
7
- else
8
- "/customers/#{customer_id}/cards"
9
- end
10
- end
11
- end
12
- end
13
- end
@@ -1,27 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'securionpay/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "securionpay"
8
- spec.version = SecurionPay::VERSION
9
- spec.authors = ["Grzegorz Wilczynski"]
10
- spec.email = ["support@securionpay.com"]
11
-
12
- spec.summary = "SecurionPay ruby gem"
13
- spec.description = "SecurionPay ruby gem"
14
- spec.homepage = "https://securionpay.com"
15
-
16
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
- spec.bindir = "exe"
18
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
- spec.require_paths = ["lib"]
20
-
21
- spec.add_dependency 'httparty', '~> 0.13'
22
- spec.add_development_dependency 'bundler', '~> 1.11'
23
- spec.add_development_dependency "rake", "~> 11.1"
24
- spec.add_development_dependency "rspec", "~> 3.4"
25
- spec.add_development_dependency "pry", "~> 0.10"
26
- spec.add_development_dependency "codeclimate-test-reporter", "~> 0.5"
27
- end