spreedly_core 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
@@ -68,7 +68,7 @@ module SpreedlyCore
|
|
68
68
|
end
|
69
69
|
|
70
70
|
class AuthorizeTransaction < Transaction
|
71
|
-
handles "
|
71
|
+
handles "Authorization"
|
72
72
|
attr_reader :payment_method
|
73
73
|
|
74
74
|
def initialize(attrs={})
|
@@ -97,7 +97,7 @@ module SpreedlyCore
|
|
97
97
|
class PurchaseTransaction < Transaction
|
98
98
|
include NullifiableTransaction
|
99
99
|
|
100
|
-
handles "
|
100
|
+
handles "Purchase"
|
101
101
|
attr_reader :payment_method
|
102
102
|
|
103
103
|
def initialize(attrs={})
|
@@ -110,17 +110,17 @@ module SpreedlyCore
|
|
110
110
|
class CaptureTransaction < Transaction
|
111
111
|
include NullifiableTransaction
|
112
112
|
|
113
|
-
handles "
|
113
|
+
handles "Capture"
|
114
114
|
attr_reader :reference_token
|
115
115
|
end
|
116
116
|
|
117
117
|
class VoidedTransaction < Transaction
|
118
|
-
handles "
|
118
|
+
handles "Void"
|
119
119
|
attr_reader :reference_token
|
120
120
|
end
|
121
121
|
|
122
122
|
class CreditTransaction < Transaction
|
123
|
-
handles "
|
123
|
+
handles "Credit"
|
124
124
|
attr_reader :reference_token
|
125
125
|
end
|
126
126
|
|
@@ -1,3 +1,3 @@
|
|
1
1
|
login: 'Ud8NWIpG66s5ki5EX1n3ijCdGCe'
|
2
|
-
secret: '
|
3
|
-
gateway_token: 'JncEWj22g59t3CRB1VnPXmUUgKc'
|
2
|
+
secret: 'lS1jRuOr642CapweB4Au74oM48k9et935YXluG2Gd9sj0qCedUfG44qT3F1HNFnt'
|
3
|
+
gateway_token: 'JncEWj22g59t3CRB1VnPXmUUgKc'
|
data/test/spreedly_core_test.rb
CHANGED
@@ -23,7 +23,7 @@ class SpreedlyCoreTest < Test::Unit::TestCase
|
|
23
23
|
assert transaction = payment_method.purchase(purchase_amount)
|
24
24
|
assert_equal purchase_amount, transaction.amount
|
25
25
|
assert_equal "USD", transaction.currency_code
|
26
|
-
assert_equal "
|
26
|
+
assert_equal "Purchase", transaction.transaction_type
|
27
27
|
assert transaction.succeeded?
|
28
28
|
transaction
|
29
29
|
end
|
@@ -60,7 +60,7 @@ class SpreedlyCoreTest < Test::Unit::TestCase
|
|
60
60
|
capture = transaction.capture(amount)
|
61
61
|
assert capture.succeeded?
|
62
62
|
assert_equal amount, capture.amount
|
63
|
-
assert_equal "
|
63
|
+
assert_equal "Capture", capture.transaction_type
|
64
64
|
assert_equal SpreedlyCore::CaptureTransaction, capture.class
|
65
65
|
capture
|
66
66
|
end
|
@@ -103,7 +103,8 @@ class SpreedlyCoreTest < Test::Unit::TestCase
|
|
103
103
|
|
104
104
|
|
105
105
|
def test_can_get_payment_token
|
106
|
-
payment_method = given_a_payment_method
|
106
|
+
payment_method = given_a_payment_method(:master,
|
107
|
+
:credit_card => {:year => 2015})
|
107
108
|
assert_equal "John", payment_method.first_name
|
108
109
|
assert_equal "Foo", payment_method.last_name
|
109
110
|
assert_equal "XXX", payment_method.verification_value
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spreedly_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- 403 Labs
|
@@ -15,7 +15,8 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-08-23 00:00:00 -05:00
|
19
|
+
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
name: httparty
|
@@ -47,6 +48,22 @@ dependencies:
|
|
47
48
|
version: "0"
|
48
49
|
type: :development
|
49
50
|
version_requirements: *id002
|
51
|
+
- !ruby/object:Gem::Dependency
|
52
|
+
name: rake
|
53
|
+
prerelease: false
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
55
|
+
none: false
|
56
|
+
requirements:
|
57
|
+
- - "="
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
hash: 49
|
60
|
+
segments:
|
61
|
+
- 0
|
62
|
+
- 8
|
63
|
+
- 7
|
64
|
+
version: 0.8.7
|
65
|
+
type: :development
|
66
|
+
version_requirements: *id003
|
50
67
|
description:
|
51
68
|
email: github@403labs.com
|
52
69
|
executables: []
|
@@ -70,6 +87,7 @@ files:
|
|
70
87
|
- test/config/spreedly_core.yml.example
|
71
88
|
- test/spreedly_core_test.rb
|
72
89
|
- test/test_helper.rb
|
90
|
+
has_rdoc: true
|
73
91
|
homepage: http://github.com/403labs/spreedly_core
|
74
92
|
licenses: []
|
75
93
|
|
@@ -99,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
117
|
requirements: []
|
100
118
|
|
101
119
|
rubyforge_project:
|
102
|
-
rubygems_version: 1.
|
120
|
+
rubygems_version: 1.6.2
|
103
121
|
signing_key:
|
104
122
|
specification_version: 3
|
105
123
|
summary: Ruby API for Spreedly Core
|