QNE 0.7.2 → 0.8.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 +4 -4
- data/Gemfile.lock +8 -8
- data/lib/QNE/customer_receipt/create.rb +21 -0
- data/lib/QNE/version.rb +1 -1
- data/lib/connection.rb +5 -0
- data/lib/customer_receipts.rb +17 -0
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bfcb0bccef66061d74adbb48ecf4ea2257706c617e2f81a3d74e64840a6bfb7d
|
|
4
|
+
data.tar.gz: 7ab084026ffc578fa66cc753c23289576651163747dbdf5c53e721f47c6d19ef
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6055f791496d3dfb202b3c8a300e8469e740b1900bf982a242271c1dd33284965704c1554e13e5982b79f719b6b613e046bcd96a4db1b3f1adfcbdd8d948273f
|
|
7
|
+
data.tar.gz: cee1b456d4af726070df6a1229614444b55b58e8f28fd946ecb2e91531075d95807e7a0a1a419ee4b7ff2a02ce10cd25a7a2f4cafe1ec9f63bd38e5e95d3d53d
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
QNE (0.
|
|
4
|
+
QNE (0.8.0)
|
|
5
5
|
faraday (>= 1.10)
|
|
6
6
|
faraday-net_http_persistent (>= 1.2)
|
|
7
7
|
faraday-retry
|
|
@@ -13,13 +13,13 @@ GEM
|
|
|
13
13
|
addressable (2.9.0)
|
|
14
14
|
public_suffix (>= 2.0.2, < 8.0)
|
|
15
15
|
ast (2.4.3)
|
|
16
|
-
bigdecimal (4.1.
|
|
16
|
+
bigdecimal (4.1.3)
|
|
17
17
|
connection_pool (3.0.2)
|
|
18
18
|
crack (1.0.1)
|
|
19
19
|
bigdecimal
|
|
20
20
|
rexml
|
|
21
21
|
diff-lcs (1.6.2)
|
|
22
|
-
faraday (2.14.
|
|
22
|
+
faraday (2.14.4)
|
|
23
23
|
faraday-net_http (>= 2.0, < 3.5)
|
|
24
24
|
json
|
|
25
25
|
logger
|
|
@@ -31,7 +31,7 @@ GEM
|
|
|
31
31
|
faraday-retry (2.4.0)
|
|
32
32
|
faraday (~> 2.0)
|
|
33
33
|
hashdiff (1.2.1)
|
|
34
|
-
json (
|
|
34
|
+
json (3.0.2)
|
|
35
35
|
language_server-protocol (3.17.0.6)
|
|
36
36
|
lint_roller (1.1.0)
|
|
37
37
|
logger (1.7.0)
|
|
@@ -39,7 +39,7 @@ GEM
|
|
|
39
39
|
uri (>= 0.11.1)
|
|
40
40
|
net-http-persistent (4.0.8)
|
|
41
41
|
connection_pool (>= 2.2.4, < 4)
|
|
42
|
-
parallel (2.
|
|
42
|
+
parallel (2.2.0)
|
|
43
43
|
parser (3.3.12.0)
|
|
44
44
|
ast (~> 2.4.1)
|
|
45
45
|
racc
|
|
@@ -63,8 +63,8 @@ GEM
|
|
|
63
63
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
64
64
|
rspec-support (~> 3.13.0)
|
|
65
65
|
rspec-support (3.13.7)
|
|
66
|
-
rubocop (1.
|
|
67
|
-
json (
|
|
66
|
+
rubocop (1.91.0)
|
|
67
|
+
json (>= 2.3)
|
|
68
68
|
language_server-protocol (~> 3.17.0.2)
|
|
69
69
|
lint_roller (~> 1.1.0)
|
|
70
70
|
parallel (>= 1.10)
|
|
@@ -82,7 +82,7 @@ GEM
|
|
|
82
82
|
unicode-emoji (~> 4.1)
|
|
83
83
|
unicode-emoji (4.2.0)
|
|
84
84
|
uri (1.1.1)
|
|
85
|
-
webmock (3.26.
|
|
85
|
+
webmock (3.26.4)
|
|
86
86
|
addressable (>= 2.8.0)
|
|
87
87
|
crack (>= 0.3.2)
|
|
88
88
|
hashdiff (>= 0.4.0, < 2.0.0)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module QNE
|
|
4
|
+
module CustomerReceipt
|
|
5
|
+
class Create
|
|
6
|
+
PATH = '/api/CustomerReceipts'
|
|
7
|
+
|
|
8
|
+
def initialize(conn, request_body:)
|
|
9
|
+
@conn = conn
|
|
10
|
+
@request_body = request_body
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def call
|
|
14
|
+
@conn.post(PATH) do |req|
|
|
15
|
+
req.headers['Content-Type'] = 'application/json'
|
|
16
|
+
req.body = @request_body.to_json
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
data/lib/QNE/version.rb
CHANGED
data/lib/connection.rb
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
require_relative 'agents'
|
|
4
4
|
require_relative 'customers'
|
|
5
5
|
require_relative 'customer_categories'
|
|
6
|
+
require_relative 'customer_receipts'
|
|
6
7
|
require_relative 'default_tax_code'
|
|
7
8
|
require_relative 'sales_invoices'
|
|
8
9
|
require_relative 'sales_orders'
|
|
@@ -42,6 +43,10 @@ module QNE
|
|
|
42
43
|
@customer_categories ||= QNE::CustomerCategories.new(connection)
|
|
43
44
|
end
|
|
44
45
|
|
|
46
|
+
def customer_receipts
|
|
47
|
+
@customer_receipts ||= QNE::CustomerReceipts.new(connection)
|
|
48
|
+
end
|
|
49
|
+
|
|
45
50
|
def default_tax_code
|
|
46
51
|
@default_tax_code ||= QNE::DefaultTaxCode.new(connection).call
|
|
47
52
|
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'QNE/customer_receipt/create'
|
|
4
|
+
|
|
5
|
+
module QNE
|
|
6
|
+
class CustomerReceipts < Base
|
|
7
|
+
include ::QNE::QueryBuilder
|
|
8
|
+
|
|
9
|
+
def create(request_body)
|
|
10
|
+
@response = QNE::CustomerReceipt::Create.new(
|
|
11
|
+
conn, request_body: request_body
|
|
12
|
+
).call
|
|
13
|
+
|
|
14
|
+
parse_to_json(@response.body)
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: QNE
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nujian Den Mark Meralpis
|
|
@@ -105,6 +105,7 @@ files:
|
|
|
105
105
|
- lib/QNE/customer/show.rb
|
|
106
106
|
- lib/QNE/customer/update.rb
|
|
107
107
|
- lib/QNE/customer_category/all.rb
|
|
108
|
+
- lib/QNE/customer_receipt/create.rb
|
|
108
109
|
- lib/QNE/sales_invoice/all.rb
|
|
109
110
|
- lib/QNE/sales_invoice/create.rb
|
|
110
111
|
- lib/QNE/sales_invoice/download.rb
|
|
@@ -132,6 +133,7 @@ files:
|
|
|
132
133
|
- lib/base.rb
|
|
133
134
|
- lib/connection.rb
|
|
134
135
|
- lib/customer_categories.rb
|
|
136
|
+
- lib/customer_receipts.rb
|
|
135
137
|
- lib/customers.rb
|
|
136
138
|
- lib/default_tax_code.rb
|
|
137
139
|
- lib/query_builder.rb
|