starkbank 2.2.0 → 2.2.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/lib/invoice/invoice.rb +3 -3
- data/lib/utils/request.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b51d2704eb7609e1e76b616bbb3ac74bdb1a0ae8685db2c518c676a6005c7e16
|
4
|
+
data.tar.gz: 7f87b9c3f526aeb6ae7e2d7c20f1f1030954fa5db92cdac8247699085eb12914
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fd6a1aa52db6930d017f2406ab328b3d0e625c087e95cee42aa67d45f8973b5e29173f56d05f01ef7f0a8a540699be5be798b9232db7be1c955935baa5bb812
|
7
|
+
data.tar.gz: 29fcbe0b5670e70339b186354f9d58057e2cdfa7278c0e0ad895f30c7b2b73e1164566fac49ada85b49a251099d7c705932b245bd9ffdf986f550b0d31f74960
|
data/lib/invoice/invoice.rb
CHANGED
@@ -17,7 +17,7 @@ module StarkBank
|
|
17
17
|
# - name [string]: payer name. ex: 'Iron Bank S.A.'
|
18
18
|
#
|
19
19
|
# ## Parameters (optional):
|
20
|
-
# - due [DateTime or string, default
|
20
|
+
# - due [DateTime or string, default now + 2 days]: Invoice due date in UTC ISO format. ex: '2020-10-28T17:59:26.249976+00:00'
|
21
21
|
# - expiration [integer, default 5097600 (59 days)]: time interval in seconds between due date and expiration date. ex 123456789
|
22
22
|
# - fine [float, default 0.0]: Invoice fine for overdue payment in %. ex: 2.5
|
23
23
|
# - interest [float, default 0.0]: Invoice monthly interest for overdue payment in %. ex: 5.2
|
@@ -37,9 +37,9 @@ module StarkBank
|
|
37
37
|
# - created [DateTime, default nil]: creation datetime for the Invoice. ex: DateTime.new(2020, 3, 10, 10, 30, 0, 0)
|
38
38
|
# - updated [DateTime, default nil]: latest update datetime for the Invoice. ex: DateTime.new(2020, 3, 10, 10, 30, 0, 0)
|
39
39
|
class Invoice < StarkBank::Utils::Resource
|
40
|
-
attr_reader :amount, :
|
40
|
+
attr_reader :amount, :tax_id, :name, :due, :expiration, :fine, :interest, :discounts, :tags, :descriptions, :nominal_amount, :fine_amount, :interest_amount, :discount_amount, :id, :brcode, :fee, :status, :created, :updated
|
41
41
|
def initialize(
|
42
|
-
amount:,
|
42
|
+
amount:, tax_id:, name:, due: nil, expiration: nil, fine: nil, interest: nil, discounts: nil,
|
43
43
|
tags: nil, descriptions: nil, nominal_amount: nil, fine_amount: nil, interest_amount: nil,
|
44
44
|
discount_amount: nil, id: nil, brcode: nil, fee: nil, status: nil, created: nil, updated: nil
|
45
45
|
)
|
data/lib/utils/request.rb
CHANGED
@@ -61,7 +61,7 @@ module StarkBank
|
|
61
61
|
req['Access-Time'] = access_time
|
62
62
|
req['Access-Signature'] = signature
|
63
63
|
req['Content-Type'] = 'application/json'
|
64
|
-
req['User-Agent'] = "Ruby-#{RUBY_VERSION}-SDK-2.2.
|
64
|
+
req['User-Agent'] = "Ruby-#{RUBY_VERSION}-SDK-2.2.1"
|
65
65
|
req['Accept-Language'] = language
|
66
66
|
|
67
67
|
request = Net::HTTP.start(uri.hostname, use_ssl: true) { |http| http.request(req) }
|