economic-rest 0.6.1 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d725fc6ea433dd772584081b4e7880d395b732f84ee5ef5c7aafe9cef6f52236
4
- data.tar.gz: bfc023ee2ac0b131d64662dba0b8859d687432cb37c9636d7cd66bfdb2401597
3
+ metadata.gz: f49b4c397e253aaf611559c643192fc9ca23e8822fe527cdd9b6645c569f4f37
4
+ data.tar.gz: 8747aa2607e1b41b58d3bf5f6f1e732f5311bee0301955033343add6f522075c
5
5
  SHA512:
6
- metadata.gz: f68d582a5e3118e7a9a56ec9302f993f8fabde03220e70782aa9cc200664eb586e12151addf44fdd474ccf59bb907843f3471f63ef31ca0158f03cc585c97fbc
7
- data.tar.gz: cc97a9ed72046933f76bdff0624a119197a1697e0b17e8c8edcad434dc84aa7d30ef74a43d6450af985ff7d08130270f573a18370d29ef88e1eb70968f88182e
6
+ metadata.gz: a48f32a09f78a79af6d7d50a8305ecbbddd0bc97107130f205d71f08cbfa01e8d12353b096239ba5066b8b7636ace2ac69bc78f2ad4ddc920c9b9eba492f075b
7
+ data.tar.gz: 732b01861d3e7d3afa07060e9f1b9150ada660ee077aa93e980f78872922b325f967adf20f5e7b3c8aab4bd29cbbfe3b312213952f8d949669e0a1f9a50478e8
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- git_source(:bitbucket) { |_repo_name| "https://bitbucket.org/traels/economic-rest" }
3
+ git_source(:github) { |_repo_name| "https://github.com/traels-it/economic-rest" }
4
4
 
5
5
  # Specify your gem's dependencies in economic-rest.gemspec
6
6
  gemspec
data/README.md CHANGED
@@ -71,7 +71,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
71
71
 
72
72
  ## Contributing
73
73
 
74
- Bug reports and pull requests are welcome on GitHub at https://bitbucket.org/traels/economic-rest. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
74
+ Bug reports and pull requests are welcome on GitHub at https://github.com/traels-it/economic-rest. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
75
75
 
76
76
  ## License
77
77
 
@@ -79,4 +79,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
79
79
 
80
80
  ## Code of Conduct
81
81
 
82
- Everyone interacting in the Economic::Rest project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://bitbucket.org/traels/economic-rest/blob/master/CODE_OF_CONDUCT.md).
82
+ Everyone interacting in the Economic::Rest project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/traels-it/economic-rest/blob/main/CODE_OF_CONDUCT.md).
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
  spec.summary = 'Ruby wrapper for the e-conomic REST API, that aims at making working with the API bearable.
12
12
  E-conomic is a web-based accounting system. For their marketing speak, see http://www.e-conomic.co.uk/about/. More details about their API at http://www.e-conomic.co.uk/integration/integration-partner/.
13
13
  The documentation can be found at https://restdocs.e-conomic.com'
14
- spec.homepage = "https://bitbucket.org/traels/economic-rest"
14
+ spec.homepage = "https://github.com/traels-it/economic-rest"
15
15
  spec.license = "MIT"
16
16
 
17
17
  # Specify which files should be added to the gem when it is released.
@@ -32,7 +32,7 @@ module Economic
32
32
  relation :layout, fields: [:layoutNumber]
33
33
  relation :paymentTerms, fields: [:paymentTermsNumber]
34
34
  # field :salesPerson
35
- # field :templates
35
+ field :templates
36
36
  # field :totals
37
37
  relation :vatZone, fields: [:vatZoneNumber]
38
38
  end
@@ -1,42 +1,11 @@
1
1
  module Economic
2
2
  module Invoices
3
3
  class DraftsRepo < Economic::Invoices::Repo
4
- # include Economic::SoapMethods
4
+ def self.template(customer)
5
+ response = send_request(method: :get, url: customer.templates["invoice"])
5
6
 
6
- # class << self
7
- # def soap_method_names
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
@@ -1,6 +1,11 @@
1
1
  module Economic
2
2
  module Orders
3
3
  class DraftsRepo < Economic::Orders::Repo
4
+ def self.template(customer)
5
+ response = send_request(method: :get, url: customer.templates["invoice"])
6
+
7
+ modelize_response(response)
8
+ end
4
9
  end
5
10
  end
6
11
  end
@@ -1,5 +1,5 @@
1
1
  module Economic
2
2
  module Rest
3
- VERSION = "0.6.1".freeze
3
+ VERSION = "0.6.3".freeze
4
4
  end
5
5
  end
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.1
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Klogborg
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-01 00:00:00.000000000 Z
11
+ date: 2024-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -206,7 +206,7 @@ dependencies:
206
206
  - - ">="
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
- description:
209
+ description:
210
210
  email:
211
211
  - klogborg@traels.it
212
212
  executables: []
@@ -310,11 +310,11 @@ files:
310
310
  - lib/economic/vat_zone_repo.rb
311
311
  - lib/economic/vendor_reference.rb
312
312
  - lib/economic/voucher.rb
313
- homepage: https://bitbucket.org/traels/economic-rest
313
+ homepage: https://github.com/traels-it/economic-rest
314
314
  licenses:
315
315
  - MIT
316
316
  metadata: {}
317
- post_install_message:
317
+ post_install_message:
318
318
  rdoc_options: []
319
319
  require_paths:
320
320
  - lib
@@ -329,8 +329,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
329
329
  - !ruby/object:Gem::Version
330
330
  version: '0'
331
331
  requirements: []
332
- rubygems_version: 3.0.3
333
- signing_key:
332
+ rubygems_version: 3.5.19
333
+ signing_key:
334
334
  specification_version: 4
335
335
  summary: Ruby wrapper for the e-conomic REST API, that aims at making working with
336
336
  the API bearable. E-conomic is a web-based accounting system. For their marketing