baremetrics_api 1.0.3 → 1.0.4

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
  SHA256:
3
- metadata.gz: ce50713936b2eb9e2ff78cd6361534aece2f94155f11d3b383e4235d334953b7
4
- data.tar.gz: d6830d03252eb742a81b70568758aef9eb46196252a6bf8a0be3a8d2626bf734
3
+ metadata.gz: 8a1bd021406911e41f5ed829bbf0d5d80802dacce394148982ef8145258b08ac
4
+ data.tar.gz: f1b9d3e182dd7efb49169b6da6d34ad511b38b957a641a0794bd6080db17a6bb
5
5
  SHA512:
6
- metadata.gz: 6ea9d49df27e7cb64c602794f85433064b4b12119669d1c67c5f7dc48feef5b3e9f4e563b829bed5db9ce8533a7968f86bfdfbf4f164a93921756e9fcf7af593
7
- data.tar.gz: '045197b92f7af80699faf1ef61fc93d1b83bbadf08bfa98bd4f98dcc06ac1e8998a1d60c50fb7fb2939d8a19e77d88c342178e383dce074fb72234468094ea26'
6
+ metadata.gz: 490f5952bbfd025c7335ba2262a0664ddc6fadf50fd7709696b9fa1e292f602bd1901618dc3fab65fa8bb5834437eec31226cd968122386f1e87187ef2cbb75f
7
+ data.tar.gz: 543484dd12ea69e8f6e519e829c19e5dbc5b47f975d124469651e12878dc6eb57e2b03dae527134074960a9fddfef4ac74a6a5e228da7c9b57516d8bc05810df
data/CHANGELOG CHANGED
@@ -1,3 +1,11 @@
1
+ == Version 1.0.4
2
+
3
+ * Add `delete_charge` action
4
+
5
+ == Version 1.0.3
6
+
7
+ * Fix `list_charges` endpoint
8
+
1
9
  == Version 1.0.2
2
10
 
3
11
  * Fix `create_charge` failing to generate request
@@ -7,6 +7,10 @@ module BaremetricsAPI
7
7
  @client = client
8
8
  end
9
9
 
10
+ def delete_charge(source_id:, oid:)
11
+ JSON.parse(delete_charge_request(source_id, oid).body).with_indifferent_access
12
+ end
13
+
10
14
  def list_charges(source_id:, search_params: {}, page: nil)
11
15
  JSON.parse(list_charges_request(source_id, search_params, page).body).with_indifferent_access
12
16
  end
@@ -21,6 +25,12 @@ module BaremetricsAPI
21
25
 
22
26
  private
23
27
 
28
+ def delete_charge_request(source_id, oid)
29
+ @client.connection.delete do |req|
30
+ req.url "#{source_id}/#{PATH}/#{oid}"
31
+ end
32
+ end
33
+
24
34
  def list_charges_request(source_id, search_params, page)
25
35
  query_params = {
26
36
  per_page: @client.configuration.response_limit
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BaremetricsAPI
4
- VERSION = '1.0.3'
4
+ VERSION = '1.0.4'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: baremetrics_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Third Blink Software Inc
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-03-29 00:00:00.000000000 Z
11
+ date: 2019-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler