iats_payments 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 01d0a9a6ca20cac127d8c610edde98c103b6f9fa
4
+ data.tar.gz: 94763665a5b2c68e1b7837c1b2dc27c99780d32d
5
+ SHA512:
6
+ metadata.gz: c274a6b1799e77dc036e22c8ac3006fd3bcb9fe04ea939705facc477f44833b95d68c8f208819afa01b5013b52daea8ec274ed6ea145d0ab025fd220fb530b49
7
+ data.tar.gz: 0d3806a50b08a4e0b0b9da40b37d7729820b384fe626108ed86843315a2affc53f29bd90e892751e71db0a655aafaa97c19cf0cee98b5608d50b48b175b2cf62
data/.gitignore ADDED
@@ -0,0 +1,22 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
18
+ *.bundle
19
+ *.so
20
+ *.o
21
+ *.a
22
+ mkmf.log
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in iats_payments.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Tim Glen
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # IatsPayments
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'iats_payments'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install iats_payments
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it ( https://github.com/[my-github-username]/iats_payments/fork )
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ desc "Open an irb session preloaded with this library"
4
+ task :console do
5
+ sh "irb -rubygems -I lib -r iats_payments.rb"
6
+ end
@@ -0,0 +1,27 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'iats_payments/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "iats_payments"
8
+ spec.version = IatsPayments::VERSION
9
+ spec.authors = ["Tim Glen"]
10
+ spec.email = ["tim@tag.ca"]
11
+ spec.summary = %q{Basic Payments using the IATS sytem}
12
+ spec.description = nil
13
+ spec.homepage = ""
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency "savon", "~> 2.11.1"
22
+
23
+ spec.add_development_dependency "bundler", "~> 1.6"
24
+ spec.add_development_dependency "byebug"
25
+ spec.add_development_dependency "rake"
26
+ spec.add_development_dependency "rspec"
27
+ end
@@ -0,0 +1,9 @@
1
+ require 'savon'
2
+ require 'iats_payments/client'
3
+ require 'iats_payments/client/customer_link_client'
4
+ require 'iats_payments/client/process_link_client'
5
+ require 'iats_payments/client/report_link_client'
6
+ require 'iats_payments/version'
7
+
8
+ module IatsPayments
9
+ end
@@ -0,0 +1,38 @@
1
+ module IatsPayments
2
+ class Client
3
+ attr_accessor :agent_code, :password, :test_mode
4
+
5
+ def self.wsdl_endpoint_url
6
+ end
7
+
8
+ def initialize(test_mode=false)
9
+ self.test_mode = test_mode
10
+ end
11
+
12
+ def agent_code
13
+ return 'TEST88' if test_mode == true
14
+ @agent_code
15
+ end
16
+
17
+ def call(operation_name, locals = {}, &block)
18
+ locals[:message][:agent_code] = agent_code if locals[:message] && locals[:message][:agent_code].blank?
19
+ locals[:message][:password] = password if locals[:message] && locals[:message][:password].blank?
20
+ response = soap_client.call(operation_name, locals, &block)
21
+ response.body["#{operation_name}_v1_response".to_sym]["#{operation_name}_v1_result".to_sym][:iatsresponse]
22
+ end
23
+
24
+ def methods
25
+ soap_client.operations
26
+ end
27
+
28
+ def password
29
+ return 'TEST88' if test_mode == true
30
+ @password
31
+ end
32
+
33
+ private
34
+ def soap_client
35
+ @soap_client ||= Savon.client(wsdl: self.class.wsdl_endpoint_url)
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,38 @@
1
+ # To see the available required/available request parameters for each method, see:
2
+ # http://home.iatspayments.com/developers/underlying-soap-api
3
+ #
4
+ # Each parameter is passed as a "message" hash, lower-cased and underscorized (snake-case).
5
+
6
+ module IatsPayments
7
+ class CustomerLinkClient < Client
8
+ ENDPOINT_URL = "https://www.iatspayments.com/NetGate/CustomerLink.asmx"
9
+
10
+ def self.wsdl_endpoint_url
11
+ ENDPOINT_URL + "?WSDL"
12
+ end
13
+
14
+ def create_credit_card_customer_code(message, locals={})
15
+ call(:create_credit_card_customer_code, { message: message }.merge(locals))
16
+ end
17
+
18
+ def create_acheft_customer_code(message, locals={})
19
+ call(:create_acheft_customer_code, { message: message }.merge(locals))
20
+ end
21
+
22
+ def update_credit_card_customer_code(message, locals={})
23
+ call(:update_credit_card_customer_code, { message: message }.merge(locals))
24
+ end
25
+
26
+ def update_acheft_customer_code(message, locals={})
27
+ call(:update_acheft_customer_code, { message: message }.merge(locals))
28
+ end
29
+
30
+ def delete_customer_code(message, locals={})
31
+ call(:delete_customer_code, { message: message }.merge(locals))
32
+ end
33
+
34
+ def get_customer_code_detail(message, locals={})
35
+ call(:get_customer_code_detail, { message: message }.merge(locals))
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,62 @@
1
+ # To see the available required/available request parameters for each method, see:
2
+ # http://home.iatspayments.com/developers/underlying-soap-api
3
+ #
4
+ # Each parameter is passed as a "message" hash, lower-cased and underscorized (snake-case).
5
+
6
+ module IatsPayments
7
+ class ProcessLinkClient < Client
8
+ ENDPOINT_URL = "https://www.iatspayments.com/NetGate/ProcessLink.asmx"
9
+
10
+ def self.wsdl_endpoint_url
11
+ ENDPOINT_URL + "?WSDL"
12
+ end
13
+
14
+ def create_customer_code_and_process_credit_card(message, locals = {})
15
+ call(:create_customer_code_and_process_credit_card, { message: message }.merge(locals))
16
+ end
17
+
18
+ def process_credit_card_with_customer_code(message, locals = {})
19
+ call(:process_credit_card_with_customer_code, { message: message }.merge(locals))
20
+ end
21
+
22
+ def process_credit_card(message, locals = {})
23
+ call(:process_credit_card, { message: message }.merge(locals))
24
+ end
25
+
26
+ def create_customer_code_and_process_acheft(message, locals = {})
27
+ call(:create_customer_code_and_process_acheft, { message: message }.merge(locals))
28
+ end
29
+
30
+ def process_acheft_with_customer_code(message, locals = {})
31
+ call(:process_acheft_with_customer_code, { message: message }.merge(locals))
32
+ end
33
+
34
+ def process_acheft(message, locals = {})
35
+ call(:process_acheft, { message: message }.merge(locals))
36
+ end
37
+
38
+ def process_credit_card_refund_with_transaction_id(message, locals = {})
39
+ call(:process_credit_card_refund_with_transaction_id, { message: message }.merge(locals))
40
+ end
41
+
42
+ def process_acheft_refund_with_transaction_id(message, locals = {})
43
+ call(:process_acheft_refund_with_transaction_id, { message: message }.merge(locals))
44
+ end
45
+
46
+ def process_credit_card_batch(message, locals = {})
47
+ call(:process_credit_card_batch, { message: message }.merge(locals))
48
+ end
49
+
50
+ def process_acheft_charge_batch(message, locals = {})
51
+ call(:process_acheft_charge_batch, { message: message }.merge(locals))
52
+ end
53
+
54
+ def process_acheft_refund_batch(message, locals = {})
55
+ call(:process_acheft_refund_batch, { message: message }.merge(locals))
56
+ end
57
+
58
+ def get_batch_process_result_file(message, locals = {})
59
+ call(:get_batch_process_result_file, { message: message }.merge(locals))
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,119 @@
1
+ # To see the available required/available request parameters for each method, see:
2
+ # http://home.iatspayments.com/developers/underlying-soap-api
3
+ #
4
+ # Each parameter is passed as a "message" hash, lower-cased and underscorized (snake-case).
5
+
6
+ module IatsPayments
7
+ class ReportLinkClient < Client
8
+ ENDPOINT_URL = "https://www.iatspayments.com/NetGate/ReportLink.asmx"
9
+
10
+ def self.wsdl_endpoint_url
11
+ ENDPOINT_URL + "?WSDL"
12
+ end
13
+
14
+ def get_cc_journal_csv(message, locals={})
15
+ call(:get_cc_journal_csv, { message: message }.merge(locals))
16
+ end
17
+
18
+ def get_credit_card_journal_csv(message, locals={})
19
+ call(:get_credit_card_journal_csv, { message: message }.merge(locals))
20
+ end
21
+
22
+ def get_credit_card_journal(message, locals={})
23
+ call(:get_credit_card_journal, { message: message }.merge(locals))
24
+ end
25
+
26
+ def get_credit_card_reject_csv(message, locals={})
27
+ call(:get_credit_card_reject_csv, { message: message }.merge(locals))
28
+ end
29
+
30
+ def get_credit_card_reject(message, locals={})
31
+ call(:get_credit_card_reject, { message: message }.merge(locals))
32
+ end
33
+
34
+ def get_ach_journal_csv(message, locals={})
35
+ call(:get_ach_journal_csv, { message: message }.merge(locals))
36
+ end
37
+
38
+ def get_acheft_journal_csv(message, locals={})
39
+ call(:get_acheft_journal_csv, { message: message }.merge(locals))
40
+ end
41
+
42
+ def get_acheft_journal(message, locals={})
43
+ call(:get_acheft_journal, { message: message }.merge(locals))
44
+ end
45
+
46
+ def get_acheft_reject_csv(message, locals={})
47
+ call(:get_acheft_reject_csv, { message: message }.merge(locals))
48
+ end
49
+
50
+ def get_acheft_reject(message, locals={})
51
+ call(:get_acheft_reject, { message: message }.merge(locals))
52
+ end
53
+
54
+ def get_acheft_return_csv(message, locals={})
55
+ call(:get_acheft_return_csv, { message: message }.merge(locals))
56
+ end
57
+
58
+ def get_acheft_return(message, locals={})
59
+ call(:get_acheft_return, { message: message }.merge(locals))
60
+ end
61
+
62
+ def get_cc_payment_box_journal_csv(message, locals={})
63
+ call(:get_cc_payment_box_journal_csv, { message: message }.merge(locals))
64
+ end
65
+
66
+ def get_cc_payment_box_journal_csvv2(message, locals={})
67
+ call(:get_cc_payment_box_journal_csvv2, { message: message }.merge(locals))
68
+ end
69
+
70
+ def get_credit_card_payment_box_journal_csv(message, locals={})
71
+ call(:get_credit_card_payment_box_journal_csv, { message: message }.merge(locals))
72
+ end
73
+
74
+ def get_credit_card_payment_box_journal_csvv2(message, locals={})
75
+ call(:get_credit_card_payment_box_journal_csvv2, { message: message }.merge(locals))
76
+ end
77
+
78
+ def get_credit_card_payment_box_reject_csv(message, locals={})
79
+ call(:get_credit_card_payment_box_reject_csv, { message: message }.merge(locals))
80
+ end
81
+
82
+ def get_credit_card_payment_box_reject_csvv2(message, locals={})
83
+ call(:get_credit_card_payment_box_reject_csvv2, { message: message }.merge(locals))
84
+ end
85
+
86
+ def get_acheft_payment_box_journal_csv(message, locals={})
87
+ call(:get_acheft_payment_box_journal_csv, { message: message }.merge(locals))
88
+ end
89
+
90
+ def get_acheft_payment_box_journal_csvv2(message, locals={})
91
+ call(:get_acheft_payment_box_journal_csvv2, { message: message }.merge(locals))
92
+ end
93
+
94
+ def get_acheft_payment_box_journal_csvv3(message, locals={})
95
+ call(:get_acheft_payment_box_journal_csvv3, { message: message }.merge(locals))
96
+ end
97
+
98
+ def get_acheft_payment_box_reject_csvv2(message, locals={})
99
+ call(:get_acheft_payment_box_reject_csvv2, { message: message }.merge(locals))
100
+ end
101
+
102
+ def get_acheft_payment_box_reject_csv(message, locals={})
103
+ call(:get_acheft_payment_box_reject_csv, { message: message }.merge(locals))
104
+ end
105
+
106
+ def get_acheft_payment_box_return_csvv1(message, locals={})
107
+ call(:get_acheft_payment_box_return_csvv1, { message: message }.merge(locals))
108
+ end
109
+
110
+ def get_credit_card_bank_reconciliation_report_csv(message, locals={})
111
+ call(:get_credit_card_bank_reconciliation_report_csv, { message: message }.merge(locals))
112
+ end
113
+
114
+ def get_acheft_bank_reconciliation_report_csv(message, locals={})
115
+ call(:get_acheft_bank_reconciliation_report_csv, { message: message }.merge(locals))
116
+ end
117
+
118
+ end
119
+ end
@@ -0,0 +1,3 @@
1
+ module IatsPayments
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,12 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe IatsPayments::CustomerLinkClient do
4
+ subject(:customer_link_client) { IatsPayments::CustomerLinkClient.new(true) }
5
+
6
+ it { is_expected.to respond_to :create_credit_card_customer_code }
7
+ it { is_expected.to respond_to :create_acheft_customer_code }
8
+ it { is_expected.to respond_to :update_credit_card_customer_code }
9
+ it { is_expected.to respond_to :update_acheft_customer_code }
10
+ it { is_expected.to respond_to :delete_customer_code }
11
+ it { is_expected.to respond_to :get_customer_code_detail }
12
+ end
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe IatsPayments::ProcessLinkClient do
4
+ subject(:process_link_client) { IatsPayments::ProcessLinkClient.new(true) }
5
+
6
+ it { is_expected.to respond_to :create_customer_code_and_process_credit_card }
7
+ it { is_expected.to respond_to :create_customer_code_and_process_credit_card }
8
+ it { is_expected.to respond_to :process_credit_card_with_customer_code }
9
+ it { is_expected.to respond_to :process_credit_card }
10
+ it { is_expected.to respond_to :create_customer_code_and_process_acheft }
11
+ it { is_expected.to respond_to :process_acheft_with_customer_code }
12
+ it { is_expected.to respond_to :process_acheft }
13
+ it { is_expected.to respond_to :process_credit_card_refund_with_transaction_id }
14
+ it { is_expected.to respond_to :process_acheft_refund_with_transaction_id }
15
+ it { is_expected.to respond_to :process_credit_card_batch }
16
+ it { is_expected.to respond_to :process_acheft_charge_batch }
17
+ it { is_expected.to respond_to :process_acheft_refund_batch }
18
+ it { is_expected.to respond_to :get_batch_process_result_file }end
@@ -0,0 +1,32 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe IatsPayments::ReportLinkClient do
4
+ subject(:report_link_client) { IatsPayments::ReportLinkClient.new(true) }
5
+
6
+ it { is_expected.to respond_to :get_cc_journal_csv }
7
+ it { is_expected.to respond_to :get_credit_card_journal_csv }
8
+ it { is_expected.to respond_to :get_credit_card_journal }
9
+ it { is_expected.to respond_to :get_credit_card_reject_csv }
10
+ it { is_expected.to respond_to :get_credit_card_reject }
11
+ it { is_expected.to respond_to :get_ach_journal_csv }
12
+ it { is_expected.to respond_to :get_acheft_journal_csv }
13
+ it { is_expected.to respond_to :get_acheft_journal }
14
+ it { is_expected.to respond_to :get_acheft_reject_csv }
15
+ it { is_expected.to respond_to :get_acheft_reject }
16
+ it { is_expected.to respond_to :get_acheft_return_csv }
17
+ it { is_expected.to respond_to :get_acheft_return }
18
+ it { is_expected.to respond_to :get_cc_payment_box_journal_csv }
19
+ it { is_expected.to respond_to :get_cc_payment_box_journal_csvv2 }
20
+ it { is_expected.to respond_to :get_credit_card_payment_box_journal_csv }
21
+ it { is_expected.to respond_to :get_credit_card_payment_box_journal_csvv2 }
22
+ it { is_expected.to respond_to :get_credit_card_payment_box_reject_csv }
23
+ it { is_expected.to respond_to :get_credit_card_payment_box_reject_csvv2 }
24
+ it { is_expected.to respond_to :get_acheft_payment_box_journal_csv }
25
+ it { is_expected.to respond_to :get_acheft_payment_box_journal_csvv2 }
26
+ it { is_expected.to respond_to :get_acheft_payment_box_journal_csvv3 }
27
+ it { is_expected.to respond_to :get_acheft_payment_box_reject_csvv2 }
28
+ it { is_expected.to respond_to :get_acheft_payment_box_reject_csv }
29
+ it { is_expected.to respond_to :get_acheft_payment_box_return_csvv1 }
30
+ it { is_expected.to respond_to :get_credit_card_bank_reconciliation_report_csv }
31
+ it { is_expected.to respond_to :get_acheft_bank_reconciliation_report_csv }
32
+ end
@@ -0,0 +1,58 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe IatsPayments::Client do
4
+ subject(:iats_client) { IatsPayments::Client.new(true) }
5
+ let(:soap_client) { double("soap_client", :call => response, :operations => [:bar, :baz]) }
6
+ let(:response) { double("response", body: { foo_v1_response: { foo_v1_result: { iatsresponse: { foo: 'bar' } } } } )}
7
+ before do
8
+ allow(iats_client).to receive(:soap_client) { soap_client }
9
+ end
10
+
11
+ describe "#call" do
12
+ subject { iats_client.call(:foo) }
13
+ specify { expect(iats_client).to receive(:soap_client) { soap_client }; subject }
14
+ it { is_expected.to eql({ foo: 'bar' }) }
15
+ end
16
+
17
+ describe "#methods" do
18
+ subject(:methods) { iats_client.methods }
19
+ specify { expect(soap_client).to receive(:operations) { [:bar, :baz] }; methods }
20
+ end
21
+
22
+ describe "#agent_code" do
23
+ subject(:agent_code) { iats_client.agent_code }
24
+ context "when in test_mode" do
25
+ let(:iats_client) { IatsPayments::Client.new(true) }
26
+ it { is_expected.to eql 'TEST88' }
27
+ end
28
+ context "when not in test_mode" do
29
+ let(:iats_client) { IatsPayments::Client.new(false) }
30
+ it { is_expected.to be_nil }
31
+ it "should return nil by default" do
32
+ expect(iats_client.agent_code).to be_nil
33
+ end
34
+ it "should return whatever it is set to" do
35
+ iats_client.agent_code = 'FOO'
36
+ expect(iats_client.agent_code).to eql 'FOO'
37
+ end
38
+ end
39
+ end
40
+
41
+ describe "#password" do
42
+ let(:iats_client) { IatsPayments::Client.new(false) }
43
+ subject(:password) { iats_client.password }
44
+ context "when in test_mode" do
45
+ let(:iats_client) { IatsPayments::Client.new(true) }
46
+ it { is_expected.to eql 'TEST88' }
47
+ end
48
+ context "when not in test_mode" do
49
+ let(:iats_client) { IatsPayments::Client.new(false) }
50
+ it { is_expected.to be_nil }
51
+ it "iats_client return whatever it is set to" do
52
+ iats_client.password = 'FOO'
53
+ expect(password).to eql 'FOO'
54
+ end
55
+ end
56
+ end
57
+
58
+ end
@@ -0,0 +1,73 @@
1
+ require 'byebug'
2
+ require 'iats_payments'
3
+
4
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
5
+ RSpec.configure do |config|
6
+ # rspec-expectations config goes here. You can use an alternate
7
+ # assertion/expectation library such as wrong or the stdlib/minitest
8
+ # assertions if you prefer.
9
+ config.expect_with :rspec do |expectations|
10
+ # This option will default to `true` in RSpec 4. It makes the `description`
11
+ # and `failure_message` of custom matchers include text for helper methods
12
+ # defined using `chain`, e.g.:
13
+ # be_bigger_than(2).and_smaller_than(4).description
14
+ # # => "be bigger than 2 and smaller than 4"
15
+ # ...rather than:
16
+ # # => "be bigger than 2"
17
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
18
+ end
19
+
20
+ # rspec-mocks config goes here. You can use an alternate test double
21
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
22
+ config.mock_with :rspec do |mocks|
23
+ # Prevents you from mocking or stubbing a method that does not exist on
24
+ # a real object. This is generally recommended, and will default to
25
+ # `true` in RSpec 4.
26
+ mocks.verify_partial_doubles = true
27
+ end
28
+
29
+ # The settings below are suggested to provide a good initial experience
30
+ # with RSpec, but feel free to customize to your heart's content.
31
+ begin
32
+ # These two settings work together to allow you to limit a spec run
33
+ # to individual examples or groups you care about by tagging them with
34
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
35
+ # get run.
36
+ config.filter_run :focus
37
+ config.run_all_when_everything_filtered = true
38
+
39
+ # Limits the available syntax to the non-monkey patched syntax that is
40
+ # recommended. For more details, see:
41
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
42
+ # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
43
+ # - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
44
+ config.disable_monkey_patching!
45
+
46
+ # Many RSpec users commonly either run the entire suite or an individual
47
+ # file, and it's useful to allow more verbose output when running an
48
+ # individual spec file.
49
+ if config.files_to_run.one?
50
+ # Use the documentation formatter for detailed output,
51
+ # unless a formatter has already been configured
52
+ # (e.g. via a command-line flag).
53
+ config.default_formatter = 'doc'
54
+ end
55
+
56
+ # Print the 10 slowest examples and example groups at the
57
+ # end of the spec run, to help surface which specs are running
58
+ # particularly slow.
59
+ # config.profile_examples = 10
60
+
61
+ # Run specs in random order to surface order dependencies. If you find an
62
+ # order dependency and want to debug it, you can fix the order by providing
63
+ # the seed, which is printed after each run.
64
+ # --seed 1234
65
+ config.order = :random
66
+
67
+ # Seed global randomization in this process using the `--seed` CLI option.
68
+ # Setting this allows you to use `--seed` to deterministically reproduce
69
+ # test failures related to randomization by passing the same `--seed` value
70
+ # as the one that triggered the failure.
71
+ Kernel.srand config.seed
72
+ end
73
+ end
metadata ADDED
@@ -0,0 +1,136 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: iats_payments
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Tim Glen
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-06-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: savon
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 2.11.1
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 2.11.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.6'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.6'
41
+ - !ruby/object:Gem::Dependency
42
+ name: byebug
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: ''
84
+ email:
85
+ - tim@tag.ca
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".gitignore"
91
+ - Gemfile
92
+ - LICENSE.txt
93
+ - README.md
94
+ - Rakefile
95
+ - iats_payments.gemspec
96
+ - lib/iats_payments.rb
97
+ - lib/iats_payments/client.rb
98
+ - lib/iats_payments/client/customer_link_client.rb
99
+ - lib/iats_payments/client/process_link_client.rb
100
+ - lib/iats_payments/client/report_link_client.rb
101
+ - lib/iats_payments/version.rb
102
+ - spec/lib/iats_payments/client/customer_link_client_spec.rb
103
+ - spec/lib/iats_payments/client/process_link_client_spec.rb
104
+ - spec/lib/iats_payments/client/report_link_client_spec.rb
105
+ - spec/lib/iats_payments/client_spec.rb
106
+ - spec/spec_helper.rb
107
+ homepage: ''
108
+ licenses:
109
+ - MIT
110
+ metadata: {}
111
+ post_install_message:
112
+ rdoc_options: []
113
+ require_paths:
114
+ - lib
115
+ required_ruby_version: !ruby/object:Gem::Requirement
116
+ requirements:
117
+ - - ">="
118
+ - !ruby/object:Gem::Version
119
+ version: '0'
120
+ required_rubygems_version: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ requirements: []
126
+ rubyforge_project:
127
+ rubygems_version: 2.2.2
128
+ signing_key:
129
+ specification_version: 4
130
+ summary: Basic Payments using the IATS sytem
131
+ test_files:
132
+ - spec/lib/iats_payments/client/customer_link_client_spec.rb
133
+ - spec/lib/iats_payments/client/process_link_client_spec.rb
134
+ - spec/lib/iats_payments/client/report_link_client_spec.rb
135
+ - spec/lib/iats_payments/client_spec.rb
136
+ - spec/spec_helper.rb