business-central 1.0.5 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +45 -32
- data/lib/business_central/client.rb +7 -52
- data/lib/business_central/exceptions.rb +11 -29
- data/lib/business_central/object/{attachment.rb → attachments.rb} +9 -11
- data/lib/business_central/object/base.rb +42 -114
- data/lib/business_central/object/companies.rb +19 -0
- data/lib/business_central/object/filter_query.rb +2 -0
- data/lib/business_central/object/object_helper.rb +10 -37
- data/lib/business_central/object/picture.rb +4 -40
- data/lib/business_central/object/request.rb +14 -15
- data/lib/business_central/object/response.rb +5 -1
- data/lib/business_central/object/url_builder.rb +16 -12
- data/lib/business_central/object/url_helper.rb +16 -2
- data/lib/business_central/version.rb +1 -1
- data/lib/business_central/web_service.rb +2 -0
- data/lib/business_central.rb +4 -55
- data/lib/refinements/strings.rb +42 -0
- data/test/business_central/client_test.rb +24 -0
- data/test/business_central/exceptions_test.rb +40 -0
- data/test/business_central/object/{attachment_test.rb → attachments_test.rb} +5 -6
- data/test/business_central/object/base_test.rb +59 -22
- data/test/business_central/object/{company_test.rb → companies_test.rb} +3 -21
- data/test/business_central/object/picture_test.rb +7 -16
- data/test/business_central/object/response_test.rb +5 -0
- data/test/business_central/web_service_test.rb +7 -2
- metadata +38 -167
- data/lib/business_central/object/account.rb +0 -13
- data/lib/business_central/object/aged_account_payable.rb +0 -13
- data/lib/business_central/object/aged_account_receivable.rb +0 -13
- data/lib/business_central/object/argument_helper.rb +0 -22
- data/lib/business_central/object/balance_sheet.rb +0 -13
- data/lib/business_central/object/cash_flow_statement.rb +0 -13
- data/lib/business_central/object/company.rb +0 -18
- data/lib/business_central/object/company_information.rb +0 -14
- data/lib/business_central/object/country_region.rb +0 -26
- data/lib/business_central/object/currency.rb +0 -29
- data/lib/business_central/object/customer.rb +0 -34
- data/lib/business_central/object/customer_financial_detail.rb +0 -13
- data/lib/business_central/object/customer_payment.rb +0 -43
- data/lib/business_central/object/customer_payment_journal.rb +0 -25
- data/lib/business_central/object/customer_sale.rb +0 -13
- data/lib/business_central/object/default_dimension.rb +0 -51
- data/lib/business_central/object/dimension.rb +0 -20
- data/lib/business_central/object/dimension_line.rb +0 -37
- data/lib/business_central/object/dimension_value.rb +0 -28
- data/lib/business_central/object/employee.rb +0 -21
- data/lib/business_central/object/general_ledger_entry.rb +0 -13
- data/lib/business_central/object/income_statement.rb +0 -13
- data/lib/business_central/object/irs1099_code.rb +0 -16
- data/lib/business_central/object/item.rb +0 -47
- data/lib/business_central/object/item_category.rb +0 -16
- data/lib/business_central/object/journal.rb +0 -29
- data/lib/business_central/object/journal_line.rb +0 -48
- data/lib/business_central/object/payment_method.rb +0 -16
- data/lib/business_central/object/payment_term.rb +0 -16
- data/lib/business_central/object/purchase_invoice.rb +0 -69
- data/lib/business_central/object/purchase_invoice_line.rb +0 -37
- data/lib/business_central/object/retained_earning_statement.rb +0 -13
- data/lib/business_central/object/sales_credit_memo.rb +0 -20
- data/lib/business_central/object/sales_credit_memo_line.rb +0 -30
- data/lib/business_central/object/sales_invoice.rb +0 -62
- data/lib/business_central/object/sales_invoice_line.rb +0 -30
- data/lib/business_central/object/sales_order.rb +0 -20
- data/lib/business_central/object/sales_order_line.rb +0 -30
- data/lib/business_central/object/sales_quote.rb +0 -20
- data/lib/business_central/object/sales_quote_line.rb +0 -30
- data/lib/business_central/object/shipment_method.rb +0 -16
- data/lib/business_central/object/subscription.rb +0 -16
- data/lib/business_central/object/tax_area.rb +0 -16
- data/lib/business_central/object/tax_group.rb +0 -16
- data/lib/business_central/object/time_registration_entry.rb +0 -16
- data/lib/business_central/object/trial_balance.rb +0 -13
- data/lib/business_central/object/units_of_measure.rb +0 -16
- data/lib/business_central/object/validation.rb +0 -57
- data/lib/business_central/object/vendor.rb +0 -42
- data/lib/business_central/object/vendor_purchase.rb +0 -13
- data/lib/core_ext/string.rb +0 -31
- data/test/business_central/object/account_test.rb +0 -67
- data/test/business_central/object/aged_account_payable_test.rb +0 -61
- data/test/business_central/object/aged_account_receivable_test.rb +0 -61
- data/test/business_central/object/balance_sheet_test.rb +0 -61
- data/test/business_central/object/cash_flow_statement_test.rb +0 -61
- data/test/business_central/object/company_information_test.rb +0 -81
- data/test/business_central/object/country_region_test.rb +0 -129
- data/test/business_central/object/currency_test.rb +0 -150
- data/test/business_central/object/customer_financial_detail_test.rb +0 -68
- data/test/business_central/object/customer_payment_journal_test.rb +0 -134
- data/test/business_central/object/customer_payment_test.rb +0 -141
- data/test/business_central/object/customer_sale_test.rb +0 -72
- data/test/business_central/object/customer_test.rb +0 -168
- data/test/business_central/object/default_dimension_test.rb +0 -170
- data/test/business_central/object/dimension_line_test.rb +0 -165
- data/test/business_central/object/dimension_test.rb +0 -65
- data/test/business_central/object/dimension_value_test.rb +0 -68
- data/test/business_central/object/employee_test.rb +0 -141
- data/test/business_central/object/general_ledger_entry_test.rb +0 -82
- data/test/business_central/object/income_statement_test.rb +0 -82
- data/test/business_central/object/irs1099_code_test.rb +0 -124
- data/test/business_central/object/item_category_test.rb +0 -122
- data/test/business_central/object/item_test.rb +0 -121
- data/test/business_central/object/journal_line_test.rb +0 -152
- data/test/business_central/object/journal_test.rb +0 -144
- data/test/business_central/object/payment_method_test.rb +0 -134
- data/test/business_central/object/payment_term_test.rb +0 -134
- data/test/business_central/object/purchase_invoice_line_test.rb +0 -123
- data/test/business_central/object/purchase_invoice_test.rb +0 -119
- data/test/business_central/object/retained_earning_statement_test.rb +0 -52
- data/test/business_central/object/sales_credit_memo_line_test.rb +0 -134
- data/test/business_central/object/sales_credit_memo_test.rb +0 -146
- data/test/business_central/object/sales_invoice_line_test.rb +0 -164
- data/test/business_central/object/sales_invoice_test.rb +0 -156
- data/test/business_central/object/sales_order_line_test.rb +0 -134
- data/test/business_central/object/sales_order_test.rb +0 -146
- data/test/business_central/object/sales_quote_line_test.rb +0 -134
- data/test/business_central/object/sales_quote_test.rb +0 -146
- data/test/business_central/object/shipment_method_test.rb +0 -133
- data/test/business_central/object/subscription_test.rb +0 -126
- data/test/business_central/object/tax_area_test.rb +0 -126
- data/test/business_central/object/tax_group_test.rb +0 -126
- data/test/business_central/object/time_registration_entry_test.rb +0 -126
- data/test/business_central/object/trial_balance_test.rb +0 -82
- data/test/business_central/object/units_of_measure_test.rb +0 -126
- data/test/business_central/object/validation_test.rb +0 -62
- data/test/business_central/object/vendor_purchase_test.rb +0 -82
- data/test/business_central/object/vendor_test.rb +0 -119
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: business-central
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jarrad Muir
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.2'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2.
|
26
|
+
version: '2.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: byebug
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,42 +44,42 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '5.
|
47
|
+
version: '5.14'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '5.
|
54
|
+
version: '5.14'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: minitest-focus
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
61
|
+
version: '1.2'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.
|
68
|
+
version: '1.2'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: minitest-reporters
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.4
|
75
|
+
version: '1.4'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 1.4
|
82
|
+
version: '1.4'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rake
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,34 +94,48 @@ dependencies:
|
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '13.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1.32'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1.32'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: simplecov
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
115
|
- - "~>"
|
102
116
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
117
|
+
version: '0.21'
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
122
|
- - "~>"
|
109
123
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
124
|
+
version: '0.21'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: webmock
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
129
|
- - "~>"
|
116
130
|
- !ruby/object:Gem::Version
|
117
|
-
version: '3.
|
131
|
+
version: '3.12'
|
118
132
|
type: :development
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
136
|
- - "~>"
|
123
137
|
- !ruby/object:Gem::Version
|
124
|
-
version: '3.
|
138
|
+
version: '3.12'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: oauth2
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -148,124 +162,28 @@ files:
|
|
148
162
|
- lib/business_central.rb
|
149
163
|
- lib/business_central/client.rb
|
150
164
|
- lib/business_central/exceptions.rb
|
151
|
-
- lib/business_central/object/
|
152
|
-
- lib/business_central/object/aged_account_payable.rb
|
153
|
-
- lib/business_central/object/aged_account_receivable.rb
|
154
|
-
- lib/business_central/object/argument_helper.rb
|
155
|
-
- lib/business_central/object/attachment.rb
|
156
|
-
- lib/business_central/object/balance_sheet.rb
|
165
|
+
- lib/business_central/object/attachments.rb
|
157
166
|
- lib/business_central/object/base.rb
|
158
|
-
- lib/business_central/object/
|
159
|
-
- lib/business_central/object/company.rb
|
160
|
-
- lib/business_central/object/company_information.rb
|
161
|
-
- lib/business_central/object/country_region.rb
|
162
|
-
- lib/business_central/object/currency.rb
|
163
|
-
- lib/business_central/object/customer.rb
|
164
|
-
- lib/business_central/object/customer_financial_detail.rb
|
165
|
-
- lib/business_central/object/customer_payment.rb
|
166
|
-
- lib/business_central/object/customer_payment_journal.rb
|
167
|
-
- lib/business_central/object/customer_sale.rb
|
168
|
-
- lib/business_central/object/default_dimension.rb
|
169
|
-
- lib/business_central/object/dimension.rb
|
170
|
-
- lib/business_central/object/dimension_line.rb
|
171
|
-
- lib/business_central/object/dimension_value.rb
|
172
|
-
- lib/business_central/object/employee.rb
|
167
|
+
- lib/business_central/object/companies.rb
|
173
168
|
- lib/business_central/object/filter_query.rb
|
174
|
-
- lib/business_central/object/general_ledger_entry.rb
|
175
|
-
- lib/business_central/object/income_statement.rb
|
176
|
-
- lib/business_central/object/irs1099_code.rb
|
177
|
-
- lib/business_central/object/item.rb
|
178
|
-
- lib/business_central/object/item_category.rb
|
179
|
-
- lib/business_central/object/journal.rb
|
180
|
-
- lib/business_central/object/journal_line.rb
|
181
169
|
- lib/business_central/object/object_helper.rb
|
182
|
-
- lib/business_central/object/payment_method.rb
|
183
|
-
- lib/business_central/object/payment_term.rb
|
184
170
|
- lib/business_central/object/picture.rb
|
185
|
-
- lib/business_central/object/purchase_invoice.rb
|
186
|
-
- lib/business_central/object/purchase_invoice_line.rb
|
187
171
|
- lib/business_central/object/request.rb
|
188
172
|
- lib/business_central/object/response.rb
|
189
|
-
- lib/business_central/object/retained_earning_statement.rb
|
190
|
-
- lib/business_central/object/sales_credit_memo.rb
|
191
|
-
- lib/business_central/object/sales_credit_memo_line.rb
|
192
|
-
- lib/business_central/object/sales_invoice.rb
|
193
|
-
- lib/business_central/object/sales_invoice_line.rb
|
194
|
-
- lib/business_central/object/sales_order.rb
|
195
|
-
- lib/business_central/object/sales_order_line.rb
|
196
|
-
- lib/business_central/object/sales_quote.rb
|
197
|
-
- lib/business_central/object/sales_quote_line.rb
|
198
|
-
- lib/business_central/object/shipment_method.rb
|
199
|
-
- lib/business_central/object/subscription.rb
|
200
|
-
- lib/business_central/object/tax_area.rb
|
201
|
-
- lib/business_central/object/tax_group.rb
|
202
|
-
- lib/business_central/object/time_registration_entry.rb
|
203
|
-
- lib/business_central/object/trial_balance.rb
|
204
|
-
- lib/business_central/object/units_of_measure.rb
|
205
173
|
- lib/business_central/object/url_builder.rb
|
206
174
|
- lib/business_central/object/url_helper.rb
|
207
|
-
- lib/business_central/object/validation.rb
|
208
|
-
- lib/business_central/object/vendor.rb
|
209
|
-
- lib/business_central/object/vendor_purchase.rb
|
210
175
|
- lib/business_central/version.rb
|
211
176
|
- lib/business_central/web_service.rb
|
212
|
-
- lib/
|
177
|
+
- lib/refinements/strings.rb
|
213
178
|
- test/business_central/client_test.rb
|
214
|
-
- test/business_central/
|
215
|
-
- test/business_central/object/
|
216
|
-
- test/business_central/object/aged_account_receivable_test.rb
|
217
|
-
- test/business_central/object/attachment_test.rb
|
218
|
-
- test/business_central/object/balance_sheet_test.rb
|
179
|
+
- test/business_central/exceptions_test.rb
|
180
|
+
- test/business_central/object/attachments_test.rb
|
219
181
|
- test/business_central/object/base_test.rb
|
220
|
-
- test/business_central/object/
|
221
|
-
- test/business_central/object/company_information_test.rb
|
222
|
-
- test/business_central/object/company_test.rb
|
223
|
-
- test/business_central/object/country_region_test.rb
|
224
|
-
- test/business_central/object/currency_test.rb
|
225
|
-
- test/business_central/object/customer_financial_detail_test.rb
|
226
|
-
- test/business_central/object/customer_payment_journal_test.rb
|
227
|
-
- test/business_central/object/customer_payment_test.rb
|
228
|
-
- test/business_central/object/customer_sale_test.rb
|
229
|
-
- test/business_central/object/customer_test.rb
|
230
|
-
- test/business_central/object/default_dimension_test.rb
|
231
|
-
- test/business_central/object/dimension_line_test.rb
|
232
|
-
- test/business_central/object/dimension_test.rb
|
233
|
-
- test/business_central/object/dimension_value_test.rb
|
234
|
-
- test/business_central/object/employee_test.rb
|
182
|
+
- test/business_central/object/companies_test.rb
|
235
183
|
- test/business_central/object/filter_query_test.rb
|
236
|
-
- test/business_central/object/general_ledger_entry_test.rb
|
237
|
-
- test/business_central/object/income_statement_test.rb
|
238
|
-
- test/business_central/object/irs1099_code_test.rb
|
239
|
-
- test/business_central/object/item_category_test.rb
|
240
|
-
- test/business_central/object/item_test.rb
|
241
|
-
- test/business_central/object/journal_line_test.rb
|
242
|
-
- test/business_central/object/journal_test.rb
|
243
|
-
- test/business_central/object/payment_method_test.rb
|
244
|
-
- test/business_central/object/payment_term_test.rb
|
245
184
|
- test/business_central/object/picture_test.rb
|
246
|
-
- test/business_central/object/purchase_invoice_line_test.rb
|
247
|
-
- test/business_central/object/purchase_invoice_test.rb
|
248
185
|
- test/business_central/object/request_test.rb
|
249
186
|
- test/business_central/object/response_test.rb
|
250
|
-
- test/business_central/object/retained_earning_statement_test.rb
|
251
|
-
- test/business_central/object/sales_credit_memo_line_test.rb
|
252
|
-
- test/business_central/object/sales_credit_memo_test.rb
|
253
|
-
- test/business_central/object/sales_invoice_line_test.rb
|
254
|
-
- test/business_central/object/sales_invoice_test.rb
|
255
|
-
- test/business_central/object/sales_order_line_test.rb
|
256
|
-
- test/business_central/object/sales_order_test.rb
|
257
|
-
- test/business_central/object/sales_quote_line_test.rb
|
258
|
-
- test/business_central/object/sales_quote_test.rb
|
259
|
-
- test/business_central/object/shipment_method_test.rb
|
260
|
-
- test/business_central/object/subscription_test.rb
|
261
|
-
- test/business_central/object/tax_area_test.rb
|
262
|
-
- test/business_central/object/tax_group_test.rb
|
263
|
-
- test/business_central/object/time_registration_entry_test.rb
|
264
|
-
- test/business_central/object/trial_balance_test.rb
|
265
|
-
- test/business_central/object/units_of_measure_test.rb
|
266
|
-
- test/business_central/object/validation_test.rb
|
267
|
-
- test/business_central/object/vendor_purchase_test.rb
|
268
|
-
- test/business_central/object/vendor_test.rb
|
269
187
|
- test/business_central/web_service_test.rb
|
270
188
|
- test/business_central_test.rb
|
271
189
|
- test/test_helper.rb
|
@@ -290,67 +208,20 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
290
208
|
- !ruby/object:Gem::Version
|
291
209
|
version: '0'
|
292
210
|
requirements: []
|
293
|
-
rubygems_version: 3.
|
211
|
+
rubygems_version: 3.1.6
|
294
212
|
signing_key:
|
295
213
|
specification_version: 4
|
296
214
|
summary: Integration library for Microsoft Dynamic365 business central
|
297
215
|
test_files:
|
298
216
|
- test/business_central/client_test.rb
|
299
|
-
- test/business_central/
|
300
|
-
- test/business_central/object/
|
301
|
-
- test/business_central/object/aged_account_receivable_test.rb
|
302
|
-
- test/business_central/object/attachment_test.rb
|
303
|
-
- test/business_central/object/balance_sheet_test.rb
|
217
|
+
- test/business_central/exceptions_test.rb
|
218
|
+
- test/business_central/object/attachments_test.rb
|
304
219
|
- test/business_central/object/base_test.rb
|
305
|
-
- test/business_central/object/
|
306
|
-
- test/business_central/object/company_information_test.rb
|
307
|
-
- test/business_central/object/company_test.rb
|
308
|
-
- test/business_central/object/country_region_test.rb
|
309
|
-
- test/business_central/object/currency_test.rb
|
310
|
-
- test/business_central/object/customer_financial_detail_test.rb
|
311
|
-
- test/business_central/object/customer_payment_journal_test.rb
|
312
|
-
- test/business_central/object/customer_payment_test.rb
|
313
|
-
- test/business_central/object/customer_sale_test.rb
|
314
|
-
- test/business_central/object/customer_test.rb
|
315
|
-
- test/business_central/object/default_dimension_test.rb
|
316
|
-
- test/business_central/object/dimension_line_test.rb
|
317
|
-
- test/business_central/object/dimension_test.rb
|
318
|
-
- test/business_central/object/dimension_value_test.rb
|
319
|
-
- test/business_central/object/employee_test.rb
|
220
|
+
- test/business_central/object/companies_test.rb
|
320
221
|
- test/business_central/object/filter_query_test.rb
|
321
|
-
- test/business_central/object/general_ledger_entry_test.rb
|
322
|
-
- test/business_central/object/income_statement_test.rb
|
323
|
-
- test/business_central/object/irs1099_code_test.rb
|
324
|
-
- test/business_central/object/item_category_test.rb
|
325
|
-
- test/business_central/object/item_test.rb
|
326
|
-
- test/business_central/object/journal_line_test.rb
|
327
|
-
- test/business_central/object/journal_test.rb
|
328
|
-
- test/business_central/object/payment_method_test.rb
|
329
|
-
- test/business_central/object/payment_term_test.rb
|
330
222
|
- test/business_central/object/picture_test.rb
|
331
|
-
- test/business_central/object/purchase_invoice_line_test.rb
|
332
|
-
- test/business_central/object/purchase_invoice_test.rb
|
333
223
|
- test/business_central/object/request_test.rb
|
334
224
|
- test/business_central/object/response_test.rb
|
335
|
-
- test/business_central/object/retained_earning_statement_test.rb
|
336
|
-
- test/business_central/object/sales_credit_memo_line_test.rb
|
337
|
-
- test/business_central/object/sales_credit_memo_test.rb
|
338
|
-
- test/business_central/object/sales_invoice_line_test.rb
|
339
|
-
- test/business_central/object/sales_invoice_test.rb
|
340
|
-
- test/business_central/object/sales_order_line_test.rb
|
341
|
-
- test/business_central/object/sales_order_test.rb
|
342
|
-
- test/business_central/object/sales_quote_line_test.rb
|
343
|
-
- test/business_central/object/sales_quote_test.rb
|
344
|
-
- test/business_central/object/shipment_method_test.rb
|
345
|
-
- test/business_central/object/subscription_test.rb
|
346
|
-
- test/business_central/object/tax_area_test.rb
|
347
|
-
- test/business_central/object/tax_group_test.rb
|
348
|
-
- test/business_central/object/time_registration_entry_test.rb
|
349
|
-
- test/business_central/object/trial_balance_test.rb
|
350
|
-
- test/business_central/object/units_of_measure_test.rb
|
351
|
-
- test/business_central/object/validation_test.rb
|
352
|
-
- test/business_central/object/vendor_purchase_test.rb
|
353
|
-
- test/business_central/object/vendor_test.rb
|
354
225
|
- test/business_central/web_service_test.rb
|
355
226
|
- test/business_central_test.rb
|
356
227
|
- test/test_helper.rb
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module BusinessCentral
|
4
|
-
module Object
|
5
|
-
module ArgumentHelper
|
6
|
-
def id(argument)
|
7
|
-
return @id if instance_variable_defined?('@id') && !@id.nil?
|
8
|
-
return argument.fetch(:id, '') if !argument.nil?
|
9
|
-
|
10
|
-
nil
|
11
|
-
end
|
12
|
-
|
13
|
-
def company_id(argument)
|
14
|
-
return @client.default_company_id if !@client.default_company_id.nil?
|
15
|
-
return @company_id if instance_variable_defined?('@company_id') && !@company_id.nil?
|
16
|
-
return argument.fetch(:company_id, '') if !argument.nil?
|
17
|
-
|
18
|
-
nil
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module BusinessCentral
|
4
|
-
module Object
|
5
|
-
class Company < Base
|
6
|
-
OBJECT = 'companies'
|
7
|
-
|
8
|
-
OBJECT_METHODS = [
|
9
|
-
:get
|
10
|
-
].freeze
|
11
|
-
|
12
|
-
def initialize(client, _args)
|
13
|
-
super(client)
|
14
|
-
@parent_path = []
|
15
|
-
end
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module BusinessCentral
|
4
|
-
module Object
|
5
|
-
class CountryRegion < Base
|
6
|
-
OBJECT = 'countriesRegions'
|
7
|
-
|
8
|
-
OBJECT_VALIDATION = {
|
9
|
-
code: {
|
10
|
-
required: true
|
11
|
-
},
|
12
|
-
display_name: {
|
13
|
-
required: true,
|
14
|
-
maximum_length: 100
|
15
|
-
}
|
16
|
-
}.freeze
|
17
|
-
|
18
|
-
OBJECT_METHODS = %i[
|
19
|
-
get
|
20
|
-
post
|
21
|
-
patch
|
22
|
-
delete
|
23
|
-
].freeze
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module BusinessCentral
|
4
|
-
module Object
|
5
|
-
class Currency < Base
|
6
|
-
OBJECT = 'currencies'
|
7
|
-
|
8
|
-
OBJECT_VALIDATION = {
|
9
|
-
code: {
|
10
|
-
required: true
|
11
|
-
},
|
12
|
-
display_name: {
|
13
|
-
required: true,
|
14
|
-
maximum_length: 100
|
15
|
-
},
|
16
|
-
symbol: {
|
17
|
-
required: true
|
18
|
-
}
|
19
|
-
}.freeze
|
20
|
-
|
21
|
-
OBJECT_METHODS = %i[
|
22
|
-
get
|
23
|
-
post
|
24
|
-
patch
|
25
|
-
delete
|
26
|
-
].freeze
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,34 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module BusinessCentral
|
4
|
-
module Object
|
5
|
-
class Customer < Base
|
6
|
-
extend BusinessCentral::Object::ObjectHelper
|
7
|
-
|
8
|
-
OBJECT = 'customers'
|
9
|
-
|
10
|
-
OBJECT_VALIDATION = {
|
11
|
-
display_name: {
|
12
|
-
required: true,
|
13
|
-
maximum_length: 100
|
14
|
-
},
|
15
|
-
type: {
|
16
|
-
inclusion_of: %w[
|
17
|
-
Company
|
18
|
-
Person
|
19
|
-
]
|
20
|
-
}
|
21
|
-
}.freeze
|
22
|
-
|
23
|
-
OBJECT_METHODS = %i[
|
24
|
-
get
|
25
|
-
post
|
26
|
-
patch
|
27
|
-
delete
|
28
|
-
].freeze
|
29
|
-
|
30
|
-
navigation :default_dimension
|
31
|
-
navigation :picture
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
@@ -1,43 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module BusinessCentral
|
4
|
-
module Object
|
5
|
-
class CustomerPayment < Base
|
6
|
-
OBJECT = 'customerPayments'
|
7
|
-
|
8
|
-
OBJECT_VALIDATION = {
|
9
|
-
customer_number: {
|
10
|
-
maximum_length: 20
|
11
|
-
},
|
12
|
-
contact_id: {
|
13
|
-
maximum_length: 250
|
14
|
-
},
|
15
|
-
posting_date: {
|
16
|
-
date: true
|
17
|
-
},
|
18
|
-
document_number: {
|
19
|
-
maximum_length: 20
|
20
|
-
},
|
21
|
-
external_document_number: {
|
22
|
-
maximum_length: 20
|
23
|
-
},
|
24
|
-
applies_to_invoice_number: {
|
25
|
-
maximum_length: 20
|
26
|
-
},
|
27
|
-
description: {
|
28
|
-
maximum_length: 50
|
29
|
-
},
|
30
|
-
comment: {
|
31
|
-
maximum_length: 250
|
32
|
-
}
|
33
|
-
}.freeze
|
34
|
-
|
35
|
-
OBJECT_METHODS = %i[
|
36
|
-
get
|
37
|
-
post
|
38
|
-
patch
|
39
|
-
delete
|
40
|
-
].freeze
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module BusinessCentral
|
4
|
-
module Object
|
5
|
-
class CustomerPaymentJournal < Base
|
6
|
-
OBJECT = 'customerPaymentJournals'
|
7
|
-
|
8
|
-
OBJECT_VALIDATION = {
|
9
|
-
code: {
|
10
|
-
maximum_length: 10
|
11
|
-
},
|
12
|
-
display_name: {
|
13
|
-
maximum_length: 50
|
14
|
-
}
|
15
|
-
}.freeze
|
16
|
-
|
17
|
-
OBJECT_METHODS = %i[
|
18
|
-
get
|
19
|
-
post
|
20
|
-
patch
|
21
|
-
delete
|
22
|
-
].freeze
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|