starkbank 2.10.0 → 2.11.0
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/dict_key/dict_key.rb +5 -17
- data/lib/payment_preview/brcode_preview.rb +2 -8
- data/lib/starkbank.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9571bfbacd93d4716d5e3b0135d3db8ec76caa565938f602f44e43ab717c7dff
|
4
|
+
data.tar.gz: 288fedf58500ee29541406ede7b9c102063ca4967138a09a81f017ceaf52ba03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e98c7542080e894d92dfbcd88dbaefd08823bb5339f5b5957e2d32760a92f06c8a2f04f816b78ed5f1cddd0de1a2c53d6093efea11f9a11d98ab61982c28278c
|
7
|
+
data.tar.gz: 94df51cee5a7b90b7ed502882aaf7ad5c373255c0db7f5744fe20ba8ff9f73089574d90e7081f29670241f2ea6684cd97a0657dcc461b20a4dff60fa850465e6
|
data/lib/dict_key/dict_key.rb
CHANGED
@@ -18,19 +18,13 @@ module StarkBank
|
|
18
18
|
# - owner_type [string]: DICT key owner type. ex 'naturalPerson' or 'legalPerson'
|
19
19
|
# - bank_name [string]: bank name associated with the DICT key. ex: 'Stark Bank'
|
20
20
|
# - ispb [string]: bank ISPB associated with the DICT key. ex: '20018183'
|
21
|
-
# - branch_code [string]: bank account branch code associated with the DICT key. ex: '
|
22
|
-
# - account_number [string]: bank account number associated with the DICT key. ex: '
|
23
|
-
# - account_type [string]: bank account type associated with the DICT key. ex: 'checking', '
|
21
|
+
# - branch_code [string]: encrypted bank account branch code associated with the DICT key. ex: 'ZW5jcnlwdGVkLWJyYW5jaC1jb2Rl'
|
22
|
+
# - account_number [string]: encrypted bank account number associated with the DICT key. ex: 'ZW5jcnlwdGVkLWFjY291bnQtbnVtYmVy'
|
23
|
+
# - account_type [string]: bank account type associated with the DICT key. ex: 'checking', 'savings', 'salary' or 'payment'
|
24
24
|
# - status [string]: current DICT key status. ex: 'created', 'registered', 'canceled' or 'failed'
|
25
|
-
# - account_created [DateTime or string]: creation datetime of the bank account associated with the DICT key. ex: '2020-11-05T14:55:08.812665+00:00'
|
26
|
-
# - owned [DateTime or string]: datetime since when the current owner hold this DICT key. ex : '2020-11-05T14:55:08.812665+00:00'
|
27
|
-
# - created [DateTime or string]: creation datetime for the DICT key. ex: '2020-03-10 10:30:00.000'
|
28
25
|
class DictKey < StarkCore::Utils::Resource
|
29
26
|
attr_reader :id, :type, :name, :tax_id, :owner_type, :bank_name, :ispb, :branch_code, :account_number, :account_type, :status, :account_created, :owned, :created
|
30
|
-
def initialize(
|
31
|
-
id:, type:, name:, tax_id:, owner_type:, bank_name:, ispb:, branch_code:, account_number:,
|
32
|
-
account_type:, status:, account_created:, owned:, created:
|
33
|
-
)
|
27
|
+
def initialize(id:, type:, name:, tax_id:, owner_type:, bank_name:, ispb:, branch_code:, account_number:, account_type:, status:)
|
34
28
|
super(id)
|
35
29
|
@type = type
|
36
30
|
@name = name
|
@@ -42,9 +36,6 @@ module StarkBank
|
|
42
36
|
@account_number = account_number
|
43
37
|
@account_type = account_type
|
44
38
|
@status = status
|
45
|
-
@account_created = StarkCore::Utils::Checks.check_datetime(account_created)
|
46
|
-
@owned = StarkCore::Utils::Checks.check_datetime(owned)
|
47
|
-
@created = StarkCore::Utils::Checks.check_datetime(created)
|
48
39
|
end
|
49
40
|
|
50
41
|
# # Retrieve a specific DictKey
|
@@ -141,10 +132,7 @@ module StarkBank
|
|
141
132
|
branch_code: json['branch_code'],
|
142
133
|
account_number: json['account_number'],
|
143
134
|
type: json['type'],
|
144
|
-
status: json['status']
|
145
|
-
account_created: json['account_created'],
|
146
|
-
owned: json['owned'],
|
147
|
-
created: json['created']
|
135
|
+
status: json['status']
|
148
136
|
)
|
149
137
|
}
|
150
138
|
}
|
@@ -14,8 +14,6 @@ module StarkBank
|
|
14
14
|
# - name [string]: Payment receiver name. ex: 'Tony Stark'
|
15
15
|
# - tax_id [string]: Payment receiver tax ID. ex: '012.345.678-90'
|
16
16
|
# - bank_code [string]: Payment receiver bank code. ex: '20018183'
|
17
|
-
# - branch_code [string]: Payment receiver branch code. ex: '0001'
|
18
|
-
# - account_number [string]: Payment receiver account number. ex: '1234567'
|
19
17
|
# - account_type [string]: Payment receiver account type. ex: 'checking'
|
20
18
|
# - allow_change [bool]: If True, the payment is able to receive amounts that are different from the nominal one. ex: True or False
|
21
19
|
# - amount [integer]: Value in cents that this payment is expecting to receive. If 0, any value is accepted. ex: 123 (= R$1,23)
|
@@ -26,14 +24,12 @@ module StarkBank
|
|
26
24
|
# - discount_amount [integer]: Current discount value in cents that this payment is expecting. ex: 123 (= R$1,23)
|
27
25
|
# - reconciliation_id [string]: Reconciliation ID linked to this payment. ex: 'txId', 'payment-123'
|
28
26
|
class BrcodePreview < StarkCore::Utils::SubResource
|
29
|
-
attr_reader :status, :name, :tax_id, :bank_code, :
|
30
|
-
def initialize(status:, name:, tax_id:, bank_code:,
|
27
|
+
attr_reader :status, :name, :tax_id, :bank_code, :account_type, :allow_change, :amount, :nominal_amount, :interest_amount, :fine_amount, :reduction_amount, :discount_amount, :reconciliation_id
|
28
|
+
def initialize(status:, name:, tax_id:, bank_code:, account_type:, allow_change:, amount:, nominal_amount:, interest_amount:, fine_amount:, reduction_amount:, discount_amount:, reconciliation_id:)
|
31
29
|
@status = status
|
32
30
|
@name = name
|
33
31
|
@tax_id = tax_id
|
34
32
|
@bank_code = bank_code
|
35
|
-
@branch_code = branch_code
|
36
|
-
@account_number = account_number
|
37
33
|
@account_type = account_type
|
38
34
|
@allow_change = allow_change
|
39
35
|
@amount = amount
|
@@ -54,8 +50,6 @@ module StarkBank
|
|
54
50
|
name: json['name'],
|
55
51
|
tax_id: json['tax_id'],
|
56
52
|
bank_code: json['bank_code'],
|
57
|
-
branch_code: json['branch_code'],
|
58
|
-
account_number: json['account_number'],
|
59
53
|
account_type: json['account_type'],
|
60
54
|
allow_change: json['allow_change'],
|
61
55
|
amount: json['amount'],
|
data/lib/starkbank.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: starkbank
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- starkbank
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: starkcore
|