paytrace 0.1.1 → 0.1.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d9079bdedb95b47c01d862b45a91d51b7ae6929
|
4
|
+
data.tar.gz: e39e2b5fc949cb4d127f065dcf8ff12f74589fce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52603839d6579d881a622e74f4fd54e3e0c1c4e984f375bb2ab88c394c843e9577be92c83a1db500b16f66b10597f115bea8a557d38c5ec2c25d322bccd86f2f
|
7
|
+
data.tar.gz: 93656c1eb5cca7cb846a8542cada0605eac5270d4261b3d0b3735ab62f09c18ad6d5face2e984e9c966d809d1e02dc179f68e9923490667ac4d4053cb2054256
|
@@ -6,6 +6,11 @@ module PayTrace
|
|
6
6
|
CREATE_METHOD = "CreateRecur"
|
7
7
|
DELETE_METHOD = "DeleteRecur"
|
8
8
|
UPDATE_METHOD = "UpdateRecur"
|
9
|
+
EXPORT_SINGLE_METHOD = "ExportCustomerRecur"
|
10
|
+
|
11
|
+
def self.export_single(params = {})
|
12
|
+
set_request_data(EXPORT_SINGLE_METHOD, params)
|
13
|
+
end
|
9
14
|
|
10
15
|
def self.create(params = {})
|
11
16
|
set_request_data(CREATE_METHOD, params)
|
data/lib/paytrace/version.rb
CHANGED
@@ -112,6 +112,18 @@ describe PayTrace::RecurringTransaction do
|
|
112
112
|
recur_id.must_equal "12345"
|
113
113
|
end
|
114
114
|
end
|
115
|
-
|
115
|
+
|
116
|
+
describe "export single recurrence" do
|
117
|
+
before do
|
118
|
+
PayTrace::API::Gateway.debug = true
|
119
|
+
PayTrace::API::Gateway.next_response = "RESPONSE~ok|RECURID~12345|"
|
120
|
+
end
|
121
|
+
|
122
|
+
it "works" do
|
123
|
+
PayTrace::RecurringTransaction.export_single({customer_id: "john_doe"})
|
124
|
+
PayTrace::API::Gateway.last_request.must_equal base_url(PayTrace::RecurringTransaction::EXPORT_SINGLE_METHOD) +
|
125
|
+
"CUSTID~john_doe|"
|
126
|
+
end
|
127
|
+
end
|
116
128
|
# describe "bulk update recurrences"
|
117
129
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require "paytrace"
|
2
2
|
|
3
3
|
# see: http://help.paytrace.com/api-email-receipt for details
|
4
4
|
|
@@ -88,7 +88,11 @@ params = {
|
|
88
88
|
}
|
89
89
|
recur_id = PayTrace::RecurringTransaction.create(params)
|
90
90
|
dump_response_values(PayTrace::API::Gateway.last_response_object)
|
91
|
-
|
91
|
+
log "Recurrence ID: #{recur_id}"
|
92
|
+
|
93
|
+
log "Exporting recurring transaction..."
|
94
|
+
exported = PayTrace::RecurringTransaction.export_single({customer_id: "john_doe"})
|
95
|
+
dump_response_values(PayTrace::API::Gateway.last_response_object)
|
92
96
|
|
93
97
|
log "Deleting recurrence #{recur_id}..."
|
94
98
|
PayTrace::RecurringTransaction.delete({recur_id: recur_id})
|