wepay-api 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +21 -0
- data/.travis.yml +6 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +118 -0
- data/Rakefile +7 -0
- data/lib/wepay-api.rb +2 -0
- data/lib/wepay.rb +23 -0
- data/lib/wepay/api.rb +27 -0
- data/lib/wepay/api/account.rb +86 -0
- data/lib/wepay/api/base.rb +25 -0
- data/lib/wepay/api/checkout.rb +68 -0
- data/lib/wepay/api/preapproval.rb +50 -0
- data/lib/wepay/api/subscription.rb +50 -0
- data/lib/wepay/api/subscription_plan.rb +59 -0
- data/lib/wepay/api/withdrawal.rb +41 -0
- data/lib/wepay/client.rb +63 -0
- data/lib/wepay/client/data.rb +31 -0
- data/lib/wepay/client/token.rb +30 -0
- data/lib/wepay/configuration.rb +34 -0
- data/lib/wepay/error.rb +28 -0
- data/lib/wepay/middleware.rb +44 -0
- data/lib/wepay/oauth.rb +32 -0
- data/lib/wepay/version.rb +3 -0
- data/spec/fixtures/vcr_cassettes/Wepay_Middleware/Wepay_Middleware_CheckStatus/raises_a_Wepay_ApiError_with_proper_error_type_message_and_code.yml +35 -0
- data/spec/fixtures/vcr_cassettes/wepay_account.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_account_add_bank.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_account_balance.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_account_create.yml +46 -0
- data/spec/fixtures/vcr_cassettes/wepay_account_delete.yml +48 -0
- data/spec/fixtures/vcr_cassettes/wepay_account_find.yml +43 -0
- data/spec/fixtures/vcr_cassettes/wepay_account_get_tax.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_account_modify.yml +49 -0
- data/spec/fixtures/vcr_cassettes/wepay_account_set_tax.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_checkout.yml +40 -0
- data/spec/fixtures/vcr_cassettes/wepay_checkout_cancel.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_checkout_capture.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_checkout_create.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_checkout_find.yml +51 -0
- data/spec/fixtures/vcr_cassettes/wepay_checkout_modify.yml +40 -0
- data/spec/fixtures/vcr_cassettes/wepay_checkout_refund.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_preapproval.yml +39 -0
- data/spec/fixtures/vcr_cassettes/wepay_preapproval_cancel.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_preapproval_create.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_preapproval_find.yml +39 -0
- data/spec/fixtures/vcr_cassettes/wepay_preapproval_modify.yml +39 -0
- data/spec/fixtures/vcr_cassettes/wepay_subscription.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_subscription_cancel.yml +36 -0
- data/spec/fixtures/vcr_cassettes/wepay_subscription_create.yml +48 -0
- data/spec/fixtures/vcr_cassettes/wepay_subscription_find.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_subscription_modify.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_subscription_plan.yml +39 -0
- data/spec/fixtures/vcr_cassettes/wepay_subscription_plan_create.yml +48 -0
- data/spec/fixtures/vcr_cassettes/wepay_subscription_plan_delete.yml +48 -0
- data/spec/fixtures/vcr_cassettes/wepay_subscription_plan_find.yml +39 -0
- data/spec/fixtures/vcr_cassettes/wepay_subscription_plan_get_button.yml +48 -0
- data/spec/fixtures/vcr_cassettes/wepay_subscription_plan_modify.yml +49 -0
- data/spec/fixtures/vcr_cassettes/wepay_withdrawal.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_withdrawal_create.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_withdrawal_find.yml +38 -0
- data/spec/fixtures/vcr_cassettes/wepay_withdrawal_modify.yml +38 -0
- data/spec/settings.yml.example +6 -0
- data/spec/spec_helper.rb +12 -0
- data/spec/support/matchers.rb +5 -0
- data/spec/support/rspec_helper.rb +30 -0
- data/spec/support/settings.rb +14 -0
- data/spec/support/vcr.rb +17 -0
- data/spec/wepay/api/account_spec.rb +110 -0
- data/spec/wepay/api/checkout_spec.rb +86 -0
- data/spec/wepay/api/preapproval_spec.rb +69 -0
- data/spec/wepay/api/subscription_plan_spec.rb +83 -0
- data/spec/wepay/api/subscription_spec.rb +65 -0
- data/spec/wepay/api/withdrawal_spec.rb +53 -0
- data/spec/wepay/api_spec.rb +9 -0
- data/spec/wepay/configuration_spec.rb +25 -0
- data/spec/wepay/middleware_spec.rb +21 -0
- data/spec/wepay/oauth_spec.rb +23 -0
- data/wepay-api.gemspec +29 -0
- metadata +273 -0
@@ -0,0 +1,83 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Wepay::Api::SubscriptionPlan do
|
4
|
+
let(:it) { described_class.new }
|
5
|
+
record_api_methods
|
6
|
+
|
7
|
+
describe "#show" do
|
8
|
+
it "shows the info of a subscription plan" do
|
9
|
+
data = it.show(
|
10
|
+
subscription_plan_id: 123456789,
|
11
|
+
access_token: "access_token"
|
12
|
+
)
|
13
|
+
|
14
|
+
expect(data).to have_keys :subscription_plan_id, :account_id, :name, :short_description, :currency, :amount, :period, :app_fee, :fee_payer, :number_of_subscriptions, :callback_uri, :state, :trial_length, :setup_fee
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
describe "#find" do
|
19
|
+
it "finds all the subscription plans of an account" do
|
20
|
+
data = it.find(
|
21
|
+
account_id: 123456,
|
22
|
+
access_token: "access_token"
|
23
|
+
)
|
24
|
+
|
25
|
+
expect(data).to be_a Array
|
26
|
+
expect(data.first).to have_keys :subscription_plan_id, :account_id, :name, :short_description, :currency, :amount, :period, :app_fee, :fee_payer, :number_of_subscriptions, :callback_uri, :state, :trial_length, :setup_fee
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe "#create" do
|
31
|
+
it "creates a subscription plan" do
|
32
|
+
data = it.create(
|
33
|
+
name: "Subscription plan 1",
|
34
|
+
short_description: "Short description",
|
35
|
+
amount: 10,
|
36
|
+
period: "yearly",
|
37
|
+
account_id: 123456,
|
38
|
+
access_token: "access_token"
|
39
|
+
)
|
40
|
+
|
41
|
+
expect(data).to have_keys :subscription_plan_id
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
describe "#delete" do
|
46
|
+
it "deletes a subscription plan" do
|
47
|
+
data = it.delete(
|
48
|
+
subscription_plan_id: 123456789,
|
49
|
+
reason: "no resson",
|
50
|
+
access_token: "access_token"
|
51
|
+
)
|
52
|
+
|
53
|
+
expect(data).to have_keys :subscription_plan_id, :state
|
54
|
+
expect(data.state).to eq "Deleted"
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
describe "#get_button" do
|
59
|
+
it "gets button of a subscription plan" do
|
60
|
+
data = it.get_button(
|
61
|
+
subscription_plan_id: 123456789,
|
62
|
+
button_type: "subscription_plan",
|
63
|
+
account_id: 123456,
|
64
|
+
access_token: "access_token"
|
65
|
+
)
|
66
|
+
|
67
|
+
expect(data).to have_keys :subscription_plan_id, :subscription_button_code
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
describe "#modify" do
|
72
|
+
it "modifies a subscription plan" do
|
73
|
+
data = it.modify(
|
74
|
+
subscription_plan_id: 123456789,
|
75
|
+
callback_uri: "https://www.example.com/ipn/12345",
|
76
|
+
access_token: "access_token"
|
77
|
+
)
|
78
|
+
|
79
|
+
expect(data).to have_keys :subscription_plan_id, :callback_uri
|
80
|
+
expect(data.callback_uri).to eq "https://www.example.com/ipn/12345"
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Wepay::Api::Subscription do
|
4
|
+
let(:it) { described_class.new }
|
5
|
+
record_api_methods
|
6
|
+
|
7
|
+
describe "#show" do
|
8
|
+
it "shows the info of a subscription" do
|
9
|
+
data = it.show(
|
10
|
+
subscription_id: 123456789,
|
11
|
+
access_token: "access_token"
|
12
|
+
)
|
13
|
+
|
14
|
+
expect(data).to have_keys :subscription_plan_id, :subscription_id, :subscription_uri, :payer_name, :payer_email, :currency, :amount, :period, :app_fee, :fee_payer, :redirect_uri, :callback_uri, :state, :quantity, :reference_id
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
describe "#find" do
|
19
|
+
it "finds all the subscriptions of an account" do
|
20
|
+
data = it.find(
|
21
|
+
subscription_plan_id: 1234567890,
|
22
|
+
access_token: "access_token"
|
23
|
+
)
|
24
|
+
|
25
|
+
expect(data).to be_a Array
|
26
|
+
expect(data.first).to have_keys :subscription_plan_id, :subscription_id, :subscription_uri, :payer_name, :payer_email, :currency, :amount, :period, :app_fee, :fee_payer, :redirect_uri, :callback_uri, :state, :quantity, :reference_id
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe "#create" do
|
31
|
+
it "creates a subscription" do
|
32
|
+
data = it.create(
|
33
|
+
subscription_plan_id: 1234567890,
|
34
|
+
access_token: "access_token"
|
35
|
+
)
|
36
|
+
|
37
|
+
expect(data).to have_keys :subscription_id, :subscription_uri
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe "#cancel" do
|
42
|
+
it "cancels a subscription" do
|
43
|
+
data = it.cancel(
|
44
|
+
subscription_id: 123456789,
|
45
|
+
reason: 'no reason',
|
46
|
+
access_token: "access_token"
|
47
|
+
)
|
48
|
+
|
49
|
+
expect(data).to have_keys :subscription_id, :reason
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
describe "#modify" do
|
54
|
+
it "modifies a subscription" do
|
55
|
+
data = it.modify(
|
56
|
+
subscription_id: 123456789,
|
57
|
+
callback_uri: "https://www.example.com/ipn/12345",
|
58
|
+
access_token: "access_token"
|
59
|
+
)
|
60
|
+
|
61
|
+
expect(data).to have_keys :subscription_id, :callback_uri
|
62
|
+
expect(data.callback_uri).to eq "https://www.example.com/ipn/12345"
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Wepay::Api::Withdrawal do
|
4
|
+
let(:it) { described_class.new }
|
5
|
+
record_api_methods
|
6
|
+
|
7
|
+
describe "#show" do
|
8
|
+
it "shows the info of a withdrawal" do
|
9
|
+
data = it.show(
|
10
|
+
withdrawal_id: 123456789,
|
11
|
+
access_token: "access_token"
|
12
|
+
)
|
13
|
+
|
14
|
+
expect(data).to have_keys :withdrawal_id, :withdrawal_uri, :account_id, :state, :redirect_uri, :callback_uri, :amount, :note, :create_time, :capture_time, :recipient_confirmed
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
describe "#find" do
|
19
|
+
it "finds all the withdrawals of an account" do
|
20
|
+
data = it.find(
|
21
|
+
account_id: 123456,
|
22
|
+
access_token: "access_token"
|
23
|
+
)
|
24
|
+
|
25
|
+
expect(data).to be_a Array
|
26
|
+
expect(data.first).to have_keys :withdrawal_id, :withdrawal_uri, :account_id, :state, :redirect_uri, :callback_uri, :amount, :note, :create_time, :capture_time, :recipient_confirmed
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe "#create" do
|
31
|
+
it "creates a withdrawal" do
|
32
|
+
data = it.create(
|
33
|
+
account_id: 123456,
|
34
|
+
access_token: "access_token"
|
35
|
+
)
|
36
|
+
|
37
|
+
expect(data).to have_keys :withdrawal_id, :withdrawal_uri
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe "#modify" do
|
42
|
+
it "modifies a withdrawal" do
|
43
|
+
data = it.modify(
|
44
|
+
withdrawal_id: 123456789,
|
45
|
+
callback_uri: "https://www.example.com/ipn/12345",
|
46
|
+
access_token: "access_token"
|
47
|
+
)
|
48
|
+
|
49
|
+
expect(data).to have_keys :withdrawal_id, :callback_uri
|
50
|
+
expect(data.callback_uri).to eq "https://www.example.com/ipn/12345"
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Wepay::Configuration do
|
4
|
+
it "provides configuration" do
|
5
|
+
Wepay.configure do |config|
|
6
|
+
config.client_id = 'client_id'
|
7
|
+
config.client_secret = 'client_secret'
|
8
|
+
config.access_token = 'access_token'
|
9
|
+
config.account_id = 'account_id'
|
10
|
+
config.scope = 'scope'
|
11
|
+
config.using_stage = true
|
12
|
+
config.open_timeout = 1
|
13
|
+
config.timeout = 2
|
14
|
+
end
|
15
|
+
|
16
|
+
expect(Wepay.client_id).to eq "client_id"
|
17
|
+
expect(Wepay.client_secret).to eq "client_secret"
|
18
|
+
expect(Wepay.access_token).to eq "access_token"
|
19
|
+
expect(Wepay.account_id).to eq "account_id"
|
20
|
+
expect(Wepay.scope).to eq "scope"
|
21
|
+
expect(Wepay.using_stage).to eq true
|
22
|
+
expect(Wepay.open_timeout).to eq 1
|
23
|
+
expect(Wepay.timeout).to eq 2
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Wepay::Middleware, :vcr do
|
4
|
+
before :all do
|
5
|
+
@client = Wepay::Client::Data.new
|
6
|
+
end
|
7
|
+
|
8
|
+
describe Wepay::Middleware::CheckStatus do
|
9
|
+
it "raises a Wepay::ApiError with proper error type, message and code" do
|
10
|
+
Wepay.configure { |config| config.access_token = nil }
|
11
|
+
|
12
|
+
begin
|
13
|
+
@client.get "null"
|
14
|
+
rescue => error
|
15
|
+
expect(error).to be_a Wepay::ApiError
|
16
|
+
expect(error.code).to eq 1001
|
17
|
+
expect(error.message).to eq "invalid_request (1001): that is not a recognized WePay API call"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Wepay::OAuth do
|
4
|
+
let(:it) { Class.new.send :extend, described_class }
|
5
|
+
|
6
|
+
describe ".authorization_url" do
|
7
|
+
it "returns oauth authorization url" do
|
8
|
+
url = it.authorization_url("http://example.com/return_url")
|
9
|
+
expect(url).to include "http://example.com/return_url"
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe ".get_access_token" do
|
14
|
+
it "gets the access token from Wepay OAuth" do
|
15
|
+
client_mock = double :token_client
|
16
|
+
Wepay::Client::Token.should_receive(:new).and_return(client_mock)
|
17
|
+
|
18
|
+
client_mock.should_receive(:get_access_token).with('code', "http://example.com/return_url")
|
19
|
+
|
20
|
+
it.get_access_token('code', "http://example.com/return_url")
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/wepay-api.gemspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'wepay/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "wepay-api"
|
8
|
+
spec.version = Wepay::VERSION
|
9
|
+
spec.authors = ["Anh Nguyen"]
|
10
|
+
spec.email = ["anguyen@burnsidedigital.com"]
|
11
|
+
spec.description = %q{Ruby Wrapper for Wepay API}
|
12
|
+
spec.summary = spec.description
|
13
|
+
spec.homepage = "https://github.com/burnsidedigital/wepay-api"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files`.split($/)
|
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 "faraday", ">= 0.7.6"
|
22
|
+
spec.add_dependency "faraday_middleware", ">= 0.8"
|
23
|
+
spec.add_dependency "hashie", ">= 2.0.0"
|
24
|
+
|
25
|
+
spec.add_development_dependency "bundler", "~> 1.3"
|
26
|
+
spec.add_development_dependency "rake"
|
27
|
+
spec.add_development_dependency "rspec", ">= 2"
|
28
|
+
spec.add_development_dependency "vcr", ">= 2"
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,273 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: wepay-api
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Anh Nguyen
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-12-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: faraday
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.7.6
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.7.6
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: faraday_middleware
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.8'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.8'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: hashie
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 2.0.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 2.0.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.3'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.3'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
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
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '2'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '2'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: vcr
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '2'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '2'
|
111
|
+
description: Ruby Wrapper for Wepay API
|
112
|
+
email:
|
113
|
+
- anguyen@burnsidedigital.com
|
114
|
+
executables: []
|
115
|
+
extensions: []
|
116
|
+
extra_rdoc_files: []
|
117
|
+
files:
|
118
|
+
- .gitignore
|
119
|
+
- .travis.yml
|
120
|
+
- Gemfile
|
121
|
+
- LICENSE.txt
|
122
|
+
- README.md
|
123
|
+
- Rakefile
|
124
|
+
- lib/wepay-api.rb
|
125
|
+
- lib/wepay.rb
|
126
|
+
- lib/wepay/api.rb
|
127
|
+
- lib/wepay/api/account.rb
|
128
|
+
- lib/wepay/api/base.rb
|
129
|
+
- lib/wepay/api/checkout.rb
|
130
|
+
- lib/wepay/api/preapproval.rb
|
131
|
+
- lib/wepay/api/subscription.rb
|
132
|
+
- lib/wepay/api/subscription_plan.rb
|
133
|
+
- lib/wepay/api/withdrawal.rb
|
134
|
+
- lib/wepay/client.rb
|
135
|
+
- lib/wepay/client/data.rb
|
136
|
+
- lib/wepay/client/token.rb
|
137
|
+
- lib/wepay/configuration.rb
|
138
|
+
- lib/wepay/error.rb
|
139
|
+
- lib/wepay/middleware.rb
|
140
|
+
- lib/wepay/oauth.rb
|
141
|
+
- lib/wepay/version.rb
|
142
|
+
- spec/fixtures/vcr_cassettes/Wepay_Middleware/Wepay_Middleware_CheckStatus/raises_a_Wepay_ApiError_with_proper_error_type_message_and_code.yml
|
143
|
+
- spec/fixtures/vcr_cassettes/wepay_account.yml
|
144
|
+
- spec/fixtures/vcr_cassettes/wepay_account_add_bank.yml
|
145
|
+
- spec/fixtures/vcr_cassettes/wepay_account_balance.yml
|
146
|
+
- spec/fixtures/vcr_cassettes/wepay_account_create.yml
|
147
|
+
- spec/fixtures/vcr_cassettes/wepay_account_delete.yml
|
148
|
+
- spec/fixtures/vcr_cassettes/wepay_account_find.yml
|
149
|
+
- spec/fixtures/vcr_cassettes/wepay_account_get_tax.yml
|
150
|
+
- spec/fixtures/vcr_cassettes/wepay_account_modify.yml
|
151
|
+
- spec/fixtures/vcr_cassettes/wepay_account_set_tax.yml
|
152
|
+
- spec/fixtures/vcr_cassettes/wepay_checkout.yml
|
153
|
+
- spec/fixtures/vcr_cassettes/wepay_checkout_cancel.yml
|
154
|
+
- spec/fixtures/vcr_cassettes/wepay_checkout_capture.yml
|
155
|
+
- spec/fixtures/vcr_cassettes/wepay_checkout_create.yml
|
156
|
+
- spec/fixtures/vcr_cassettes/wepay_checkout_find.yml
|
157
|
+
- spec/fixtures/vcr_cassettes/wepay_checkout_modify.yml
|
158
|
+
- spec/fixtures/vcr_cassettes/wepay_checkout_refund.yml
|
159
|
+
- spec/fixtures/vcr_cassettes/wepay_preapproval.yml
|
160
|
+
- spec/fixtures/vcr_cassettes/wepay_preapproval_cancel.yml
|
161
|
+
- spec/fixtures/vcr_cassettes/wepay_preapproval_create.yml
|
162
|
+
- spec/fixtures/vcr_cassettes/wepay_preapproval_find.yml
|
163
|
+
- spec/fixtures/vcr_cassettes/wepay_preapproval_modify.yml
|
164
|
+
- spec/fixtures/vcr_cassettes/wepay_subscription.yml
|
165
|
+
- spec/fixtures/vcr_cassettes/wepay_subscription_cancel.yml
|
166
|
+
- spec/fixtures/vcr_cassettes/wepay_subscription_create.yml
|
167
|
+
- spec/fixtures/vcr_cassettes/wepay_subscription_find.yml
|
168
|
+
- spec/fixtures/vcr_cassettes/wepay_subscription_modify.yml
|
169
|
+
- spec/fixtures/vcr_cassettes/wepay_subscription_plan.yml
|
170
|
+
- spec/fixtures/vcr_cassettes/wepay_subscription_plan_create.yml
|
171
|
+
- spec/fixtures/vcr_cassettes/wepay_subscription_plan_delete.yml
|
172
|
+
- spec/fixtures/vcr_cassettes/wepay_subscription_plan_find.yml
|
173
|
+
- spec/fixtures/vcr_cassettes/wepay_subscription_plan_get_button.yml
|
174
|
+
- spec/fixtures/vcr_cassettes/wepay_subscription_plan_modify.yml
|
175
|
+
- spec/fixtures/vcr_cassettes/wepay_withdrawal.yml
|
176
|
+
- spec/fixtures/vcr_cassettes/wepay_withdrawal_create.yml
|
177
|
+
- spec/fixtures/vcr_cassettes/wepay_withdrawal_find.yml
|
178
|
+
- spec/fixtures/vcr_cassettes/wepay_withdrawal_modify.yml
|
179
|
+
- spec/settings.yml.example
|
180
|
+
- spec/spec_helper.rb
|
181
|
+
- spec/support/matchers.rb
|
182
|
+
- spec/support/rspec_helper.rb
|
183
|
+
- spec/support/settings.rb
|
184
|
+
- spec/support/vcr.rb
|
185
|
+
- spec/wepay/api/account_spec.rb
|
186
|
+
- spec/wepay/api/checkout_spec.rb
|
187
|
+
- spec/wepay/api/preapproval_spec.rb
|
188
|
+
- spec/wepay/api/subscription_plan_spec.rb
|
189
|
+
- spec/wepay/api/subscription_spec.rb
|
190
|
+
- spec/wepay/api/withdrawal_spec.rb
|
191
|
+
- spec/wepay/api_spec.rb
|
192
|
+
- spec/wepay/configuration_spec.rb
|
193
|
+
- spec/wepay/middleware_spec.rb
|
194
|
+
- spec/wepay/oauth_spec.rb
|
195
|
+
- wepay-api.gemspec
|
196
|
+
homepage: https://github.com/burnsidedigital/wepay-api
|
197
|
+
licenses:
|
198
|
+
- MIT
|
199
|
+
metadata: {}
|
200
|
+
post_install_message:
|
201
|
+
rdoc_options: []
|
202
|
+
require_paths:
|
203
|
+
- lib
|
204
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - '>='
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
209
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
210
|
+
requirements:
|
211
|
+
- - '>='
|
212
|
+
- !ruby/object:Gem::Version
|
213
|
+
version: '0'
|
214
|
+
requirements: []
|
215
|
+
rubyforge_project:
|
216
|
+
rubygems_version: 2.0.3
|
217
|
+
signing_key:
|
218
|
+
specification_version: 4
|
219
|
+
summary: Ruby Wrapper for Wepay API
|
220
|
+
test_files:
|
221
|
+
- spec/fixtures/vcr_cassettes/Wepay_Middleware/Wepay_Middleware_CheckStatus/raises_a_Wepay_ApiError_with_proper_error_type_message_and_code.yml
|
222
|
+
- spec/fixtures/vcr_cassettes/wepay_account.yml
|
223
|
+
- spec/fixtures/vcr_cassettes/wepay_account_add_bank.yml
|
224
|
+
- spec/fixtures/vcr_cassettes/wepay_account_balance.yml
|
225
|
+
- spec/fixtures/vcr_cassettes/wepay_account_create.yml
|
226
|
+
- spec/fixtures/vcr_cassettes/wepay_account_delete.yml
|
227
|
+
- spec/fixtures/vcr_cassettes/wepay_account_find.yml
|
228
|
+
- spec/fixtures/vcr_cassettes/wepay_account_get_tax.yml
|
229
|
+
- spec/fixtures/vcr_cassettes/wepay_account_modify.yml
|
230
|
+
- spec/fixtures/vcr_cassettes/wepay_account_set_tax.yml
|
231
|
+
- spec/fixtures/vcr_cassettes/wepay_checkout.yml
|
232
|
+
- spec/fixtures/vcr_cassettes/wepay_checkout_cancel.yml
|
233
|
+
- spec/fixtures/vcr_cassettes/wepay_checkout_capture.yml
|
234
|
+
- spec/fixtures/vcr_cassettes/wepay_checkout_create.yml
|
235
|
+
- spec/fixtures/vcr_cassettes/wepay_checkout_find.yml
|
236
|
+
- spec/fixtures/vcr_cassettes/wepay_checkout_modify.yml
|
237
|
+
- spec/fixtures/vcr_cassettes/wepay_checkout_refund.yml
|
238
|
+
- spec/fixtures/vcr_cassettes/wepay_preapproval.yml
|
239
|
+
- spec/fixtures/vcr_cassettes/wepay_preapproval_cancel.yml
|
240
|
+
- spec/fixtures/vcr_cassettes/wepay_preapproval_create.yml
|
241
|
+
- spec/fixtures/vcr_cassettes/wepay_preapproval_find.yml
|
242
|
+
- spec/fixtures/vcr_cassettes/wepay_preapproval_modify.yml
|
243
|
+
- spec/fixtures/vcr_cassettes/wepay_subscription.yml
|
244
|
+
- spec/fixtures/vcr_cassettes/wepay_subscription_cancel.yml
|
245
|
+
- spec/fixtures/vcr_cassettes/wepay_subscription_create.yml
|
246
|
+
- spec/fixtures/vcr_cassettes/wepay_subscription_find.yml
|
247
|
+
- spec/fixtures/vcr_cassettes/wepay_subscription_modify.yml
|
248
|
+
- spec/fixtures/vcr_cassettes/wepay_subscription_plan.yml
|
249
|
+
- spec/fixtures/vcr_cassettes/wepay_subscription_plan_create.yml
|
250
|
+
- spec/fixtures/vcr_cassettes/wepay_subscription_plan_delete.yml
|
251
|
+
- spec/fixtures/vcr_cassettes/wepay_subscription_plan_find.yml
|
252
|
+
- spec/fixtures/vcr_cassettes/wepay_subscription_plan_get_button.yml
|
253
|
+
- spec/fixtures/vcr_cassettes/wepay_subscription_plan_modify.yml
|
254
|
+
- spec/fixtures/vcr_cassettes/wepay_withdrawal.yml
|
255
|
+
- spec/fixtures/vcr_cassettes/wepay_withdrawal_create.yml
|
256
|
+
- spec/fixtures/vcr_cassettes/wepay_withdrawal_find.yml
|
257
|
+
- spec/fixtures/vcr_cassettes/wepay_withdrawal_modify.yml
|
258
|
+
- spec/settings.yml.example
|
259
|
+
- spec/spec_helper.rb
|
260
|
+
- spec/support/matchers.rb
|
261
|
+
- spec/support/rspec_helper.rb
|
262
|
+
- spec/support/settings.rb
|
263
|
+
- spec/support/vcr.rb
|
264
|
+
- spec/wepay/api/account_spec.rb
|
265
|
+
- spec/wepay/api/checkout_spec.rb
|
266
|
+
- spec/wepay/api/preapproval_spec.rb
|
267
|
+
- spec/wepay/api/subscription_plan_spec.rb
|
268
|
+
- spec/wepay/api/subscription_spec.rb
|
269
|
+
- spec/wepay/api/withdrawal_spec.rb
|
270
|
+
- spec/wepay/api_spec.rb
|
271
|
+
- spec/wepay/configuration_spec.rb
|
272
|
+
- spec/wepay/middleware_spec.rb
|
273
|
+
- spec/wepay/oauth_spec.rb
|