myfinance 1.6.6 → 1.8.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
  SHA1:
3
- metadata.gz: 4f3b148965ed5f6faf627d5eab0ec21655ff970d
4
- data.tar.gz: bad3d4d6661684a439110b5a4f0bfd640c1c14c3
3
+ metadata.gz: dbed30c8958fa2c6ef9cc2d19f9902e75f44dd1e
4
+ data.tar.gz: 7db6144f3f42a01ba6308b6d874d0cac87d5c206
5
5
  SHA512:
6
- metadata.gz: 35c0fe588ee18cfbe1475ed54fa3dcd3d07e98ec03a151b14cdd1b104587cc701e686cdb7a33d7649ac58330e7f3b8550e6f8d065cf1ff4ee64716758f258865
7
- data.tar.gz: bc2db51d5f9efd4c1d3e0d4fabb59d2a752b44db597492287afd8b7a02f1904da46f6066fb0dd05ff1b9bd528c8bf3e3d660c04d2881854a6726cfca67313ad8
6
+ metadata.gz: f51fe876801b3e0432b6f0a3ef9c2b86cb909817c2d20c53f0de30992ee1655cb406225d20a77d83d33f0ddd344879bf58bf0c87408623924a73d569e47189b9
7
+ data.tar.gz: 0f3cd8ac9750f368dedc30cbac8c2ff98184994bd77f207d6ea3020679896511955f89767116adf978fc6911fffe04060d3d93bbe8ac902b06a753f5eea834d5
data/CHANGELOG.md CHANGED
@@ -1,4 +1,19 @@
1
1
  # Changelog
2
+
3
+ ## v1.8.0
4
+ ### Added
5
+ - The following resources now have `classification_center_classifications`:
6
+ * `CreditCard`
7
+ * `CreditCardTransaction`
8
+ * `FinancialTransaction`
9
+ * `Sale`
10
+ * `SaleAccount`
11
+ * `ReceivableAccount`
12
+ * `PayableAccount`
13
+ ## v1.7.0
14
+ ### Added
15
+ - `ReceivableAccount` now has the following new attribute:
16
+ * `eletronic_invoices`
2
17
  ## v1.6.6
3
18
  ### Added
4
19
  - `Sale` now has the following new attributes:
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- myfinance (1.6.6)
4
+ myfinance (1.8.1)
5
5
  mime-types (>= 1.16, < 3.0)
6
6
  multi_json (~> 1.11)
7
7
  require_all (~> 1.4.0)
@@ -30,14 +30,14 @@ GEM
30
30
  diff-lcs (1.3)
31
31
  docile (1.1.5)
32
32
  equalizer (0.0.11)
33
- ethon (0.11.0)
34
- ffi (>= 1.3.0)
35
- ffi (1.9.25)
33
+ ethon (0.15.0)
34
+ ffi (>= 1.15.0)
35
+ ffi (1.15.5)
36
36
  ice_nine (0.11.2)
37
37
  json (2.0.3)
38
38
  method_source (0.8.2)
39
39
  mime-types (2.99.3)
40
- multi_json (1.13.1)
40
+ multi_json (1.15.0)
41
41
  pry (0.10.4)
42
42
  coderay (~> 1.1.0)
43
43
  method_source (~> 0.8.1)
@@ -97,4 +97,4 @@ DEPENDENCIES
97
97
  webmock (~> 1.9.3)
98
98
 
99
99
  BUNDLED WITH
100
- 1.16.2
100
+ 1.17.3
@@ -8,6 +8,7 @@ module Myfinance
8
8
  attribute :category_id, Integer
9
9
  attribute :closing_day, Integer
10
10
  attribute :custom_classifications, Array[Hash]
11
+ attribute :classification_center_classifications, Array[Hash]
11
12
  attribute :expiration_day, Integer
12
13
  attribute :name, String
13
14
  attribute :flag, String
@@ -7,6 +7,7 @@ module Myfinance
7
7
  attribute :classification_center_id, Integer
8
8
  attribute :category_id, Integer
9
9
  attribute :custom_classifications, Array[Hash]
10
+ attribute :classification_center_classifications, Array[Hash]
10
11
  attribute :amount, Decimal
11
12
  attribute :description, String
12
13
  attribute :occurred_at, Date
@@ -26,6 +26,7 @@ module Myfinance
26
26
  attribute :tax_charges, Array[Hash]
27
27
  attribute :financial_account_taxes_attributes, Array[Hash]
28
28
  attribute :custom_classifications, Array[Hash]
