economic-rest 0.6.0 → 0.6.2
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 +7 -7
- data/lib/economic/account.rb +12 -0
- data/lib/economic/account_repo.rb +4 -0
- data/lib/economic/accounts_summed.rb +6 -0
- data/lib/economic/contra_account.rb +5 -0
- data/lib/economic/customer.rb +1 -1
- data/lib/economic/invoices/drafts_repo.rb +4 -35
- data/lib/economic/orders/drafts_repo.rb +5 -0
- data/lib/economic/rest/version.rb +1 -1
- data/lib/economic/rest.rb +5 -0
- data/lib/economic/total_from_account.rb +5 -0
- data/lib/economic/vat_account.rb +5 -0
- metadata +8 -3
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: ba643539fb39486d8b0a8833d9b4e7ef5ea8c36a1d68390ea6c7fdf50796a7aa
         | 
| 4 | 
            +
              data.tar.gz: edf319c61901c9d7654c026ce72193e3f6dfc137327807d5b5592ec8299d5d65
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 4c85b13a4a61538064f5dff85157eb9b664d1e8820a99a2ca35c3a362e925b4863a25a8a4791da1deecb1668d54c300e4ad2f6b80240c62676ff7867430b2a60
         | 
| 7 | 
            +
              data.tar.gz: e685da1ddf6b7a84a0f91ab2f4a2b2a92ac6ec661cfa21344e67213ea44a354175d6880b545f73862be33f7169ba91f3a22a57478fa4cbbb6f3c6fb67f7d4af5
         | 
    
        data/Gemfile.lock
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            PATH
         | 
| 2 2 | 
             
              remote: .
         | 
| 3 3 | 
             
              specs:
         | 
