myfinance 1.3.1 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +9 -0
- data/CHANGELOG.md +15 -0
- data/Gemfile.lock +1 -1
- data/lib/myfinance/entities/financial_account.rb +1 -1
- data/lib/myfinance/entities/sale.rb +27 -19
- data/lib/myfinance/version.rb +1 -1
- data/spec/lib/myfinance/entities/payable_account_spec.rb +1 -1
- data/spec/lib/myfinance/entities/receivable_account_spec.rb +1 -1
- data/spec/lib/myfinance/entities/sale_spec.rb +26 -19
- data/spec/lib/myfinance/resources/payable_account_spec.rb +1 -1
- data/spec/lib/myfinance/resources/receivable_account_spec.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4e81004a6f6c7920181666ec4fd9bc3781dcdd9
|
4
|
+
data.tar.gz: 17a3994ee0f04f150d8cc87fd662c0bf6478d98f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c24b62f71ca61e76f3392eb32993df9858e1555afa9e01df758a6f547906719f309267d6ae34a845275d28060d16356a426eef0bfc5bebc08d6bd958fbfee85
|
7
|
+
data.tar.gz: a7ec2973ce7b53ae2a24e0a30a97172f3255006e84859cd56fb42af33f1eaa16481be032cde55053c1ce62a12eccd28b96252da4c25081b3483c8cc7cfca1b84
|
data/.rubocop.yml
CHANGED
@@ -43,3 +43,12 @@ Style/SpaceAroundEqualsInParameterDefault:
|
|
43
43
|
Style/StringLiterals:
|
44
44
|
StyleGuide: "https://github.com/bbatsov/ruby-style-guide#consistent-string-literals"
|
45
45
|
EnforcedStyle: double_quotes
|
46
|
+
Style/PercentLiteralDelimiters:
|
47
|
+
StyleGuide: "https://github.com/bbatsov/ruby-style-guide#percent-literal-braces"
|
48
|
+
PreferredDelimiters:
|
49
|
+
default: ()
|
50
|
+
'%i': '[]'
|
51
|
+
'%I': '[]'
|
52
|
+
'%r': '{}'
|
53
|
+
'%w': '[]'
|
54
|
+
'%W': '[]'
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,19 @@
|
|
1
1
|
# Changelog
|
2
|
+
## v1.4.0
|
3
|
+
### New attributes
|
4
|
+
- `Sale` now has the following new attributes:
|
5
|
+
- `attachments_count`, reflecting the fact that `Sale` can now have attachments
|
6
|
+
- `ticket_amount`, amount needed to pay due to some kind of penalty
|
7
|
+
- `interest_amount`, interest amount
|
8
|
+
- `discount_amount`, amount that will be reduced because of a discount
|
9
|
+
- `total_amount`, equals nominal_amount + ticket_amount + interest_amount - discount_amount
|
10
|
+
- `api_related`, `true` if `Sale` was created by the API, `false` otherwise
|
11
|
+
- `tax_charges_attributes`, reflecting the fact that `Sale` can now have taxes
|
12
|
+
### Attributes renamed
|
13
|
+
- `Sale`:
|
14
|
+
- `liquidation_week_day` changed to `liquidation_weekday`, conforming to Rails' convention
|
15
|
+
- `FinancialAccount`:
|
16
|
+
- `financial_account_taxes_attributes` was changed to `tax_charges_attributes`
|
2
17
|
## v1.3.1
|
3
18
|
### Fixes
|
4
19
|
- Fix lib require to be relatively
|
data/Gemfile.lock
CHANGED
@@ -22,7 +22,7 @@ module Myfinance
|
|
22
22
|
end
|
23
23
|
[:created_at, :updated_at].each { |k| attribute k, DateTime }
|
24
24
|
|
25
|
-
attribute :
|
25
|
+
attribute :tax_charges_attributes, Array[Hash]
|
26
26
|
attribute :reconciliations, Hash[String => Array]
|
27
27
|
attribute :links, Array[Hash[String => String]]
|
28
28
|
end
|
@@ -1,32 +1,40 @@
|
|
1
1
|
module Myfinance
|
2
2
|
module Entities
|
3
3
|
class Sale < Base
|
4
|
-
attribute :
|
5
|
-
attribute :
|
6
|
-
attribute :receivable_amount
|
7
|
-
attribute :fixed_fee_amount
|
8
|
-
attribute :fee_percentage
|
9
|
-
attribute :fee_percentage_amount
|
10
|
-
attribute :issuer
|
11
|
-
attribute :payment_method
|
12
|
-
attribute :status
|
13
|
-
attribute :summary
|
14
|
-
attribute :description
|
15
|
-
attribute :observation
|
4
|
+
attribute :api_related
|
5
|
+
attribute :attachments_count
|
16
6
|
attribute :category_id
|
17
7
|
attribute :classification_center_id
|
18
|
-
attribute :
|
8
|
+
attribute :confirmed_at
|
9
|
+
attribute :created_at
|
10
|
+
attribute :custom_classifications
|
11
|
+
attribute :custom_classifications
|
19
12
|
attribute :days_to_liquidation
|
20
|
-
attribute :
|
21
|
-
attribute :
|
22
|
-
attribute :liquidation_week_day
|
13
|
+
attribute :description
|
14
|
+
attribute :discount_amount
|
23
15
|
attribute :estimated_liquidated_at
|
16
|
+
attribute :fee_percentage
|
17
|
+
attribute :fee_percentage_amount
|
18
|
+
attribute :financial_account_id
|
19
|
+
attribute :fixed_fee_amount
|
20
|
+
attribute :id
|
21
|
+
attribute :interest_amount
|
22
|
+
attribute :issuer
|
24
23
|
attribute :liquidated_at
|
24
|
+
attribute :liquidation_weekday
|
25
|
+
attribute :nominal_amount
|
26
|
+
attribute :observation
|
25
27
|
attribute :occurred_at
|
26
|
-
attribute :
|
27
|
-
attribute :
|
28
|
+
attribute :payment_method
|
29
|
+
attribute :person_id
|
30
|
+
attribute :receivable_amount
|
31
|
+
attribute :sale_account_id
|
32
|
+
attribute :status
|
33
|
+
attribute :summary
|
34
|
+
attribute :tax_charges_attributes
|
35
|
+
attribute :ticket_amount
|
36
|
+
attribute :total_amount
|
28
37
|
attribute :updated_at
|
29
|
-
attribute :custom_classifications
|
30
38
|
end
|
31
39
|
end
|
32
40
|
end
|
data/lib/myfinance/version.rb
CHANGED
@@ -8,6 +8,6 @@ describe Myfinance::Entities::PayableAccount do
|
|
8
8
|
:discount_amount, :total_amount, :description, :document, :document_emission_date, :observation, :remind,
|
9
9
|
:reminded_at, :income_tax_relevant, :category_id, :classification_center_id, :expected_deposit_account_id,
|
10
10
|
:recurrence_id, :person_id, :recurrent, :parcelled, :recurrence_period, :number_of_parcels, :current_parcel,
|
11
|
-
:competency_month, :
|
11
|
+
:competency_month, :tax_charges_attributes, :reconciliations, :links, :created_at, :updated_at
|
12
12
|
]
|
13
13
|
end
|
@@ -8,6 +8,6 @@ describe Myfinance::Entities::ReceivableAccount do
|
|
8
8
|
:discount_amount, :total_amount, :description, :document, :document_emission_date, :observation, :remind,
|
9
9
|
:reminded_at, :income_tax_relevant, :category_id, :classification_center_id, :expected_deposit_account_id,
|
10
10
|
:recurrence_id, :person_id, :recurrent, :parcelled, :recurrence_period, :number_of_parcels, :current_parcel,
|
11
|
-
:competency_month, :
|
11
|
+
:competency_month, :tax_charges_attributes, :reconciliations, :links, :created_at, :updated_at
|
12
12
|
]
|
13
13
|
end
|
@@ -2,31 +2,38 @@ require "spec_helper"
|
|
2
2
|
|
3
3
|
describe Myfinance::Entities::Sale do
|
4
4
|
it_behaves_like "entity_attributes", %i[
|
5
|
-
|
6
|
-
|
7
|
-
receivable_amount
|
8
|
-
fixed_fee_amount
|
9
|
-
fee_percentage
|
10
|
-
fee_percentage_amount
|
11
|
-
issuer
|
12
|
-
payment_method
|
13
|
-
status
|
14
|
-
summary
|
15
|
-
description
|
16
|
-
observation
|
5
|
+
api_related
|
6
|
+
attachments_count
|
17
7
|
category_id
|
18
8
|
classification_center_id
|
19
|
-
|
9
|
+
confirmed_at
|
10
|
+
created_at
|
11
|
+
custom_classifications
|
20
12
|
days_to_liquidation
|
21
|
-
|
22
|
-
|
23
|
-
liquidation_week_day
|
13
|
+
description
|
14
|
+
discount_amount
|
24
15
|
estimated_liquidated_at
|
16
|
+
fee_percentage
|
17
|
+
fee_percentage_amount
|
18
|
+
financial_account_id
|
19
|
+
fixed_fee_amount
|
20
|
+
id
|
21
|
+
interest_amount
|
22
|
+
issuer
|
25
23
|
liquidated_at
|
24
|
+
liquidation_weekday
|
25
|
+
nominal_amount
|
26
|
+
observation
|
26
27
|
occurred_at
|
27
|
-
|
28
|
-
|
28
|
+
payment_method
|
29
|
+
person_id
|
30
|
+
receivable_amount
|
31
|
+
sale_account_id
|
32
|
+
status
|
33
|
+
summary
|
34
|
+
tax_charges_attributes
|
35
|
+
ticket_amount
|
36
|
+
total_amount
|
29
37
|
updated_at
|
30
|
-
custom_classifications
|
31
38
|
]
|
32
39
|
end
|
@@ -116,7 +116,7 @@ describe Myfinance::Resources::PayableAccount do
|
|
116
116
|
expect(subject.number_of_parcels).to be_nil
|
117
117
|
expect(subject.current_parcel).to be_nil
|
118
118
|
expect(subject.competency_month).to eq("2015-08")
|
119
|
-
expect(subject.
|
119
|
+
expect(subject.tax_charges_attributes).to be_empty
|
120
120
|
end
|
121
121
|
|
122
122
|
context "when the payable_account has occurred_at value defined" do
|
@@ -117,7 +117,7 @@ describe Myfinance::Resources::ReceivableAccount do
|
|
117
117
|
expect(subject.number_of_parcels).to be_nil
|
118
118
|
expect(subject.current_parcel).to be_nil
|
119
119
|
expect(subject.competency_month).to eq("2015-08")
|
120
|
-
expect(subject.
|
120
|
+
expect(subject.tax_charges_attributes).to be_empty
|
121
121
|
end
|
122
122
|
|
123
123
|
context "when the receivable_account has occurred_at value defined" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: myfinance
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eduardo Hertz
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2017-
|
14
|
+
date: 2017-07-08 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: typhoeus
|
@@ -413,7 +413,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
413
413
|
version: '0'
|
414
414
|
requirements: []
|
415
415
|
rubyforge_project:
|
416
|
-
rubygems_version: 2.6.
|
416
|
+
rubygems_version: 2.6.8
|
417
417
|
signing_key:
|
418
418
|
specification_version: 4
|
419
419
|
summary: A Ruby client for the Myfinance REST API
|