column_api 0.0.5 → 0.0.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 67e78b0248fa68ac54ee20d847e31aa561ccc0238245d76ac3d29566ec419cf7
4
- data.tar.gz: 32119ffa7562a3274f2ad7e253e422626bf1999e8665154b0d3d530fc8501ef3
3
+ metadata.gz: d4741e3260516f50f6bcdde3d8de2e83266ee854f14546a49bd0288843e10e2c
4
+ data.tar.gz: 8f58d2b2a79f149c0fd01f3cbdeba18688337492bea8ee6f9b32a1fdcb26154f
5
5
  SHA512:
6
- metadata.gz: 78787416ab312d71a750a6a336f8a7a86cc7320330da3167503d367dde6130d7ab6c61b67d55fbe5bb96a4490c3e4500178311e710c3f598313182b8f6f8fee0
7
- data.tar.gz: dce011363e8959ae8e2c353b316ec06b6aca9914110675cdb8de0af83ff4e666c50f78ea3e2c11632b6cf925a76e4bae0f67b45787e2d13fc724e3e9b465e3ba
6
+ metadata.gz: 38671e6d5a041b1e2aeec8fd504164cc083a05df565b9fd597372f1967655bb9d76a787ca2448eedc47d3e360ef350fb9f273a4b0b96f2fe52938c1c3e630fb8
7
+ data.tar.gz: 3e6ae4d0ddfd03ddddb620c0dc1e43484c88a486b6c1c670cc4e2af4eeb967aa66584f67ee6d752b674d8eccfdffe02c4a93d3f382af7b6cb07f2ee3525de981
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.0.6] - 2024-01-07
4
+
5
+ - Add Account Number endpoints
6
+ - Add ACH Return endpoints
7
+
3
8
  ## [0.0.5] - 2024-01-04
4
9
 
5
10
  - Add Wire Tranfer endpoints
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- column_api (0.0.5)
4
+ column_api (0.0.6)
5
5
  faraday (~> 2.8.1)
6
6
  faraday-parse_dates (~> 0.1.1)
7
7
 
