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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa72d540f445fd4d59ce60f6b24fb5dbe6caa79d
4
- data.tar.gz: 9667364aa8f85ea683df1c2d4fcea9430f025747
3
+ metadata.gz: e767aef37bedc764dfca2f44290236044ed54d31
4
+ data.tar.gz: 1eff03558a88bb462a8eb55f84fb3c99e3dbb977
5
5
  SHA512:
6
- metadata.gz: c403bacda18d58039275be0eb992b103d98efff3bfedb759d037ac72214e105da27252d4b1231e0b0fb2401362d4cda164b557147e04b6e1ad671089b7edc0c8
7
- data.tar.gz: ab489aec72d890dd38bf8cd2ed6019fa0fa567f2704f8f016e2f290f24fd45a2e566cadd53aa2400e8fef8828246ef7d3ee03352fcb596810267c019c9ee450b
6
+ metadata.gz: 3c5ff14ab50d78e158be1c0845a33abd27956ccd7908e4550b98842b98ef7af804ff1c1ddf015534f85350d6f294dfe4d9a9fe167811ac2b3442ca789ef6e806
7
+ data.tar.gz: 4b6440c357c1901d4a14bca0f25dbd7d1846bbf94dbf4a99c119cfca18e7d791b47aeaac33419591b9c3f4e535c3fac07a4584cd855d326e6c7c8b65f2ce79c8
data/CHANGELOG CHANGED
@@ -10,3 +10,5 @@
10
10
  - Expose response status codes
11
11
  - Drop CI support for Ruby 1.9.3
12
12
  - Add typed response models
13
+ 2.1.0 July, 2017
14
+ - Add Accept endpoint
@@ -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.0'
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) }
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Chargehound
2
- VERSION = '2.0.0'.freeze
2
+ VERSION = '2.1.0'.freeze
3
3
  end
@@ -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.0.0
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: 2016-11-03 00:00:00.000000000 Z
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.0'
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.0'
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.5.1
131
+ rubygems_version: 2.6.11
132
132
  signing_key:
133
133
  specification_version: 4
134
134
  summary: Ruby bindings for the Chargehound API