amazon-fps-ruby 0.1.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/AUTHORS +1 -0
- data/History.txt +10 -0
- data/INSTALL +48 -0
- data/LICENSE +21 -0
- data/Manifest.txt +23 -0
- data/README.txt +38 -0
- data/Rakefile +20 -0
- data/TODO +3 -0
- data/cache/AmazonFPS.wsdl +579 -0
- data/cache/AmazonFPS.xsd +982 -0
- data/certs/afps-sdk-keystore.p12 +0 -0
- data/certs/aws.cer +16 -0
- data/certs/aws.cer.key +14 -0
- data/examples/README.txt +1 -0
- data/examples/generated_client.rb +349 -0
- data/lib/AmazonFPSClient.rb +360 -0
- data/lib/amazon_fps.rb +90 -0
- data/lib/aws_credentials.rb +41 -0
- data/lib/default.rb +1766 -0
- data/lib/defaultDriver.rb +273 -0
- data/lib/defaultMappingRegistry.rb +1364 -0
- data/lib/rexml_extensions.rb +17 -0
- data/test/test_amazon_fps.rb +85 -0
- metadata +108 -0
@@ -0,0 +1,17 @@
|
|
1
|
+
module REXML
|
2
|
+
module Parsers
|
3
|
+
class BaseParser
|
4
|
+
alias :oldpull :pull
|
5
|
+
|
6
|
+
# KLUDGE: Investigate why REXML is only parsing the base (SOAP) msg and
|
7
|
+
# not including the entire WSS4R (signed) message before sending
|
8
|
+
# (somewhere in WSS4R -> SOAP4R -> REXML)
|
9
|
+
def pull
|
10
|
+
# $stdout.puts "*" * 80
|
11
|
+
# $stdout.puts @source.buffer
|
12
|
+
@nsstack += [ 'wsu', 'env', 'ds', 'xsi' ]
|
13
|
+
oldpull
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,85 @@
|
|
1
|
+
# $DEBUG = 1
|
2
|
+
require 'test/unit'
|
3
|
+
require '../lib/amazon_fps'
|
4
|
+
|
5
|
+
class TestAmazonFPS < Test::Unit::TestCase
|
6
|
+
|
7
|
+
def setup
|
8
|
+
@credentials = {
|
9
|
+
'AWSAccessKeyId' => 'abc123'
|
10
|
+
}
|
11
|
+
|
12
|
+
@options = {
|
13
|
+
# NOTE: change this to your cert subject as per
|
14
|
+
# `openssl x509 -in aws.cer -subject`
|
15
|
+
:subject => '/C=US/O=Amazon.com/OU=AWS-Developers/CN=bogus'
|
16
|
+
}
|
17
|
+
|
18
|
+
@fps = AmazonFPS.new(@credentials, @options, true)
|
19
|
+
end
|
20
|
+
|
21
|
+
# obj.getAccountBalance(body)
|
22
|
+
def test_get_account_balance
|
23
|
+
ret = @fps.getAccountBalance(AmazonFPS::GetAccountBalanceRequest.new)
|
24
|
+
assert_not_nil ret
|
25
|
+
assert_equal 'GetAccountBalanceResponse', ret.class.to_s
|
26
|
+
assert_equal [ "@accountBalance", "@requestId", "@status" ].sort,
|
27
|
+
ret.instance_variables.sort
|
28
|
+
end
|
29
|
+
|
30
|
+
# obj.getAccountActivity(body)
|
31
|
+
def test_get_account_activity
|
32
|
+
req = AmazonFPS::GetAccountActivityRequest.new
|
33
|
+
req.startDate = Date.today
|
34
|
+
ret = @fps.getAccountActivity(req)
|
35
|
+
assert_not_nil ret
|
36
|
+
assert_equal 'GetAccountActivityResponse', ret.class.to_s
|
37
|
+
assert_equal ["@requestId", "@responseBatchSize", "@status"].sort, ret.instance_variables.sort
|
38
|
+
end
|
39
|
+
|
40
|
+
# obj.settle(body)
|
41
|
+
def test_settle
|
42
|
+
assert false, "Need to write tests"
|
43
|
+
end
|
44
|
+
|
45
|
+
# obj.reserve(body)
|
46
|
+
def test_reserve
|
47
|
+
assert false, "Need to write tests"
|
48
|
+
end
|
49
|
+
|
50
|
+
# obj.installPaymentInstruction(body)
|
51
|
+
def test_install_payment_instruction
|
52
|
+
assert false, "Need to write tests"
|
53
|
+
end
|
54
|
+
|
55
|
+
# obj.getPaymentInstruction(body)
|
56
|
+
def test_get_payment_instruction
|
57
|
+
assert false, "Need to write tests"
|
58
|
+
end
|
59
|
+
|
60
|
+
# obj.cancelToken(body)
|
61
|
+
# obj.discardResults(body)
|
62
|
+
# obj.fundPrepaid(body)
|
63
|
+
# obj.getAllCreditInstruments(body)
|
64
|
+
# obj.getAllPrepaidInstruments(body)
|
65
|
+
# obj.getDebtBalance(body)
|
66
|
+
# obj.getOutstandingDebtBalance(body)
|
67
|
+
# obj.getPrepaidBalance(body)
|
68
|
+
# obj.getResults(body)
|
69
|
+
# obj.getTokenByCaller(body)
|
70
|
+
# obj.getTokenUsage(body)
|
71
|
+
# obj.getTokens(body)
|
72
|
+
# obj.getTotalPrepaidLiability(body)
|
73
|
+
# obj.getTransaction(body)
|
74
|
+
# obj.installPaymentInstruction(body)
|
75
|
+
# obj.installPaymentInstructionBatch(body)
|
76
|
+
# obj.pay(body)
|
77
|
+
# obj.payBatch(body)
|
78
|
+
# obj.refund(body)
|
79
|
+
# obj.retryTransaction(body)
|
80
|
+
# obj.settleDebt(body)
|
81
|
+
# obj.subscribeForCallerNotification(body)
|
82
|
+
# obj.unSubscribeForCallerNotification(body)
|
83
|
+
# obj.writeOffDebt(body)
|
84
|
+
|
85
|
+
end
|
metadata
ADDED
@@ -0,0 +1,108 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: amazon-fps-ruby
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Josh Peck
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2008-11-09 00:00:00 -06:00
|
13
|
+
default_executable:
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: soap4r
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 1.5.8
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: wss4r
|
27
|
+
type: :runtime
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.5.0
|
34
|
+
version:
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: hoe
|
37
|
+
type: :development
|
38
|
+
version_requirement:
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: 1.7.0
|
44
|
+
version:
|
45
|
+
description: "Provides a simple wrapper around the Amazon FPS SOAP web service. == FEATURES/PROBLEMS: Supports all features in the WSDL from Amazon: http://developer.amazonwebservices.com/connect/kbcategory.jspa?categoryID=125"
|
46
|
+
email: jmp@joshpeck.org
|
47
|
+
executables: []
|
48
|
+
|
49
|
+
extensions: []
|
50
|
+
|
51
|
+
extra_rdoc_files:
|
52
|
+
- History.txt
|
53
|
+
- Manifest.txt
|
54
|
+
- README.txt
|
55
|
+
- examples/README.txt
|
56
|
+
files:
|
57
|
+
- AUTHORS
|
58
|
+
- History.txt
|
59
|
+
- INSTALL
|
60
|
+
- LICENSE
|
61
|
+
- Manifest.txt
|
62
|
+
- README.txt
|
63
|
+
- Rakefile
|
64
|
+
- TODO
|
65
|
+
- cache/AmazonFPS.wsdl
|
66
|
+
- cache/AmazonFPS.xsd
|
67
|
+
- certs/afps-sdk-keystore.p12
|
68
|
+
- certs/aws.cer
|
69
|
+
- certs/aws.cer.key
|
70
|
+
- examples/README.txt
|
71
|
+
- examples/generated_client.rb
|
72
|
+
- lib/AmazonFPSClient.rb
|
73
|
+
- lib/amazon_fps.rb
|
74
|
+
- lib/aws_credentials.rb
|
75
|
+
- lib/default.rb
|
76
|
+
- lib/defaultDriver.rb
|
77
|
+
- lib/defaultMappingRegistry.rb
|
78
|
+
- lib/rexml_extensions.rb
|
79
|
+
- test/test_amazon_fps.rb
|
80
|
+
has_rdoc: true
|
81
|
+
homepage: http://code.google.com/p/amazon-fps-ruby/
|
82
|
+
post_install_message:
|
83
|
+
rdoc_options:
|
84
|
+
- --main
|
85
|
+
- README.txt
|
86
|
+
require_paths:
|
87
|
+
- lib
|
88
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: "0"
|
93
|
+
version:
|
94
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
|
+
requirements:
|
96
|
+
- - ">="
|
97
|
+
- !ruby/object:Gem::Version
|
98
|
+
version: "0"
|
99
|
+
version:
|
100
|
+
requirements: []
|
101
|
+
|
102
|
+
rubyforge_project: amazon-fps-ruby
|
103
|
+
rubygems_version: 1.3.0
|
104
|
+
signing_key:
|
105
|
+
specification_version: 2
|
106
|
+
summary: Ruby Gem for Amazon Flexible Payment Service (FPS)
|
107
|
+
test_files:
|
108
|
+
- test/test_amazon_fps.rb
|