29
+ attribute :classification_center_classifications, Array[Hash]
29
30
  attribute :reconciliations, Hash[String => Array]
30
31
  attribute :links, Array[Hash[String => String]]
31
32
  end
@@ -9,6 +9,7 @@ module Myfinance
9
9
  attribute :currency_id, Integer
10
10
  attribute :category_id, Integer
11
11
  attribute :custom_classifications, Array[Hash]
12
+ attribute :classification_center_classifications, Array[Hash]
12
13
  attribute :type, String
13
14
  attribute :occurred_at, Date
14
15
  attribute :document, String
@@ -1,6 +1,7 @@
1
1
  module Myfinance
2
2
  module Entities
3
3
  class ReceivableAccount < FinancialAccount
4
+ attribute :eletronic_invoices, Array[Hash]
4
5
  end
5
6
  end
6
7
  end
@@ -6,10 +6,11 @@ module Myfinance
6
6
  attribute :attachments_count
7
7
  attribute :category_id
8
8
  attribute :classification_center_id
9
+ attribute :classification_center_classifications, Array[Hash]
9
10
  attribute :competency_month
10
11
  attribute :confirmed_at
11
12
  attribute :created_at
12
- attribute :custom_classifications
13
+ attribute :custom_classifications, Array[Hash]
13
14
  attribute :days_to_liquidation
14
15
  attribute :description
15
16
  attribute :discount_amount
@@ -5,7 +5,8 @@ module Myfinance
5
5
  attribute :classification_center_id
6
6
  attribute :consolidate
7
7
  attribute :created_at
8
- attribute :custom_classifications
8
+ attribute :custom_classifications, Array[Hash]
9
+ attribute :classification_center_classifications, Array[Hash]
9
10
  attribute :description
10
11
  attribute :entity_id
11
12
  attribute :id
@@ -1,7 +1,6 @@
1
1
  module Myfinance
2
2
  module Resources
3
3
  class Base
4
-
5
4
  attr_accessor :http
6
5
 
7
6
  def initialize(http)
@@ -12,12 +11,12 @@ module Myfinance
12
11
 
13
12
  def build_search_endpoint(params)
14
13
  query_string = query(params).join("&")
15
- URI.encode("#{endpoint}?#{query_string}")
14
+ "#{endpoint}?#{query_string}"
16
15
  end
17
16
 
18
17
  def query(params)
19
18
  page = params.delete(:page)
20
- query = params.map { |key, value| "search[#{key}]=#{value}" }
19
+ query = params.map { |key, value| "search[#{key}]=#{CGI.escape(value.to_s)}" }
21
20
  query << "page=#{page}" if page
22
21
  query
23
22
  end
@@ -91,13 +91,15 @@ module Myfinance
91
91
 
92
92
  def build_search_endpoint(params)
93
93
  query_string = query(params).join("&")
94
- URI.encode("#{endpoint}?#{query_string}")
94
+ "#{endpoint}?#{query_string}"
95
95
  end
96
96
 
97
97
  def query(params)
98
98
  page = params.delete(:page)
99
99
  per_page = params.delete(:per_page)
100
- query = params.map { |key, value| "search[#{key}]=#{value}" }
100
+ query = params.map do |key, value|
101
+ "search[#{key}]=#{CGI.escape(value.to_s)}"
102
+ end
101
103
  query << "page=#{page}" if page
102
104
  query << "per_page=#{per_page}" if per_page
103
105
  query
@@ -81,7 +81,7 @@ module Myfinance
81
81
  query_string = query(params).join("&")
82
82
  custom_classifier_endpoint = endpoint(custom_classifier_id)
83
83
 
84
- URI.encode("#{custom_classifier_endpoint}?#{query_string}")
84
+ "#{custom_classifier_endpoint}?#{query_string}"
85
85
  end
86
86
 
87
87
  def endpoint(custom_classifier_id)
@@ -85,7 +85,7 @@ module Myfinance
85
85
  query_string = query(params).join("&")
86
86
  deposit_endpoint = endpoint(entity_id)
87
87
 
88
- URI.encode("#{deposit_endpoint}?#{query_string}")
88
+ "#{deposit_endpoint}?#{query_string}"
89
89
  end
90
90
 
91
91
  def endpoint(entity_id)
@@ -1,3 +1,3 @@
1
1
  module Myfinance
2
- VERSION = "1.6.6".freeze
2
+ VERSION = "1.8.1".freeze
3
3
  end
data/myfinance.gemspec CHANGED
@@ -22,8 +22,8 @@ Gem::Specification.new do |spec|
22
22
  spec.required_ruby_version = ">= 2.0.0"
