iron_bank 3.1.1 → 3.2.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: 735f434ff14fa1fa0e8a10a9415f6ce7fa3297fc
4
- data.tar.gz: c1858025c6587535a4d4ef855a245f25110a1549
3
+ metadata.gz: 266748613add787ae3703d59fc767ff26b1ac81b
4
+ data.tar.gz: eb774563fa89f0bec3af6a37ddb01c99f36525c6
5
5
  SHA512:
6
- metadata.gz: 8f595074f0d4eee74d7b9019ede556f085aca3529d19b82a17d8d36238070b94831826bf66e97d18ae89b937e32283c89c616ce108acb9f0dee4d9cfd286077e
7
- data.tar.gz: 4dfc1a7e5bb0793d21ec8437daeda7d0cf143c256f834281868149bdcc44a2911a651736d5b26e5c9c1240abcb3214089a679842fc231fed8ffa8d5fa6c62131
6
+ metadata.gz: 437627e86a74fed69bd4325e8634dac5f6664ac4d4194412b08f085422584c636de2213d411ea87704cd2a442577c7bca96a190422055fc65d5bac7c8edd6388
7
+ data.tar.gz: e2c762dd3c94c770ab956c00256e1d4f1c3eb90868cf20839b2bc494af53ef8718b70b5428d76790f3c5a9e46ff6ae91d6dd1fb299c7d2054cd6a5fd7a5a5cfe
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- iron_bank (3.1.1)
4
+ iron_bank (3.2.0)
5
5
  faraday (~> 0)
6
6
  faraday_middleware (~> 0)
7
7
  nokogiri (~> 1)
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module IronBank
4
+ # Create payment run
5
+ # https://www.zuora.com/developer/api-reference/#operation/POST_PaymentRun
6
+ #
7
+ class PaymentRun
8
+ ENDPOINT = "/v1/payment-runs"
9
+
10
+ def self.create(params)
11
+ payload = IronBank::Object.new(params).deep_camelize(type: :lower)
12
+ body = IronBank.client.connection.post(ENDPOINT, payload).body
13
+ success = body.fetch("success", false)
14
+
15
+ raise ::IronBank::UnprocessableEntityError, body unless success
16
+
17
+ IronBank::Object.new(body).deep_underscore
18
+ end
19
+ end
20
+ end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module IronBank
4
- VERSION = "3.1.1"
4
+ VERSION = "3.2.0"
5
5
  API_VERSION = "v1"
6
6
  end
data/lib/iron_bank.rb CHANGED
@@ -87,6 +87,7 @@ require "iron_bank/describe/tenant"
87
87
  require "iron_bank/object"
88
88
  require "iron_bank/schema"
89
89
  require "iron_bank/query_builder"
90
+ require "iron_bank/payment_run"
90
91
 
91
92
  # Operations
92
93
  require "iron_bank/operation"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iron_bank
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.1
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mickael Pham
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: exe
13
13
  cert_chain: []
14
- date: 2019-04-23 00:00:00.000000000 Z
14
+ date: 2019-05-07 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bump
@@ -303,6 +303,7 @@ files:
303
303
  - lib/iron_bank/object.rb
304
304
  - lib/iron_bank/operation.rb
305
305
  - lib/iron_bank/operations/billing_preview.rb
306
+ - lib/iron_bank/payment_run.rb
306
307
  - lib/iron_bank/query_builder.rb
307
308
  - lib/iron_bank/queryable.rb
308
309
  - lib/iron_bank/resource.rb