an 0.0.2 → 0.0.3
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/an.gemspec +1 -1
- data/lib/an.rb +4 -0
- data/templates/getCustomerProfileRequest.mote +9 -0
- data/test/an.rb +10 -0
- metadata +3 -2
data/an.gemspec
CHANGED
data/lib/an.rb
CHANGED
@@ -0,0 +1,9 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<getCustomerProfileRequest xmlns="AnetApi/xml/v1/schema/AnetApiSchema.xsd">
|
3
|
+
<merchantAuthentication>
|
4
|
+
<name>{{ login }}</name>
|
5
|
+
<transactionKey>{{ transaction_key }}</transactionKey>
|
6
|
+
</merchantAuthentication>
|
7
|
+
|
8
|
+
<customerProfileId>{{ profile_id }}</customerProfileId>
|
9
|
+
</getCustomerProfileRequest>
|
data/test/an.rb
CHANGED
@@ -119,5 +119,15 @@ scope do
|
|
119
119
|
assert resp.authorization.success?
|
120
120
|
assert_equal "XXXX1111", resp.authorization["accountNumber"]
|
121
121
|
assert_equal "Visa", resp.authorization["accountType"]
|
122
|
+
|
123
|
+
# Verify profile and payment profiles defined
|
124
|
+
resp = gateway.get_profile({profile_id: profile_id})
|
125
|
+
assert resp.success?
|
126
|
+
assert_equal profile_id, resp["profile"]["customerProfileId"]
|
127
|
+
assert_equal "XXXX1111", resp["profile"]["paymentProfiles"]["payment"]["creditCard"]["cardNumber"]
|
128
|
+
assert_equal "Quentin", resp["profile"]["paymentProfiles"]["billTo"]["firstName"]
|
129
|
+
assert_equal "Tarantino", resp["profile"]["paymentProfiles"]["billTo"]["lastName"]
|
130
|
+
assert_equal "#12345 Foobar street", resp["profile"]["paymentProfiles"]["billTo"]["address"]
|
131
|
+
assert_equal "90210", resp["profile"]["paymentProfiles"]["billTo"]["zip"]
|
122
132
|
end
|
123
133
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: an
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-02-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mote
|
@@ -76,6 +76,7 @@ files:
|
|
76
76
|
- templates/createCustomerProfileRequest.mote
|
77
77
|
- templates/createCustomerProfileTransactionRequest.mote
|
78
78
|
- templates/createTransactionRequest.mote
|
79
|
+
- templates/getCustomerProfileRequest.mote
|
79
80
|
homepage: http://github.com/cyx/an
|
80
81
|
licenses: []
|
81
82
|
post_install_message:
|