unit-ruby 0.10.0 → 0.10.1

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: e31b034179f13eb859547998eaba9d38df67c7becaea41ed14e23bfef35d4aa7
4
- data.tar.gz: ff540f8d02f5fbe31096a0158dc4050c41830bb596c572986377339c406f462c
3
+ metadata.gz: 4771e47bafd526a9a832e0552b1cc67a2e49720a44d87c727e0d2de4b764f1bf
4
+ data.tar.gz: d96d783374e42fb21168afd0bf86f809f8fc309de3f6e7a0a0cf7fe4f320ef05
5
5
  SHA512:
6
- metadata.gz: 2219dc5eb8680c78c08f3efee4e10aaa237507431b3c079ca6a9ba600e77a06928e8f5132cb9f5b094bc87afec643095c5dc3e47c6d330896283079fb0170945
7
- data.tar.gz: 473e5f6ebc1e409a739a788792a64fceccd8c53fcbc07666d792bd9aa3e09e19a784260a516406466b30d8d72ea3f38b3918c1f2961c26da703d21f8f67e6432
6
+ metadata.gz: 3e531d141c243bcaf32b651523092c3f543ac7a610026210ac6e165a9018de635bf3408f57dc487a9f66c8044f9659dbb98fe891705820efa413376db9e3242c
7
+ data.tar.gz: 1bbaa140de53f9350b48ac53c725b591054abac4427ef1ba6e16eff04b0000bca8357469dc1d91b30bc40e7a0ac7534bc5d46bbcb215360c91615c6668fe52a4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- unit-ruby (0.10.0)
4
+ unit-ruby (0.10.1)
5
5
  activesupport
6
6
  faraday (>= 2.0.1, < 3)
7
7
  faraday-retry
@@ -0,0 +1,21 @@
1
+ module Unit
2
+ class TaxForm < APIResource
3
+ path '/tax-forms'
4
+
5
+ attribute :tax_year, Types::String, readonly: true
6
+ attribute :form_type, Types::String, readonly: true
7
+
8
+ belongs_to :customer, class_name: 'Unit::IndividualCustomer'
9
+ has_many :accounts, class_name: 'Unit::DepositAccount'
10
+
11
+ def pdf
12
+ self.class.connection.get(
13
+ "tax-forms/#{id}/pdf",
14
+ raw: true
15
+ )
16
+ end
17
+
18
+ include ResourceOperations::List
19
+ include ResourceOperations::Find
20
+ end
21
+ end
@@ -24,12 +24,12 @@ module Unit
24
24
  # Executes a GET request to the API
25
25
  #
26
26
  # @return the resource (or array of resources) returned from the API
27
- def get(path, params = nil)
27
+ def get(path, params = nil, raw: false)
28
28
  response = connection.get(path, params)
29
29
 
30
30
  handle_errors(response)
31
31
 
32
- from_json_api(response.body)
32
+ raw ? response.body : from_json_api(response.body)
33
33
  end
34
34
 
35
35
  # Executes a POST request to the API
@@ -1,3 +1,3 @@
1
1
  module Unit
2
- VERSION = '0.10.0'
2
+ VERSION = '0.10.1'
3
3
  end
data/lib/unit-ruby.rb CHANGED
@@ -42,6 +42,7 @@ require 'unit-ruby/received_payment'
42
42
  require 'unit-ruby/pin_status'
43
43
  require 'unit-ruby/statement'
44
44
  require 'unit-ruby/transaction'
45
+ require 'unit-ruby/tax_form'
45
46
  require 'unit-ruby/version'
46
47
  require 'unit-ruby/white_label_theme'
47
48
  require 'unit-ruby/white_label_language'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unit-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chloe Isacke
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2025-01-30 00:00:00.000000000 Z
12
+ date: 2025-02-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -184,6 +184,7 @@ files:
184
184
  - lib/unit-ruby/pin_status.rb
185
185
  - lib/unit-ruby/received_payment.rb
186
186
  - lib/unit-ruby/statement.rb
187
+ - lib/unit-ruby/tax_form.rb
187
188
  - lib/unit-ruby/transaction.rb
188
189
  - lib/unit-ruby/types/account_limits.rb
189
190
  - lib/unit-ruby/types/ach_limits.rb