mollie-ruby-multi-version 0.3.0 → 0.3.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: 70a8285a20d713a4b90f9b1626d9a09ebb5f5783
4
- data.tar.gz: cf3604e99b660cf7f7c51bff0bce6f7fb9a9a110
3
+ metadata.gz: 6f4cc49a5584c816eeede0f7e55dab3d1126264f
4
+ data.tar.gz: 38fc30d782e577d7abf55c5fb20e37f07dbce739
5
5
  SHA512:
6
- metadata.gz: 72cb540fd9aa833d7f6fc609b66e12d3523b83a006fd09ad2f93b55bb643c36cdba446210a14b21d69d64107ee6c0b0b3e168cd7e2de0f8a1b2deeceeab8b077
7
- data.tar.gz: fa76d6cfc471840b80c509a89978c59bb41ce2ef1c4406966354ff8cbed78e292ab6eee12c3d55fe9370b674094c018efb0b3d81c198789a4c2709688c8ce1fc
6
+ metadata.gz: 1fb02c500e5b83a608b30601f78f94df5db53fa61f48f47d62a73b6dc7122af4d60cc4c3e0e38fda6b8e3213f2297fb31e8e22d652c51bff4c3e5894a4b830f7
7
+ data.tar.gz: 91461bfe37b48956667d2d4383adc7b57204fc3a552826385f7554a1b3c412bf8021e4b125a60332887f922e111266a8d1ff9d487c70e52d49b6cf4800f7007e
@@ -1,7 +1,7 @@
1
1
  require 'httparty'
2
2
  require 'json'
3
3
 
4
- module Mollie
4
+ module MollieApi
5
5
  class Client
6
6
  include HTTParty
7
7
  base_uri "https://api.mollie.nl"
@@ -0,0 +1,3 @@
1
+ module MollieApi
2
+ VERSION = "0.3.1"
3
+ end
@@ -0,0 +1,2 @@
1
+ require "mollie_api/version"
2
+ require "mollie_api/client"
@@ -1,11 +1,11 @@
1
1
  # coding: utf-8
2
2
  lib = File.expand_path('../lib', __FILE__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'mollie/version'
4
+ require 'mollie_api/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "mollie-ruby-multi-version"
8
- spec.version = Mollie::VERSION
8
+ spec.version = MollieApi::VERSION
9
9
  spec.authors = ["Isabella Santos"]
10
10
  spec.email = ["isabella.cdossantos@gmail.com"]
11
11
  spec.description = %q{Ruby API Client for Mollie}
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Mollie::Client do
3
+ describe MollieApi::Client do
4
4
 
5
5
  let(:api_key) { "test_4drFuX5HdjBaFxdXoaABYD8yO4HjuT" }
6
6
 
@@ -9,7 +9,7 @@ describe Mollie::Client do
9
9
  it "will setup the payment on mollie" do
10
10
 
11
11
  VCR.use_cassette('prepare_payment') do
12
- client = Mollie::Client.new(api_key)
12
+ client = MollieApi::Client.new(api_key)
13
13
  amount = 99.99
14
14
  description = "My fantastic product"
15
15
  redirect_url = "http://localhost:3000/payments/1/update"
@@ -32,7 +32,7 @@ describe Mollie::Client do
32
32
  context "issuers" do
33
33
  it "returns a hash with the iDeal issuers" do
34
34
  VCR.use_cassette('get_issuers_list') do
35
- client = Mollie::Client.new(api_key)
35
+ client = MollieApi::Client.new(api_key)
36
36
  response = client.issuers
37
37
  expect(response.first[:id]).to eql "ideal_TESTNL99"
38
38
  expect(response.first[:name]).to eql "TBM Bank"
@@ -44,7 +44,7 @@ describe Mollie::Client do
44
44
  context 'when payment is paid' do
45
45
  it "returns the paid status" do
46
46
  VCR.use_cassette('get_status_paid') do
47
- client = Mollie::Client.new(api_key)
47
+ client = MollieApi::Client.new(api_key)
48
48
  response = client.payment_status("tr_8NQDMOE7EC")
49
49
  expect(response["status"]).to eql "paid"
50
50
  end
@@ -55,7 +55,7 @@ describe Mollie::Client do
55
55
  context "refund" do
56
56
  it "refunds the payment" do
57
57
  VCR.use_cassette('refund payment') do
58
- client = Mollie::Client.new(api_key)
58
+ client = MollieApi::Client.new(api_key)
59
59
  response = client.refund_payment("tr_8NQDMOE7EC")
60
60
  expect(response["payment"]["status"]).to eql "refunded"
61
61
  end
@@ -65,7 +65,7 @@ describe Mollie::Client do
65
65
  context 'payment_methods' do
66
66
  it 'returns a hash with payment methods' do
67
67
  VCR.use_cassette('get methods list') do
68
- client = Mollie::Client.new(api_key)
68
+ client = MollieApi::Client.new(api_key)
69
69
  response = client.payment_methods
70
70
 
71
71
  expect(response['totalCount']).to eql 8
@@ -83,7 +83,7 @@ describe Mollie::Client do
83
83
  it 'returns a hash for ideal method' do
84
84
  VCR.use_cassette('get ideal method') do
85
85
 
86
- client = Mollie::Client.new(api_key)
86
+ client = MollieApi::Client.new(api_key)
87
87
  response = client.payment_methods('ideal')
88
88
 
89
89
  expect(response['id']).to eql 'ideal'
@@ -101,7 +101,7 @@ describe Mollie::Client do
101
101
  context "error response" do
102
102
  it "will raise an Exception" do
103
103
  VCR.use_cassette('invalid_key') do
104
- client = Mollie::Client.new(api_key << "foo")
104
+ client = MollieApi::Client.new(api_key << "foo")
105
105
  response = client.refund_payment("tr_8NQDMOE7EC")
106
106
  expect(response["error"]).to_not be nil
107
107
  end
data/spec/spec_helper.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  #require "codeclimate-test-reporter"
2
2
  #CodeClimate::TestReporter.start
3
3
 
4
- require 'mollie'
4
+ require 'mollie_ruby_multi_version'
5
5
  require 'vcr'
6
6
  require 'pry'
7
7
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mollie-ruby-multi-version
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Isabella Santos
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-17 00:00:00.000000000 Z
11
+ date: 2018-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -135,10 +135,10 @@ files:
135
135
  - LICENSE.txt
136
136
  - README.md
137
137
  - Rakefile
138
- - lib/mollie.rb
139
- - lib/mollie/client.rb
140
- - lib/mollie/version.rb
141
- - mollie.gemspec
138
+ - lib/mollie_api/client.rb
139
+ - lib/mollie_api/version.rb
140
+ - lib/mollie_ruby_multi_version.rb
141
+ - mollie_ruby_multi_version.gemspec
142
142
  - spec/mollie/client_spec.rb
143
143
  - spec/spec_helper.rb
144
144
  - spec/vcr_cassettes/get_ideal_method.yml
@@ -1,3 +0,0 @@
1
- module Mollie
2
- VERSION = "0.3.0"
3
- end
data/lib/mollie.rb DELETED
@@ -1,2 +0,0 @@
1
- require "mollie/version"
2
- require "mollie/client"