dynaccount 0.10.0 → 0.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 +5 -5
- data/README.md +3 -1
- data/lib/dynaccount/action.rb +1 -1
- data/lib/dynaccount/debtor.rb +2 -1
- data/lib/dynaccount/debtor_invoice.rb +23 -1
- data/lib/dynaccount/debtor_invoice_product.rb +1 -1
- data/lib/dynaccount/dynaccount_object.rb +1 -1
- data/lib/dynaccount/version.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d4a42963975336016e927ffcb73b56958e2faea5d5a1ed848ea90b2043d57b3d
|
4
|
+
data.tar.gz: 14124236e9523f24ab04284c6f837fb34bddb66f0ebb14634063eead7a20b541
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 74323e7547347605e85dd69f52c89cf43052b92ff1c14ed0e397ef39d5f64a2553df38a78c8adbb85d5e095f9026ed1e36ba41272a5d92ed1d2bb659ba00f461
|
7
|
+
data.tar.gz: aca2eac421b6203ca8d19d1ee108940503ef21e967100257dfc7f4b875d5999ecb1b90181ee3ce8a41e2c7db2b51958836f044fe8cff60a43cc67ee45920dca9
|
data/README.md
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
# Dynaccount
|
2
|
+
[](https://badge.fury.io/rb/dynaccount)
|
3
|
+
|
2
4
|
This dynaccount gem is created to create an ActiveRecord-like interaction to [Dynaccount](https://dynaccount.com), accounting system's API.
|
3
5
|
|
4
|
-
The current API-version is `
|
6
|
+
The current API-version is `v7`.
|
5
7
|
|
6
8
|
## Usage
|
7
9
|
|
data/lib/dynaccount/action.rb
CHANGED
data/lib/dynaccount/debtor.rb
CHANGED
@@ -1,7 +1,29 @@
|
|
1
1
|
module Dynaccount
|
2
2
|
class DebtorInvoice < DynaccountObject
|
3
3
|
def self.ignore_put
|
4
|
-
[
|
4
|
+
[
|
5
|
+
:id,
|
6
|
+
:is_booked,
|
7
|
+
:is_system,
|
8
|
+
:is_matched,
|
9
|
+
:is_reminder,
|
10
|
+
:is_credited,
|
11
|
+
:is_credited_complete,
|
12
|
+
:is_subscription,
|
13
|
+
:module_id,
|
14
|
+
:time_due,
|
15
|
+
:invoice_id_,
|
16
|
+
:currency_rate,
|
17
|
+
:sha1_ref,
|
18
|
+
:is_seen,
|
19
|
+
:fi_payment_id_,
|
20
|
+
:accountoff_id,
|
21
|
+
:vat_amount,
|
22
|
+
:total_amount,
|
23
|
+
:total_weight,
|
24
|
+
:profit_amount,
|
25
|
+
:public_url
|
26
|
+
]
|
5
27
|
end
|
6
28
|
|
7
29
|
def self.api_path
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Dynaccount
|
2
2
|
class DebtorInvoiceProduct < DynaccountObject
|
3
3
|
def self.ignore_put
|
4
|
-
[:id, :product_id, :qty_credited, :is_list_listing, :is_list_pricing, :vat_amount, :total_amount, :total_weight, :profit_amount]
|
4
|
+
[:id, :product_id, :qty_credited, :is_list_listing, :is_list_pricing, :vat_amount, :vatcode_type, :total_amount, :total_weight, :profit_amount]
|
5
5
|
end
|
6
6
|
|
7
7
|
def self.api_path
|
@@ -75,7 +75,7 @@ module Dynaccount
|
|
75
75
|
end
|
76
76
|
|
77
77
|
def self.url(id, action, params = {})
|
78
|
-
url = "/
|
78
|
+
url = "/v7/#{Dynaccount.api_id}/#{Dynaccount.api_key}/#{action}/#{api_path}/#{"#{id}/" unless id.nil?}"
|
79
79
|
url += "?" + params.map do |k,v|
|
80
80
|
"#{k}=#{v.to_s.gsub(/[^a-zA-Z0-9_\-.]/n) { sprintf("%%%02X", $&.unpack("C")[0]) }.encode('utf-8')}"
|
81
81
|
end.sort.join('&') if params.any?
|
data/lib/dynaccount/version.rb
CHANGED
metadata
CHANGED
@@ -1,35 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynaccount
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frederik Spang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "<"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '3'
|
20
17
|
- - ">="
|
21
18
|
- !ruby/object:Gem::Version
|
22
19
|
version: '1.8'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '3'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- - "<"
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: '3'
|
30
27
|
- - ">="
|
31
28
|
- !ruby/object:Gem::Version
|
32
29
|
version: '1.8'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '3'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: faraday
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -159,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
159
|
version: '0'
|
160
160
|
requirements: []
|
161
161
|
rubyforge_project:
|
162
|
-
rubygems_version: 2.
|
162
|
+
rubygems_version: 2.7.8
|
163
163
|
signing_key:
|
164
164
|
specification_version: 4
|
165
165
|
summary: The dynaccount gem is an module-based integration for Dynaccount
|