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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/unit-ruby/tax_form.rb +21 -0
- data/lib/unit-ruby/util/connection.rb +2 -2
- data/lib/unit-ruby/version.rb +1 -1
- data/lib/unit-ruby.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4771e47bafd526a9a832e0552b1cc67a2e49720a44d87c727e0d2de4b764f1bf
|
4
|
+
data.tar.gz: d96d783374e42fb21168afd0bf86f809f8fc309de3f6e7a0a0cf7fe4f320ef05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e531d141c243bcaf32b651523092c3f543ac7a610026210ac6e165a9018de635bf3408f57dc487a9f66c8044f9659dbb98fe891705820efa413376db9e3242c
|
7
|
+
data.tar.gz: 1bbaa140de53f9350b48ac53c725b591054abac4427ef1ba6e16eff04b0000bca8357469dc1d91b30bc40e7a0ac7534bc5d46bbcb215360c91615c6668fe52a4
|
data/Gemfile.lock
CHANGED
@@ -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
|
data/lib/unit-ruby/version.rb
CHANGED
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.
|
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-
|
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
|