data/README.md CHANGED
@@ -9,7 +9,7 @@ Ruby bindings for [Column's API](https://column.com/docs/api).
9
9
  ## Installation
10
10
 
11
11
  ```ruby
12
- gem 'column_api', '~> 0.0.5'
12
+ gem 'column_api', '~> 0.0.6'
13
13
  ```
14
14
 
15
15
  ## Usage
@@ -68,6 +68,16 @@ client.bank_accounts.delete(bank_account_id:)
68
68
  client.bank_accounts.history(bank_account_id:, from_date: Date, to_date: Date)
69
69
  ```
70
70
 
71
+ ### Account Numbers
72
+
73
+ https://column.com/docs/api/#account-number/object
74
+
75
+ ```ruby
76
+ client.account_numbers.list(bank_account_id:, params: {})
77
+ client.account_numbers.retrieve(account_number_id:)
78
+ client.account_numbers.create(bank_account_id:, params: {})
79
+ ```
80
+
71
81
  ### ACH Transfers
72
82
 
73
83
  https://column.com/docs/api/#ach-transfer/object
@@ -80,6 +90,16 @@ client.ach_transfers.cancel(ach_transfer_id:)
80
90
  client.ach_transfers.reverse(ach_transfer_id:, reason:, description: "")
81
91
  ```
82
92
 
93
+ ### ACH Returns
94
+
95
+ https://column.com/docs/api/#ach-return/object
96
+
97
+ ```ruby
98
+ client.ach_returns.list(params = {})
99
+ client.ach_returns.retrieve(ach_transfer_id:)
100
+ client.ach_returns.create(ach_transfer_id:, params: {})
101
+ ```
102
+
83
103
  ### Wire Transfers
84
104
 
85
105
  https://column.com/docs/api/#wire-transfer/object
@@ -14,6 +14,14 @@ module ColumnApi
14
14
  AchTransferResource.new(self)
15
15
  end
16
16
 
17
+ def ach_returns
18
+ AchReturnResource.new(self)
19
+ end
20
+
21
+ def account_numbers
22
+ AccountNumberResource.new(self)
23
+ end
24
+
17
25
  def bank_accounts
18
26
  BankAccountResource.new(self)
19
27
  end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ColumnApi
4
+ class AccountNumber < Object
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ColumnApi
4
+ class AchReturn < Object
5
+ end
6
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ColumnApi
4
+ class AccountNumberResource < Resource
5
+ def list(bank_account_id:, params: {})
6
+ response = get_request("bank-accounts/#{bank_account_id}/account-numbers", params: params).body
7
+ Collection.from_response(response, key: "account_numbers", type: AccountNumber)
8
+ end
9
+
10
+ def retrieve(account_number_id:)
11
+ AccountNumber.new get_request("account-numbers/#{account_number_id}").body
12
+ end
13
+
14
+ def create(bank_account_id:, params: {})
15
+ AccountNumber.new post_request("bank-accounts/#{bank_account_id}/account-numbers", body: params).body
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ColumnApi
4
+ class AchReturnResource < Resource
5
+ def list(params = {})
6
+ response = get_request("transfers/ach/returns", params: params).body
7
+ Collection.from_response(response, key: "ach_returns", type: AchReturn)
8
+ end
9
+
10
+ def retrieve(ach_transfer_id:)
11
+ AchReturn.new get_request("transfers/ach/#{ach_transfer_id}/return").body
12
+ end
13
+
14
+ def create(ach_transfer_id:, params: {})
15
+ AchReturn.new post_request("transfers/ach/#{ach_transfer_id}/return", body: params).body
16
+ end
17
+ end
18
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ColumnApi
4
- VERSION = "0.0.5"
4
+ VERSION = "0.0.6"
5
5
  end
data/lib/column_api.rb CHANGED
@@ -16,6 +16,8 @@ module ColumnApi
16
16
 
17
17
  # Objects
18
18
  autoload :AchTransfer, "column_api/objects/ach_transfer"
19
+ autoload :AchReturn, "column_api/objects/ach_return"
20
+ autoload :AccountNumber, "column_api/objects/account_number"
19
21
  autoload :BankAccount, "column_api/objects/bank_account"
20
22
  autoload :BusinessEntity, "column_api/objects/business_entity"
21
23
  autoload :PersonEntity, "column_api/objects/person_entity"
@@ -23,6 +25,8 @@ module ColumnApi
23
25
 
24
26
  # Resources
25
27
  autoload :AchTransferResource, "column_api/resources/ach_transfer_resource"
28
+ autoload :AchReturnResource, "column_api/resources/ach_return_resource"
29
+ autoload :AccountNumberResource, "column_api/resources/account_number_resource"
26
30
  autoload :BankAccountResource, "column_api/resources/bank_account_resource"
27
31
  autoload :EntityResource, "column_api/resources/entity_resource"
28
32
  autoload :WireTransferResource, "column_api/resources/wire_transfer_resource"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: column_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matias Leidemer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-01-05 00:00:00.000000000 Z
11
+ date: 2024-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -59,12 +59,16 @@ files:
59
59
  - lib/column_api/collection.rb
60
60
  - lib/column_api/errors.rb
61
61
  - lib/column_api/object.rb
62
+ - lib/column_api/objects/account_number.rb
63
+ - lib/column_api/objects/ach_return.rb
62
64
  - lib/column_api/objects/ach_transfer.rb
63
65
  - lib/column_api/objects/bank_account.rb
64
66
  - lib/column_api/objects/business_entity.rb
65
67
  - lib/column_api/objects/person_entity.rb
66
68
  - lib/column_api/objects/wire_transfer.rb
67
69
  - lib/column_api/resource.rb
70
+ - lib/column_api/resources/account_number_resource.rb
71
+ - lib/column_api/resources/ach_return_resource.rb
68
72
  - lib/column_api/resources/ach_transfer_resource.rb
69
73
  - lib/column_api/resources/bank_account_resource.rb
70
74
  - lib/column_api/resources/entity_resource.rb