| 4 | 
            -
                economic-rest (0.6. | 
| 4 | 
            +
                economic-rest (0.6.1)
         | 
| 5 5 | 
             
                  activesupport
         | 
| 6 6 | 
             
                  rest-client
         | 
| 7 7 | 
             
                  savon
         | 
| @@ -9,7 +9,7 @@ PATH | |
| 9 9 | 
             
            GEM
         | 
| 10 10 | 
             
              remote: https://rubygems.org/
         | 
| 11 11 | 
             
              specs:
         | 
| 12 | 
            -
                activesupport (6.1. | 
| 12 | 
            +
                activesupport (6.1.4)
         | 
| 13 13 | 
             
                  concurrent-ruby (~> 1.0, >= 1.0.2)
         | 
| 14 14 | 
             
                  i18n (>= 1.6, < 2)
         | 
| 15 15 | 
             
                  minitest (>= 5.1)
         | 
| @@ -23,7 +23,7 @@ GEM | |
| 23 23 | 
             
                ast (2.4.0)
         | 
| 24 24 | 
             
                awesome_print (1.8.0)
         | 
| 25 25 | 
             
                builder (3.2.4)
         | 
| 26 | 
            -
                concurrent-ruby (1.1. | 
| 26 | 
            +
                concurrent-ruby (1.1.9)
         | 
| 27 27 | 
             
                coveralls (0.8.23)
         | 
| 28 28 | 
             
                  json (>= 1.8, < 3)
         | 
| 29 29 | 
             
                  simplecov (~> 0.16.1)
         | 
| @@ -40,7 +40,7 @@ GEM | |
| 40 40 | 
             
                  builder (>= 2.1.2)
         | 
| 41 41 | 
             
                hashdiff (0.3.8)
         | 
| 42 42 | 
             
                http-accept (1.7.0)
         | 
| 43 | 
            -
                http-cookie (1.0. | 
| 43 | 
            +
                http-cookie (1.0.4)
         | 
| 44 44 | 
             
                  domain_name (~> 0.5)
         | 
| 45 45 | 
             
                httpi (2.4.5)
         | 
| 46 46 | 
             
                  rack
         | 
| @@ -57,12 +57,12 @@ GEM | |
| 57 57 | 
             
                mime-types (3.3.1)
         | 
| 58 58 | 
             
                  mime-types-data (~> 3.2015)
         | 
| 59 59 | 
             
                mime-types-data (3.2021.0225)
         | 
| 60 | 
            -
                mini_portile2 (2.5. | 
| 60 | 
            +
                mini_portile2 (2.5.3)
         | 
| 61 61 | 
             
                minitest (5.11.3)
         | 
| 62 62 | 
             
                mocha (1.9.0)
         | 
| 63 63 | 
             
                  metaclass (~> 0.0.1)
         | 
| 64 64 | 
             
                netrc (0.11.0)
         | 
| 65 | 
            -
                nokogiri (1.11. | 
| 65 | 
            +
                nokogiri (1.11.7)
         | 
| 66 66 | 
             
                  mini_portile2 (~> 2.5.0)
         | 
| 67 67 | 
             
                  racc (~> 1.4)
         | 
| 68 68 | 
             
                nori (2.6.0)
         | 
| @@ -145,4 +145,4 @@ DEPENDENCIES | |
| 145 145 | 
             
              webmock (~> 3.5)
         | 
| 146 146 |  | 
| 147 147 | 
             
            BUNDLED WITH
         | 
| 148 | 
            -
                | 
| 148 | 
            +
               2.4.13
         | 
    
        data/lib/economic/account.rb
    CHANGED
    
    | @@ -1,5 +1,17 @@ | |
| 1 1 | 
             
            module Economic
         | 
| 2 2 | 
             
              class Account < Base
         | 
| 3 3 | 
             
                field :accountNumber, id: true
         | 
| 4 | 
            +
                field :accountType
         | 
| 5 | 
            +
                field :balance
         | 
| 6 | 
            +
                field :barred
         | 
| 7 | 
            +
                field :blockDirectEntries
         | 
| 8 | 
            +
                field :debitCredit
         | 
| 9 | 
            +
                field :draftBalance
         | 
| 10 | 
            +
                field :name
         | 
| 11 | 
            +
             | 
| 12 | 
            +
                relation :contraAccount, fields: [:accountNumber]
         | 
| 13 | 
            +
                relation :accountsSummed, fields: [:fromAccount, :toAccount], multiple: true
         | 
| 14 | 
            +
                relation :totalFromAccount, fields: [:accountNumber]
         | 
| 15 | 
            +
                relation :vatAccount, fields: [:vatCode]
         | 
| 4 16 | 
             
              end
         | 
| 5 17 | 
             
            end
         | 
    
        data/lib/economic/customer.rb
    CHANGED
    
    
| @@ -1,42 +1,11 @@ | |
| 1 1 | 
             
            module Economic
         | 
| 2 2 | 
             
              module Invoices
         | 
| 3 3 | 
             
                class DraftsRepo < Economic::Invoices::Repo
         | 
| 4 | 
            -
                   | 
| 4 | 
            +
                  def self.template(customer)
         | 
| 5 | 
            +
                    response = send_request(method: :get, url: customer.templates["invoice"])
         | 
| 5 6 |  | 
| 6 | 
            -
             | 
| 7 | 
            -
                   | 
| 8 | 
            -
                  #     {
         | 
| 9 | 
            -
                  #       find: {method: :current_invoice_get_data, handle: :entityHandle},
         | 
| 10 | 
            -
                  #       all: {method: :current_invoice_get_all, handle: :current_invoice_handle},
         | 
| 11 | 
            -
                  #       send: {method: :current_invoice_create_from_data},
         | 
| 12 | 
            -
                  #       find_lines: {
         | 
| 13 | 
            -
                  #         method: :current_invoice_get_lines,
         | 
| 14 | 
            -
                  #         handle: :currentInvoiceHandle,
         | 
| 15 | 
            -
                  #         line_handle: :current_invoice_line_handle,
         | 
| 16 | 
            -
                  #       },
         | 
| 17 | 
            -
                  #       create_lines: {
         | 
| 18 | 
            -
                  #         method: :current_invoice_line_create_from_data_array,
         | 
| 19 | 
            -
                  #         line_data_handle: :CurrentInvoiceLineData,
         | 
| 20 | 
            -
                  #         model_handle: :InvoiceHandle,
         | 
| 21 | 
            -
                  #       },
         | 
| 22 | 
            -
                  #       find_all_lines: {
         | 
| 23 | 
            -
                  #         method: :current_invoice_line_get_data_array,
         | 
| 24 | 
            -
                  #         handle: :entityHandles,
         | 
| 25 | 
            -
                  #         data: :current_invoice_line_data,
         | 
| 26 | 
            -
                  #         line_handle: :CurrentInvoiceLineHandle,
         | 
| 27 | 
            -
                  #       },
         | 
| 28 | 
            -
                  #       find_all_records: {
         | 
| 29 | 
            -
                  #         method: :current_invoice_get_data_array,
         | 
| 30 | 
            -
                  #         handle: :CurrentInvoiceHandle,
         | 
| 31 | 
            -
                  #         data: :current_invoice_data,
         | 
| 32 | 
            -
                  #       },
         | 
| 33 | 
            -
                  #       destroy: {
         | 
| 34 | 
            -
                  #         method: :current_invoice_delete,
         | 
| 35 | 
            -
                  #         handle: :currentInvoiceHandle,
         | 
| 36 | 
            -
                  #       },
         | 
| 37 | 
            -
                  #     }
         | 
| 38 | 
            -
                  #   end
         | 
| 39 | 
            -
                  # end
         | 
| 7 | 
            +
                    modelize_response(response)
         | 
| 8 | 
            +
                  end
         | 
| 40 9 | 
             
                end
         | 
| 41 10 | 
             
              end
         | 
| 42 11 | 
             
            end
         | 
    
        data/lib/economic/rest.rb
    CHANGED
    
    | @@ -97,6 +97,11 @@ require "economic/distribution" | |
| 97 97 | 
             
            require "economic/departmental_distribution_repo"
         | 
| 98 98 |  | 
| 99 99 | 
             
            require "economic/account"
         | 
| 100 | 
            +
            require "economic/account_repo"
         | 
| 101 | 
            +
            require "economic/accounts_summed"
         | 
| 102 | 
            +
            require "economic/contra_account"
         | 
| 103 | 
            +
            require "economic/total_from_account"
         | 
| 104 | 
            +
            require "economic/vat_account"
         | 
| 100 105 |  | 
| 101 106 | 
             
            module Economic
         | 
| 102 107 | 
             
              class Demo
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: economic-rest
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.6. | 
| 4 | 
            +
              version: 0.6.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Peter Klogborg
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: exe
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date:  | 
| 11 | 
            +
            date: 2024-01-03 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: bundler
         | 
| @@ -225,13 +225,16 @@ files: | |
| 225 225 | 
             
            - bin/setup
         | 
| 226 226 | 
             
            - economic-rest.gemspec
         | 
| 227 227 | 
             
            - lib/economic/account.rb
         | 
| 228 | 
            +
            - lib/economic/account_repo.rb
         | 
| 228 229 | 
             
            - lib/economic/accounting_year.rb
         | 
| 229 230 | 
             
            - lib/economic/accounting_year_repo.rb
         | 
| 231 | 
            +
            - lib/economic/accounts_summed.rb
         | 
| 230 232 | 
             
            - lib/economic/attention.rb
         | 
| 231 233 | 
             
            - lib/economic/base.rb
         | 
| 232 234 | 
             
            - lib/economic/base_repo.rb
         | 
| 233 235 | 
             
            - lib/economic/company.rb
         | 
| 234 236 | 
             
            - lib/economic/concerns/soap_methods.rb
         | 
| 237 | 
            +
            - lib/economic/contra_account.rb
         | 
| 235 238 | 
             
            - lib/economic/cost_account.rb
         | 
| 236 239 | 
             
            - lib/economic/currency.rb
         | 
| 237 240 | 
             
            - lib/economic/customer.rb
         | 
| @@ -296,9 +299,11 @@ files: | |
| 296 299 | 
             
            - lib/economic/supplier_group.rb
         | 
| 297 300 | 
             
            - lib/economic/supplier_group_repo.rb
         | 
| 298 301 | 
             
            - lib/economic/supplier_repo.rb
         | 
| 302 | 
            +
            - lib/economic/total_from_account.rb
         | 
| 299 303 | 
             
            - lib/economic/unit.rb
         | 
| 300 304 | 
             
            - lib/economic/unit_repo.rb
         | 
| 301 305 | 
             
            - lib/economic/user.rb
         | 
| 306 | 
            +
            - lib/economic/vat_account.rb
         | 
| 302 307 | 
             
            - lib/economic/vat_type.rb
         | 
| 303 308 | 
             
            - lib/economic/vat_type_repo.rb
         | 
| 304 309 | 
             
            - lib/economic/vat_zone.rb
         | 
| @@ -324,7 +329,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 324 329 | 
             
                - !ruby/object:Gem::Version
         | 
| 325 330 | 
             
                  version: '0'
         | 
| 326 331 | 
             
            requirements: []
         | 
| 327 | 
            -
            rubygems_version: 3.1. | 
| 332 | 
            +
            rubygems_version: 3.1.4
         | 
| 328 333 | 
             
            signing_key: 
         | 
| 329 334 | 
             
            specification_version: 4
         | 
| 330 335 | 
             
            summary: Ruby wrapper for the e-conomic REST API, that aims at making working with
         |