vindicia 0.2.6 → 0.2.7
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/VERSION +1 -1
- data/lib/vindicia.rb +11 -3
- data/spec/vindicia_spec.rb +22 -0
- metadata +52 -85
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.7
|
data/lib/vindicia.rb
CHANGED
@@ -39,7 +39,7 @@ module Vindicia
|
|
39
39
|
|
40
40
|
def xsd(klass)
|
41
41
|
require 'open-uri'
|
42
|
-
url = "
|
42
|
+
url = "https://#{domain}/#{version}/Vindicia.xsd"
|
43
43
|
@xsd_data ||= begin
|
44
44
|
doc = REXML::Document.new(open(url).read)
|
45
45
|
doc.root.get_elements("//xsd:complexType").inject({}){|memo, node|
|
@@ -51,7 +51,14 @@ module Vindicia
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def wsdl(object)
|
54
|
-
"
|
54
|
+
"https://#{domain}/#{version}/#{object}.wsdl"
|
55
|
+
end
|
56
|
+
|
57
|
+
def silence_debug_output!
|
58
|
+
Savon.configure do |config|
|
59
|
+
config.log = false
|
60
|
+
end
|
61
|
+
def HTTPI.log(*args); end
|
55
62
|
end
|
56
63
|
|
57
64
|
def class(type)
|
@@ -173,7 +180,7 @@ module Vindicia
|
|
173
180
|
include XMLBuilder
|
174
181
|
|
175
182
|
def find(id)
|
176
|
-
self.send(:"fetch_by_merchant_#{name
|
183
|
+
self.send(:"fetch_by_merchant_#{underscore(name)}_id", id)
|
177
184
|
end
|
178
185
|
|
179
186
|
def method_missing(method, *args)
|
@@ -385,6 +392,7 @@ module Vindicia
|
|
385
392
|
def to_hash
|
386
393
|
instance_variables.inject({}) do |result, ivar|
|
387
394
|
name = ivar[1..-1]
|
395
|
+
next result if name == 'attributes'
|
388
396
|
value = instance_variable_get(ivar)
|
389
397
|
case value
|
390
398
|
when SoapObject
|
data/spec/vindicia_spec.rb
CHANGED
@@ -228,6 +228,28 @@ describe Vindicia do
|
|
228
228
|
autobill.request_status.code.should == 200
|
229
229
|
end
|
230
230
|
|
231
|
+
it 'can adjust next billing date backwards' do
|
232
|
+
@product = Vindicia::Product.new('em-2-PREMIUM-USD')
|
233
|
+
@billing = Vindicia::BillingPlan.new('em-2-PREMIUM-USD')
|
234
|
+
@id = "autobill-#{Time.now.to_i}"
|
235
|
+
autobill, created, authstatus, firstBillDate, firstBillAmount, firstBillingCurrency = \
|
236
|
+
Vindicia::AutoBill.update({
|
237
|
+
:account => @account.ref,
|
238
|
+
:product => @product.ref,
|
239
|
+
:billingPlan => @billing.ref,
|
240
|
+
:merchant_auto_bill_id => @id
|
241
|
+
}, 'Fail', true, 100)
|
242
|
+
|
243
|
+
ab = Vindicia::AutoBill.find(@id)
|
244
|
+
original_date = ab.future_rebills.first.timestamp
|
245
|
+
Vindicia::AutoBill.delay_billing_to_date(Vindicia::AutoBill.new(@id), original_date - 2)
|
246
|
+
|
247
|
+
ab2 = Vindicia::AutoBill.find(@id)
|
248
|
+
new_date = ab2.future_rebills.first.timestamp
|
249
|
+
|
250
|
+
new_date.should == original_date - 2
|
251
|
+
end
|
252
|
+
|
231
253
|
it 'should find date-boxed autobill updates' do
|
232
254
|
date = Date.new(2011,1,1)
|
233
255
|
ret, autobills = Vindicia::AutoBill.fetchDeltaSince(date, 1, 5, date+1)
|
metadata
CHANGED
@@ -1,91 +1,68 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: vindicia
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.2.7
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 2
|
9
|
-
- 6
|
10
|
-
version: 0.2.6
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Jamie Macey
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-02-21 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
22
15
|
name: savon
|
23
|
-
|
24
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &2153409800 !ruby/object:Gem::Requirement
|
25
17
|
none: false
|
26
|
-
requirements:
|
27
|
-
- -
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
hash: 59
|
30
|
-
segments:
|
31
|
-
- 0
|
32
|
-
- 8
|
33
|
-
- 2
|
18
|
+
requirements:
|
19
|
+
- - =
|
20
|
+
- !ruby/object:Gem::Version
|
34
21
|
version: 0.8.2
|
35
22
|
type: :runtime
|
36
|
-
version_requirements: *id001
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: isolate
|
39
23
|
prerelease: false
|
40
|
-
|
24
|
+
version_requirements: *2153409800
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: isolate
|
27
|
+
requirement: &2153409320 !ruby/object:Gem::Requirement
|
41
28
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
|
46
|
-
segments:
|
47
|
-
- 0
|
48
|
-
version: "0"
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
49
33
|
type: :development
|
50
|
-
version_requirements: *id002
|
51
|
-
- !ruby/object:Gem::Dependency
|
52
|
-
name: rspec
|
53
34
|
prerelease: false
|
54
|
-
|
35
|
+
version_requirements: *2153409320
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rspec
|
38
|
+
requirement: &2153408840 !ruby/object:Gem::Requirement
|
55
39
|
none: false
|
56
|
-
requirements:
|
57
|
-
- -
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
|
60
|
-
segments:
|
61
|
-
- 0
|
62
|
-
version: "0"
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
63
44
|
type: :development
|
64
|
-
version_requirements: *id003
|
65
|
-
- !ruby/object:Gem::Dependency
|
66
|
-
name: jeweler
|
67
45
|
prerelease: false
|
68
|
-
|
46
|
+
version_requirements: *2153408840
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: jeweler
|
49
|
+
requirement: &2153408360 !ruby/object:Gem::Requirement
|
69
50
|
none: false
|
70
|
-
requirements:
|
71
|
-
- -
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
|
74
|
-
segments:
|
75
|
-
- 0
|
76
|
-
version: "0"
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
77
55
|
type: :development
|
78
|
-
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: *2153408360
|
79
58
|
description: Wrapper interface to Vindicia's SOAP API
|
80
59
|
email: jamie@almlabs.com
|
81
60
|
executables: []
|
82
|
-
|
83
61
|
extensions: []
|
84
|
-
|
85
|
-
extra_rdoc_files:
|
62
|
+
extra_rdoc_files:
|
86
63
|
- LICENSE
|
87
64
|
- README.md
|
88
|
-
files:
|
65
|
+
files:
|
89
66
|
- Isolate
|
90
67
|
- LICENSE
|
91
68
|
- README.md
|
@@ -95,40 +72,30 @@ files:
|
|
95
72
|
- lib/vindicia.rb
|
96
73
|
- spec/authenticate.example.rb
|
97
74
|
- spec/vindicia_spec.rb
|
98
|
-
has_rdoc: true
|
99
75
|
homepage: http://github.com/almlabs/vindicia
|
100
76
|
licenses: []
|
101
|
-
|
102
77
|
post_install_message:
|
103
78
|
rdoc_options: []
|
104
|
-
|
105
|
-
require_paths:
|
79
|
+
require_paths:
|
106
80
|
- lib
|
107
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
81
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
108
82
|
none: false
|
109
|
-
requirements:
|
110
|
-
- -
|
111
|
-
- !ruby/object:Gem::Version
|
112
|
-
|
113
|
-
|
114
|
-
- 0
|
115
|
-
version: "0"
|
116
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - ! '>='
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
87
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
88
|
none: false
|
118
|
-
requirements:
|
119
|
-
- -
|
120
|
-
- !ruby/object:Gem::Version
|
121
|
-
|
122
|
-
segments:
|
123
|
-
- 0
|
124
|
-
version: "0"
|
89
|
+
requirements:
|
90
|
+
- - ! '>='
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0'
|
125
93
|
requirements: []
|
126
|
-
|
127
94
|
rubyforge_project:
|
128
|
-
rubygems_version: 1.
|
95
|
+
rubygems_version: 1.8.12
|
129
96
|
signing_key:
|
130
97
|
specification_version: 3
|
131
98
|
summary: Wrapper interface to Vindicia's SOAP API
|
132
|
-
test_files:
|
99
|
+
test_files:
|
133
100
|
- spec/authenticate.example.rb
|
134
101
|
- spec/vindicia_spec.rb
|