chargehound 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +2 -0
- data/chargehound.gemspec +1 -1
- data/lib/chargehound/disputes.rb +7 -0
- data/lib/chargehound/version.rb +1 -1
- data/test/disputes_test.rb +12 -0
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e767aef37bedc764dfca2f44290236044ed54d31
|
4
|
+
data.tar.gz: 1eff03558a88bb462a8eb55f84fb3c99e3dbb977
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c5ff14ab50d78e158be1c0845a33abd27956ccd7908e4550b98842b98ef7af804ff1c1ddf015534f85350d6f294dfe4d9a9fe167811ac2b3442ca789ef6e806
|
7
|
+
data.tar.gz: 4b6440c357c1901d4a14bca0f25dbd7d1846bbf94dbf4a99c119cfca18e7d791b47aeaac33419591b9c3f4e535c3fac07a4584cd855d326e6c7c8b65f2ce79c8
|
data/CHANGELOG
CHANGED
data/chargehound.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.add_development_dependency 'minitest', '~> 5.8'
|
19
19
|
spec.add_development_dependency 'rake', '~> 11.1'
|
20
20
|
spec.add_development_dependency 'rubocop', '0.41.0'
|
21
|
-
spec.add_development_dependency 'webmock', '~> 2.
|
21
|
+
spec.add_development_dependency 'webmock', '~> 2.3'
|
22
22
|
|
23
23
|
spec.files = `git ls-files`.split($/)
|
24
24
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
data/lib/chargehound/disputes.rb
CHANGED
@@ -59,5 +59,12 @@ module Chargehound
|
|
59
59
|
ApiRequest.new(:put, "disputes/#{dispute_id}",
|
60
60
|
body: update).run
|
61
61
|
end
|
62
|
+
|
63
|
+
# Accept a dispute and do not submit a response
|
64
|
+
# @param dispute_id A dispute id
|
65
|
+
# @return [Dispute]
|
66
|
+
def self.accept(dispute_id)
|
67
|
+
ApiRequest.new(:post, "disputes/#{dispute_id}/accept").run
|
68
|
+
end
|
62
69
|
end
|
63
70
|
end
|
data/lib/chargehound/version.rb
CHANGED
data/test/disputes_test.rb
CHANGED
@@ -205,6 +205,18 @@ describe Chargehound::Disputes do
|
|
205
205
|
assert_requested stub
|
206
206
|
end
|
207
207
|
|
208
|
+
it 'can accept a dispute' do
|
209
|
+
# Does not set content type b/c there is no body
|
210
|
+
headers = get_headers
|
211
|
+
stub = stub_request(:post, 'https://api.chargehound.com/v1/disputes/dp_123/accept')
|
212
|
+
.with(headers: headers)
|
213
|
+
.to_return(body: dispute_response.to_json,
|
214
|
+
status: 200)
|
215
|
+
|
216
|
+
Chargehound::Disputes.accept('dp_123')
|
217
|
+
assert_requested stub
|
218
|
+
end
|
219
|
+
|
208
220
|
it 'can submit a dispute with product data' do
|
209
221
|
stub = stub_request(:post, 'https://api.chargehound.com/v1/disputes/dp_123/submit')
|
210
222
|
.with(headers: post_headers,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chargehound
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chargehound
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '2.
|
75
|
+
version: '2.3'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '2.
|
82
|
+
version: '2.3'
|
83
83
|
description: Automatically fight disputes in Stripe
|
84
84
|
email:
|
85
85
|
- support@chargehound.com
|
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
128
|
version: '0'
|
129
129
|
requirements: []
|
130
130
|
rubyforge_project:
|
131
|
-
rubygems_version: 2.
|
131
|
+
rubygems_version: 2.6.11
|
132
132
|
signing_key:
|
133
133
|
specification_version: 4
|
134
134
|
summary: Ruby bindings for the Chargehound API
|