23
23
 
24
24
  spec.summary = %q{A Ruby client for the Myfinance REST API}
25
- spec.description = %q{A Ruby client for the Myfinance REST API: https://app.myfinance.com.br/docs/api}
26
- spec.homepage = "https://github.com/myfreecomm/myfinance-client-ruby"
25
+ spec.description = %q{A Ruby client for the Myfinance REST API: https://financeiro.fintera.com.br/docs/api}
26
+ spec.homepage = "https://github.com/Myfc-github/myfinance-client-ruby/pulls"
27
27
  spec.license = "MIT"
28
28
 
29
29
  # Prevent pushing this gem to RubyGems.org by setting "allowed_push_host", or
@@ -3,5 +3,6 @@ require "spec_helper"
3
3
  describe Myfinance::Entities::CreditCard do
4
4
  it_behaves_like "entity_attributes", %i[created_at id name updated_at entity_id person_id flag
5
5
  flag_image_url observation classification_center_id category_id
6
- closing_day expiration_day custom_classifications]
6
+ closing_day expiration_day custom_classifications
7
+ classification_center_classifications]
7
8
  end
@@ -5,5 +5,5 @@ describe Myfinance::Entities::CreditCardTransaction do
5
5
  description occurred_at type document observation created_at
6
6
  updated_at invoice_payment excel_import_id financial_account_id
7
7
  person_id moved recurrence_id indexed_at credit_card_id id
8
- custom_classifications]
8
+ custom_classifications classification_center_classifications]
9
9
  end
@@ -8,5 +8,6 @@ describe Myfinance::Entities::FinancialTransaction do
8
8
  bank_statement_id balance_difference force_destroy divided
9
9
  attachments_count duplicity_suspicion_id excel_import_id
10
10
  observation api_related bank_slips_count reconciled indexed_at
11
- automatic_rule_related classification_center_id custom_classifications]
11
+ automatic_rule_related classification_center_id
12
+ classification_center_classifications custom_classifications]
12
13
  end
@@ -9,6 +9,6 @@ describe Myfinance::Entities::PayableAccount do
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
11
  competency_month financial_account_taxes_attributes tax_charges reconciliations
12
- links created_at updated_at custom_classifications sale_account_id sale_ids
12
+ links created_at updated_at custom_classifications classification_center_classifications sale_account_id sale_ids
13
13
  ]
14
14
  end
@@ -9,6 +9,7 @@ describe Myfinance::Entities::ReceivableAccount do
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
11
  competency_month financial_account_taxes_attributes tax_charges reconciliations
12
- links created_at updated_at custom_classifications sale_account_id sale_ids
12
+ links created_at updated_at custom_classifications classification_center_classifications sale_account_id
13
+ sale_ids eletronic_invoices
13
14
  ]
14
15
  end
@@ -7,6 +7,7 @@ describe Myfinance::Entities::SaleAccount do
7
7
  consolidate
8
8
  created_at
9
9
  custom_classifications
10
+ classification_center_classifications
10
11
  description
11
12
  entity_id
12
13
  expected_deposit_account_id
@@ -7,6 +7,7 @@ describe Myfinance::Entities::Sale do
7
7
  attachments_count
8
8
  category_id
9
9
  classification_center_id
10
+ classification_center_classifications
10
11
  competency_month
11
12
  confirmed_at
12
13
  created_at
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.6.6
4
+ version: 1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo Hertz
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2018-06-25 00:00:00.000000000 Z
15
+ date: 2022-06-03 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: typhoeus
@@ -230,7 +230,7 @@ dependencies:
230
230
  - - "~>"
231
231
  - !ruby/object:Gem::Version
232
232
  version: '0.4'
233
- description: 'A Ruby client for the Myfinance REST API: https://app.myfinance.com.br/docs/api'
233
+ description: 'A Ruby client for the Myfinance REST API: https://financeiro.fintera.com.br/docs/api'
234
234
  email:
235
235
  - eduardohertz@gmail.com
236
236
  - g.francosilva@gmail.com
@@ -412,7 +412,7 @@ files:
412
412
  - spec/support/shared_examples/entity_collection.rb
413
413
  - spec/support/shared_examples/http_request_methods.rb
414
414
  - spec/support/vcr.rb
415
- homepage: https://github.com/myfreecomm/myfinance-client-ruby
415
+ homepage: https://github.com/Myfc-github/myfinance-client-ruby/pulls
416
416
  licenses:
417
417
  - MIT
418
418
  metadata: