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.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +45 -32
  3. data/lib/business_central/client.rb +7 -52
  4. data/lib/business_central/exceptions.rb +11 -29
  5. data/lib/business_central/object/{attachment.rb → attachments.rb} +9 -11
  6. data/lib/business_central/object/base.rb +42 -114
  7. data/lib/business_central/object/companies.rb +19 -0
  8. data/lib/business_central/object/filter_query.rb +2 -0
  9. data/lib/business_central/object/object_helper.rb +10 -37
  10. data/lib/business_central/object/picture.rb +4 -40
  11. data/lib/business_central/object/request.rb +14 -15
  12. data/lib/business_central/object/response.rb +5 -1
  13. data/lib/business_central/object/url_builder.rb +16 -12
  14. data/lib/business_central/object/url_helper.rb +16 -2
  15. data/lib/business_central/version.rb +1 -1
  16. data/lib/business_central/web_service.rb +2 -0
  17. data/lib/business_central.rb +4 -55
  18. data/lib/refinements/strings.rb +42 -0
  19. data/test/business_central/client_test.rb +24 -0
  20. data/test/business_central/exceptions_test.rb +40 -0
  21. data/test/business_central/object/{attachment_test.rb → attachments_test.rb} +5 -6
  22. data/test/business_central/object/base_test.rb +59 -22
  23. data/test/business_central/object/{company_test.rb → companies_test.rb} +3 -21
  24. data/test/business_central/object/picture_test.rb +7 -16
  25. data/test/business_central/object/response_test.rb +5 -0
  26. data/test/business_central/web_service_test.rb +7 -2
  27. metadata +38 -167
  28. data/lib/business_central/object/account.rb +0 -13
  29. data/lib/business_central/object/aged_account_payable.rb +0 -13
  30. data/lib/business_central/object/aged_account_receivable.rb +0 -13
  31. data/lib/business_central/object/argument_helper.rb +0 -22
  32. data/lib/business_central/object/balance_sheet.rb +0 -13
  33. data/lib/business_central/object/cash_flow_statement.rb +0 -13
  34. data/lib/business_central/object/company.rb +0 -18
  35. data/lib/business_central/object/company_information.rb +0 -14
  36. data/lib/business_central/object/country_region.rb +0 -26
  37. data/lib/business_central/object/currency.rb +0 -29
  38. data/lib/business_central/object/customer.rb +0 -34
  39. data/lib/business_central/object/customer_financial_detail.rb +0 -13
  40. data/lib/business_central/object/customer_payment.rb +0 -43
  41. data/lib/business_central/object/customer_payment_journal.rb +0 -25
  42. data/lib/business_central/object/customer_sale.rb +0 -13
  43. data/lib/business_central/object/default_dimension.rb +0 -51
  44. data/lib/business_central/object/dimension.rb +0 -20
  45. data/lib/business_central/object/dimension_line.rb +0 -37
  46. data/lib/business_central/object/dimension_value.rb +0 -28
  47. data/lib/business_central/object/employee.rb +0 -21
  48. data/lib/business_central/object/general_ledger_entry.rb +0 -13
  49. data/lib/business_central/object/income_statement.rb +0 -13
  50. data/lib/business_central/object/irs1099_code.rb +0 -16
  51. data/lib/business_central/object/item.rb +0 -47
  52. data/lib/business_central/object/item_category.rb +0 -16
  53. data/lib/business_central/object/journal.rb +0 -29
  54. data/lib/business_central/object/journal_line.rb +0 -48
  55. data/lib/business_central/object/payment_method.rb +0 -16
  56. data/lib/business_central/object/payment_term.rb +0 -16
  57. data/lib/business_central/object/purchase_invoice.rb +0 -69
  58. data/lib/business_central/object/purchase_invoice_line.rb +0 -37
  59. data/lib/business_central/object/retained_earning_statement.rb +0 -13
  60. data/lib/business_central/object/sales_credit_memo.rb +0 -20
  61. data/lib/business_central/object/sales_credit_memo_line.rb +0 -30
  62. data/lib/business_central/object/sales_invoice.rb +0 -62
  63. data/lib/business_central/object/sales_invoice_line.rb +0 -30
  64. data/lib/business_central/object/sales_order.rb +0 -20
  65. data/lib/business_central/object/sales_order_line.rb +0 -30
  66. data/lib/business_central/object/sales_quote.rb +0 -20
  67. data/lib/business_central/object/sales_quote_line.rb +0 -30
  68. data/lib/business_central/object/shipment_method.rb +0 -16
  69. data/lib/business_central/object/subscription.rb +0 -16
  70. data/lib/business_central/object/tax_area.rb +0 -16
  71. data/lib/business_central/object/tax_group.rb +0 -16
  72. data/lib/business_central/object/time_registration_entry.rb +0 -16
  73. data/lib/business_central/object/trial_balance.rb +0 -13
  74. data/lib/business_central/object/units_of_measure.rb +0 -16
  75. data/lib/business_central/object/validation.rb +0 -57
  76. data/lib/business_central/object/vendor.rb +0 -42
  77. data/lib/business_central/object/vendor_purchase.rb +0 -13
  78. data/lib/core_ext/string.rb +0 -31
  79. data/test/business_central/object/account_test.rb +0 -67
  80. data/test/business_central/object/aged_account_payable_test.rb +0 -61
  81. data/test/business_central/object/aged_account_receivable_test.rb +0 -61
  82. data/test/business_central/object/balance_sheet_test.rb +0 -61
  83. data/test/business_central/object/cash_flow_statement_test.rb +0 -61
  84. data/test/business_central/object/company_information_test.rb +0 -81
  85. data/test/business_central/object/country_region_test.rb +0 -129
  86. data/test/business_central/object/currency_test.rb +0 -150
  87. data/test/business_central/object/customer_financial_detail_test.rb +0 -68
  88. data/test/business_central/object/customer_payment_journal_test.rb +0 -134
  89. data/test/business_central/object/customer_payment_test.rb +0 -141
  90. data/test/business_central/object/customer_sale_test.rb +0 -72
  91. data/test/business_central/object/customer_test.rb +0 -168
  92. data/test/business_central/object/default_dimension_test.rb +0 -170
  93. data/test/business_central/object/dimension_line_test.rb +0 -165
  94. data/test/business_central/object/dimension_test.rb +0 -65
  95. data/test/business_central/object/dimension_value_test.rb +0 -68
  96. data/test/business_central/object/employee_test.rb +0 -141
  97. data/test/business_central/object/general_ledger_entry_test.rb +0 -82
  98. data/test/business_central/object/income_statement_test.rb +0 -82
  99. data/test/business_central/object/irs1099_code_test.rb +0 -124
  100. data/test/business_central/object/item_category_test.rb +0 -122
  101. data/test/business_central/object/item_test.rb +0 -121
  102. data/test/business_central/object/journal_line_test.rb +0 -152
  103. data/test/business_central/object/journal_test.rb +0 -144
  104. data/test/business_central/object/payment_method_test.rb +0 -134
  105. data/test/business_central/object/payment_term_test.rb +0 -134
  106. data/test/business_central/object/purchase_invoice_line_test.rb +0 -123
  107. data/test/business_central/object/purchase_invoice_test.rb +0 -119
  108. data/test/business_central/object/retained_earning_statement_test.rb +0 -52
  109. data/test/business_central/object/sales_credit_memo_line_test.rb +0 -134
  110. data/test/business_central/object/sales_credit_memo_test.rb +0 -146
  111. data/test/business_central/object/sales_invoice_line_test.rb +0 -164
  112. data/test/business_central/object/sales_invoice_test.rb +0 -156
  113. data/test/business_central/object/sales_order_line_test.rb +0 -134
  114. data/test/business_central/object/sales_order_test.rb +0 -146
  115. data/test/business_central/object/sales_quote_line_test.rb +0 -134
  116. data/test/business_central/object/sales_quote_test.rb +0 -146
  117. data/test/business_central/object/shipment_method_test.rb +0 -133
  118. data/test/business_central/object/subscription_test.rb +0 -126
  119. data/test/business_central/object/tax_area_test.rb +0 -126
  120. data/test/business_central/object/tax_group_test.rb +0 -126
  121. data/test/business_central/object/time_registration_entry_test.rb +0 -126
  122. data/test/business_central/object/trial_balance_test.rb +0 -82
  123. data/test/business_central/object/units_of_measure_test.rb +0 -126
  124. data/test/business_central/object/validation_test.rb +0 -62
  125. data/test/business_central/object/vendor_purchase_test.rb +0 -82
  126. 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: 1.0.5
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: 2021-03-03 00:00:00.000000000 Z
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.0'
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.0'
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.0'
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.0'
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.1.2
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.1.2
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.2
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.2
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.18.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.18.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.8'
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.8'
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/account.rb
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/cash_flow_statement.rb
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/core_ext/string.rb
177
+ - lib/refinements/strings.rb
213
178
  - test/business_central/client_test.rb
214
- - test/business_central/object/account_test.rb
215
- - test/business_central/object/aged_account_payable_test.rb
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/cash_flow_statement_test.rb
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.0.8
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/object/account_test.rb
300
- - test/business_central/object/aged_account_payable_test.rb
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/cash_flow_statement_test.rb
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,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module BusinessCentral
4
- module Object
5
- class Account < Base
6
- OBJECT = 'accounts'
7
-
8
- OBJECT_METHODS = [
9
- :get
10
- ].freeze
11
- end
12
- end
13
- end
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module BusinessCentral
4
- module Object
5
- class AgedAccountPayable < Base
6
- OBJECT = 'agedAccountsPayable'
7
-
8
- OBJECT_METHODS = [
9
- :get
10
- ].freeze
11
- end
12
- end
13
- end
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module BusinessCentral
4
- module Object
5
- class AgedAccountReceivable < Base
6
- OBJECT = 'agedAccountsReceivable'
7
-
8
- OBJECT_METHODS = [
9
- :get
10
- ].freeze
11
- end
12
- end
13
- end
@@ -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,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module BusinessCentral
4
- module Object
5
- class BalanceSheet < Base
6
- OBJECT = 'balanceSheet'
7
-
8
- OBJECT_METHODS = [
9
- :get
10
- ].freeze
11
- end
12
- end
13
- end
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module BusinessCentral
4
- module Object
5
- class CashFlowStatement < Base
6
- OBJECT = 'cashFlowStatement'
7
-
8
- OBJECT_METHODS = [
9
- :get
10
- ].freeze
11
- end
12
- end
13
- 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,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module BusinessCentral
4
- module Object
5
- class CompanyInformation < Base
6
- OBJECT = 'companyInformation'
7
-
8
- OBJECT_METHODS = %i[
9
- get
10
- patch
11
- ].freeze
12
- end
13
- end
14
- 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,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module BusinessCentral
4
- module Object
5
- class CustomerFinancialDetail < Base
6
- OBJECT = 'customerFinancialDetails'
7
-
8
- OBJECT_METHODS = [
9
- :get
10
- ].freeze
11
- end
12
- end
13
- 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
@@ -1,13 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module BusinessCentral
4
- module Object
5
- class CustomerSale < Base
6
- OBJECT = 'customerSales'
7
-
8
- OBJECT_METHODS = [
9
- :get
10
- ].freeze
11
- end
12
- end
13
- end