business-central 1.0.1 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (128) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +58 -15
  3. data/lib/business_central.rb +47 -2
  4. data/lib/business_central/client.rb +82 -39
  5. data/lib/business_central/exceptions.rb +30 -10
  6. data/lib/business_central/object/account.rb +4 -12
  7. data/lib/business_central/object/aged_account_payable.rb +4 -12
  8. data/lib/business_central/object/aged_account_receivable.rb +4 -12
  9. data/lib/business_central/object/argument_helper.rb +22 -0
  10. data/lib/business_central/object/attachment.rb +30 -0
  11. data/lib/business_central/object/balance_sheet.rb +4 -12
  12. data/lib/business_central/object/base.rb +100 -49
  13. data/lib/business_central/object/cash_flow_statement.rb +4 -12
  14. data/lib/business_central/object/company.rb +9 -2
  15. data/lib/business_central/object/company_information.rb +7 -15
  16. data/lib/business_central/object/country_region.rb +26 -0
  17. data/lib/business_central/object/currency.rb +29 -0
  18. data/lib/business_central/object/customer.rb +34 -0
  19. data/lib/business_central/object/customer_financial_detail.rb +13 -0
  20. data/lib/business_central/object/customer_payment.rb +43 -0
  21. data/lib/business_central/object/customer_payment_journal.rb +25 -0
  22. data/lib/business_central/object/customer_sale.rb +13 -0
  23. data/lib/business_central/object/default_dimension.rb +51 -0
  24. data/lib/business_central/object/dimension.rb +20 -0
  25. data/lib/business_central/object/dimension_line.rb +37 -0
  26. data/lib/business_central/object/dimension_value.rb +28 -0
  27. data/lib/business_central/object/employee.rb +21 -0
  28. data/lib/business_central/object/filter_query.rb +18 -0
  29. data/lib/business_central/object/general_ledger_entry.rb +13 -0
  30. data/lib/business_central/object/income_statement.rb +13 -0
  31. data/lib/business_central/object/irs1099_code.rb +16 -0
  32. data/lib/business_central/object/item.rb +16 -19
  33. data/lib/business_central/object/item_category.rb +16 -0
  34. data/lib/business_central/object/journal.rb +29 -0
  35. data/lib/business_central/object/journal_line.rb +48 -0
  36. data/lib/business_central/object/object_helper.rb +49 -0
  37. data/lib/business_central/object/payment_method.rb +16 -0
  38. data/lib/business_central/object/payment_term.rb +16 -0
  39. data/lib/business_central/object/picture.rb +53 -0
  40. data/lib/business_central/object/purchase_invoice.rb +8 -16
  41. data/lib/business_central/object/purchase_invoice_line.rb +14 -18
  42. data/lib/business_central/object/request.rb +61 -50
  43. data/lib/business_central/object/response.rb +31 -23
  44. data/lib/business_central/object/retained_earning_statement.rb +13 -0
  45. data/lib/business_central/object/sales_credit_memo.rb +20 -0
  46. data/lib/business_central/object/sales_credit_memo_line.rb +30 -0
  47. data/lib/business_central/object/sales_invoice.rb +62 -0
  48. data/lib/business_central/object/sales_invoice_line.rb +30 -0
  49. data/lib/business_central/object/sales_order.rb +20 -0
  50. data/lib/business_central/object/sales_order_line.rb +30 -0
  51. data/lib/business_central/object/sales_quote.rb +20 -0
  52. data/lib/business_central/object/sales_quote_line.rb +30 -0
  53. data/lib/business_central/object/shipment_method.rb +16 -0
  54. data/lib/business_central/object/subscription.rb +16 -0
  55. data/lib/business_central/object/tax_area.rb +16 -0
  56. data/lib/business_central/object/tax_group.rb +16 -0
  57. data/lib/business_central/object/time_registration_entry.rb +16 -0
  58. data/lib/business_central/object/trial_balance.rb +13 -0
  59. data/lib/business_central/object/units_of_measure.rb +16 -0
  60. data/lib/business_central/object/url_builder.rb +59 -0
  61. data/lib/business_central/object/url_helper.rb +44 -0
  62. data/lib/business_central/object/validation.rb +10 -7
  63. data/lib/business_central/object/vendor.rb +12 -15
  64. data/lib/business_central/object/vendor_purchase.rb +13 -0
  65. data/lib/business_central/version.rb +4 -2
  66. data/lib/business_central/web_service.rb +78 -0
  67. data/lib/core_ext/string.rb +18 -12
  68. data/test/business_central/client_test.rb +49 -7
  69. data/test/business_central/object/account_test.rb +6 -5
  70. data/test/business_central/object/aged_account_payable_test.rb +6 -5
  71. data/test/business_central/object/aged_account_receivable_test.rb +6 -5
  72. data/test/business_central/object/attachment_test.rb +117 -0
  73. data/test/business_central/object/balance_sheet_test.rb +6 -5
  74. data/test/business_central/object/base_test.rb +41 -0
  75. data/test/business_central/object/cash_flow_statement_test.rb +6 -5
  76. data/test/business_central/object/company_information_test.rb +9 -10
  77. data/test/business_central/object/company_test.rb +6 -5
  78. data/test/business_central/object/country_region_test.rb +129 -0
  79. data/test/business_central/object/currency_test.rb +150 -0
  80. data/test/business_central/object/customer_financial_detail_test.rb +68 -0
  81. data/test/business_central/object/customer_payment_journal_test.rb +134 -0
  82. data/test/business_central/object/customer_payment_test.rb +141 -0
  83. data/test/business_central/object/customer_sale_test.rb +72 -0
  84. data/test/business_central/object/customer_test.rb +168 -0
  85. data/test/business_central/object/default_dimension_test.rb +170 -0
  86. data/test/business_central/object/dimension_line_test.rb +165 -0
  87. data/test/business_central/object/dimension_test.rb +65 -0
  88. data/test/business_central/object/dimension_value_test.rb +68 -0
  89. data/test/business_central/object/employee_test.rb +141 -0
  90. data/test/business_central/object/filter_query_test.rb +36 -0
  91. data/test/business_central/object/general_ledger_entry_test.rb +82 -0
  92. data/test/business_central/object/income_statement_test.rb +82 -0
  93. data/test/business_central/object/irs1099_code_test.rb +124 -0
  94. data/test/business_central/object/item_category_test.rb +122 -0
  95. data/test/business_central/object/item_test.rb +16 -17
  96. data/test/business_central/object/journal_line_test.rb +152 -0
  97. data/test/business_central/object/journal_test.rb +144 -0
  98. data/test/business_central/object/payment_method_test.rb +134 -0
  99. data/test/business_central/object/payment_term_test.rb +134 -0
  100. data/test/business_central/object/picture_test.rb +74 -0
  101. data/test/business_central/object/purchase_invoice_line_test.rb +15 -15
  102. data/test/business_central/object/purchase_invoice_test.rb +15 -15
  103. data/test/business_central/object/request_test.rb +75 -12
  104. data/test/business_central/object/response_test.rb +34 -9
  105. data/test/business_central/object/retained_earning_statement_test.rb +52 -0
  106. data/test/business_central/object/sales_credit_memo_line_test.rb +134 -0
  107. data/test/business_central/object/sales_credit_memo_test.rb +146 -0
  108. data/test/business_central/object/sales_invoice_line_test.rb +164 -0
  109. data/test/business_central/object/sales_invoice_test.rb +156 -0
  110. data/test/business_central/object/sales_order_line_test.rb +134 -0
  111. data/test/business_central/object/sales_order_test.rb +146 -0
  112. data/test/business_central/object/sales_quote_line_test.rb +134 -0
  113. data/test/business_central/object/sales_quote_test.rb +146 -0
  114. data/test/business_central/object/shipment_method_test.rb +133 -0
  115. data/test/business_central/object/subscription_test.rb +126 -0
  116. data/test/business_central/object/tax_area_test.rb +126 -0
  117. data/test/business_central/object/tax_group_test.rb +126 -0
  118. data/test/business_central/object/time_registration_entry_test.rb +126 -0
  119. data/test/business_central/object/trial_balance_test.rb +82 -0
  120. data/test/business_central/object/units_of_measure_test.rb +126 -0
  121. data/test/business_central/object/validation_test.rb +5 -4
  122. data/test/business_central/object/vendor_purchase_test.rb +82 -0
  123. data/test/business_central/object/vendor_test.rb +16 -16
  124. data/test/business_central/web_service_test.rb +100 -0
  125. data/test/business_central_test.rb +3 -1
  126. data/test/test_helper.rb +16 -6
  127. metadata +188 -37
  128. data/lib/business_central/object/helper.rb +0 -15
@@ -1,4 +1,6 @@
1
- require "test_helper"
1
+ # frozen_string_literal: true
2
+
3
+ require 'test_helper'
2
4
  # rake test TEST=test/business_central/object/validation_test.rb
3
5
 
4
6
  class BusinessCentral::Object::ValidationTest < Minitest::Test
@@ -33,7 +35,7 @@ class BusinessCentral::Object::ValidationTest < Minitest::Test
33
35
  def test_validation_inclusive_value
34
36
  validation_rules = {
35
37
  type: {
36
- inclusion_of: ['1', '2', '3']
38
+ inclusion_of: %w[1 2 3]
37
39
  }
38
40
  }
39
41
  object_params = {
@@ -57,5 +59,4 @@ class BusinessCentral::Object::ValidationTest < Minitest::Test
57
59
  BusinessCentral::Object::Validation.new(validation_rules, object_params).valid?
58
60
  end
59
61
  end
60
-
61
- end
62
+ end
@@ -0,0 +1,82 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'test_helper'
4
+ # rake test TEST=test/business_central/object/vendor_purchase_test.rb
5
+
6
+ class BusinessCentral::Object::VendorPurchaseTest < Minitest::Test
7
+ def setup
8
+ @company_id = '123456'
9
+ @client = BusinessCentral::Client.new
10
+ @vendor_purchase = @client.vendor_purchase(company_id: @company_id)
11
+ end
12
+
13
+ def test_find_all
14
+ stub_request(:get, /vendorPurchases/)
15
+ .to_return(
16
+ status: 200,
17
+ body: {
18
+ 'value': [
19
+ {
20
+ id: 1,
21
+ number: '1009'
22
+ }
23
+ ]
24
+ }.to_json
25
+ )
26
+
27
+ response = @vendor_purchase.find_all
28
+ assert_equal response.first[:number], '1009'
29
+ end
30
+
31
+ def test_find_by_id
32
+ test_id = '09876'
33
+ stub_request(:get, /vendorPurchases\(#{test_id}\)/)
34
+ .to_return(
35
+ status: 200,
36
+ body: {
37
+ id: test_id,
38
+ number: '1010'
39
+ }.to_json
40
+ )
41
+
42
+ response = @vendor_purchase.find_by_id(test_id)
43
+ assert_equal response[:number], '1010'
44
+ end
45
+
46
+ def test_where
47
+ test_filter = "number eq '1020'"
48
+ stub_request(:get, /vendorPurchases\?\$filter=#{test_filter}/)
49
+ .to_return(
50
+ status: 200,
51
+ body: {
52
+ 'value': [
53
+ {
54
+ id: '345',
55
+ number: '1011'
56
+ }
57
+ ]
58
+ }.to_json
59
+ )
60
+
61
+ response = @vendor_purchase.where(test_filter)
62
+ assert_equal response.first[:number], '1011'
63
+ end
64
+
65
+ def test_create
66
+ assert_raises BusinessCentral::NoSupportedMethod do
67
+ @vendor_purchase.create({})
68
+ end
69
+ end
70
+
71
+ def test_update
72
+ assert_raises BusinessCentral::NoSupportedMethod do
73
+ @vendor_purchase.update('123', {})
74
+ end
75
+ end
76
+
77
+ def test_delete
78
+ assert_raises BusinessCentral::NoSupportedMethod do
79
+ @vendor_purchase.destroy('123')
80
+ end
81
+ end
82
+ end
@@ -1,4 +1,6 @@
1
- require "test_helper"
1
+ # frozen_string_literal: true
2
+
3
+ require 'test_helper'
2
4
  # rake test TEST=test/business_central/object/vendor_test.rb
3
5
 
4
6
  class BusinessCentral::Object::VendorTest < Minitest::Test
@@ -9,16 +11,16 @@ class BusinessCentral::Object::VendorTest < Minitest::Test
9
11
  end
10
12
 
11
13
  def test_find_all
12
- stub_request(:get, /\/vendors/)
14
+ stub_request(:get, %r{/vendors})
13
15
  .to_return(
14
- status: 200,
16
+ status: 200,
15
17
  body: {
16
18
  'value': [
17
19
  {
18
20
  displayName: 'vendor1'
19
21
  }
20
22
  ]
21
- }.to_json,
23
+ }.to_json
22
24
  )
23
25
 
24
26
  response = @vendor.find_all
@@ -29,7 +31,7 @@ class BusinessCentral::Object::VendorTest < Minitest::Test
29
31
  test_vendor_id = '09876'
30
32
  stub_request(:get, /vendors\(#{test_vendor_id}\)/)
31
33
  .to_return(
32
- status: 200,
34
+ status: 200,
33
35
  body: {
34
36
  displayName: 'vendor2'
35
37
  }.to_json
@@ -43,7 +45,7 @@ class BusinessCentral::Object::VendorTest < Minitest::Test
43
45
  test_filter = "displayName eq 'vendor3'"
44
46
  stub_request(:get, /vendors\?\$filter=#{test_filter}/)
45
47
  .to_return(
46
- status: 200,
48
+ status: 200,
47
49
  body: {
48
50
  'value': [
49
51
  {
@@ -60,15 +62,15 @@ class BusinessCentral::Object::VendorTest < Minitest::Test
60
62
  def test_create
61
63
  stub_request(:post, /vendors/)
62
64
  .to_return(
63
- status: 200,
65
+ status: 200,
64
66
  body: {
65
67
  displayName: 'vendor4'
66
68
  }.to_json
67
69
  )
68
70
 
69
- response = @vendor.create({
71
+ response = @vendor.create(
70
72
  display_name: 'vendor4'
71
- })
73
+ )
72
74
  assert_equal response[:display_name], 'vendor4'
73
75
  end
74
76
 
@@ -76,7 +78,7 @@ class BusinessCentral::Object::VendorTest < Minitest::Test
76
78
  test_vendor_id = '011123'
77
79
  stub_request(:get, /vendors\(#{test_vendor_id}\)/)
78
80
  .to_return(
79
- status: 200,
81
+ status: 200,
80
82
  body: {
81
83
  etag: '112',
82
84
  displayName: 'vendor5'
@@ -85,7 +87,7 @@ class BusinessCentral::Object::VendorTest < Minitest::Test
85
87
 
86
88
  stub_request(:patch, /vendors\(#{test_vendor_id}\)/)
87
89
  .to_return(
88
- status: 200,
90
+ status: 200,
89
91
  body: {
90
92
  displayName: 'vendor6'
91
93
  }.to_json
@@ -93,9 +95,7 @@ class BusinessCentral::Object::VendorTest < Minitest::Test
93
95
 
94
96
  response = @vendor.update(
95
97
  test_vendor_id,
96
- {
97
- display_name: 'vendor6'
98
- }
98
+ display_name: 'vendor6'
99
99
  )
100
100
  assert_equal response[:display_name], 'vendor6'
101
101
  end
@@ -104,7 +104,7 @@ class BusinessCentral::Object::VendorTest < Minitest::Test
104
104
  test_vendor_id = '0111245'
105
105
  stub_request(:get, /vendors\(#{test_vendor_id}\)/)
106
106
  .to_return(
107
- status: 200,
107
+ status: 200,
108
108
  body: {
109
109
  etag: '113',
110
110
  displayName: 'vendor7'
@@ -116,4 +116,4 @@ class BusinessCentral::Object::VendorTest < Minitest::Test
116
116
 
117
117
  assert @vendor.destroy(test_vendor_id)
118
118
  end
119
- end
119
+ end
@@ -0,0 +1,100 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'test_helper'
4
+ # rake test TEST=test/business_central/web_service_test.rb
5
+
6
+ class BusinessCentral::WebServiceTest < Minitest::Test
7
+ def setup
8
+ @client = BusinessCentral::Client.new
9
+ @web_service = BusinessCentral::WebService.new(client: @client)
10
+ end
11
+
12
+ def test_build_object_url
13
+ @web_service.object('Company/Vendors')
14
+ assert_equal @web_service.object_url, 'Company/Vendors'
15
+ end
16
+
17
+ def test_build_object_url_with_array_template_values
18
+ @web_service.object("Company('?')", 'business1')
19
+ assert_equal @web_service.object_url, "Company('business1')"
20
+ end
21
+
22
+ def test_build_object_url_with_hash_template_values
23
+ @web_service.object("Company(':business_name')", business_name: 'business1')
24
+ assert_equal @web_service.object_url, "Company('business1')"
25
+ end
26
+
27
+ def test_object_get_request
28
+ stub_request(:get, /Company/)
29
+ .to_return(
30
+ status: 200,
31
+ body: {
32
+ 'value': [
33
+ {
34
+ displayName: 'business1'
35
+ }
36
+ ]
37
+ }.to_json
38
+ )
39
+
40
+ response = @web_service.object('Company').get
41
+ assert_equal response.first[:display_name], 'business1'
42
+ end
43
+
44
+ def test_object_post_request
45
+ stub_request(:post, /Company/)
46
+ .to_return(
47
+ status: 200,
48
+ body: {
49
+ displayName: 'business2'
50
+ }.to_json
51
+ )
52
+
53
+ response = @web_service.object('Company').post(
54
+ display_name: 'business2'
55
+ )
56
+ assert_equal response[:display_name], 'business2'
57
+ end
58
+
59
+ def test_object_patch_request
60
+ test_company_name = 'business3'
61
+ stub_request(:get, /Company\('#{test_company_name}'\)/)
62
+ .to_return(
63
+ status: 200,
64
+ body: {
65
+ etag: '112',
66
+ displayName: 'business3'
67
+ }.to_json
68
+ )
69
+
70
+ stub_request(:patch, /Company\('#{test_company_name}'\)/)
71
+ .to_return(
72
+ status: 200,
73
+ body: {
74
+ displayName: 'business4'
75
+ }.to_json
76
+ )
77
+
78
+ response = @web_service.object("Company('?')", test_company_name).patch(
79
+ display_name: 'business4'
80
+ )
81
+ assert_equal response[:display_name], 'business4'
82
+ end
83
+
84
+ def test_object_delete_request
85
+ test_company_name = 'business5'
86
+ stub_request(:get, /Company\('#{test_company_name}'\)/)
87
+ .to_return(
88
+ status: 200,
89
+ body: {
90
+ etag: '113',
91
+ displayName: 'business5'
92
+ }.to_json
93
+ )
94
+
95
+ stub_request(:delete, /Company\('#{test_company_name}'\)/)
96
+ .to_return(status: 204)
97
+
98
+ assert @web_service.object("Company('?')", test_company_name).delete
99
+ end
100
+ end
@@ -1,4 +1,6 @@
1
- require "test_helper"
1
+ # frozen_string_literal: true
2
+
3
+ require 'test_helper'
2
4
 
3
5
  class BusinessCentralTest < Minitest::Test
4
6
  def test_version_number_exists
data/test/test_helper.rb CHANGED
@@ -1,11 +1,21 @@
1
- $LOAD_PATH.unshift File.expand_path("../lib", __dir__)
2
- require "business_central"
1
+ # frozen_string_literal: true
3
2
 
4
- require "minitest/autorun"
5
- require "minitest/pride"
6
- require "minitest/mock"
3
+ require 'simplecov'
4
+ SimpleCov.start do
5
+ add_filter '/test/'
6
+ end
7
7
 
8
- require "byebug"
8
+ $LOAD_PATH.unshift File.expand_path('../lib', __dir__)
9
+ require 'business_central'
10
+
11
+ require 'minitest/autorun'
12
+ require 'minitest/focus'
13
+ require 'minitest/mock'
14
+ require 'minitest/reporters'
15
+
16
+ require 'byebug'
9
17
  require 'webmock/minitest'
10
18
 
11
19
  WebMock.disable_net_connect!(allow_localhost: true)
20
+
21
+ Minitest::Reporters.use!
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.1
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jarrad Muir
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-10 00:00:00.000000000 Z
11
+ date: 2021-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,82 +16,112 @@ 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
- name: rake
28
+ name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: '11.1'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '10.0'
40
+ version: '11.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement
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
- name: webmock
56
+ name: minitest-focus
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '3.7'
62
- - - ">="
63
- - !ruby/object:Gem::Version
64
- version: 3.7.6
61
+ version: '1.2'
65
62
  type: :development
66
63
  prerelease: false
67
64
  version_requirements: !ruby/object:Gem::Requirement
68
65
  requirements:
69
66
  - - "~>"
70
67
  - !ruby/object:Gem::Version
71
- version: '3.7'
72
- - - ">="
68
+ version: '1.2'
69
+ - !ruby/object:Gem::Dependency
70
+ name: minitest-reporters
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
73
74
  - !ruby/object:Gem::Version
74
- version: 3.7.6
75
+ version: '1.4'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '1.4'
75
83
  - !ruby/object:Gem::Dependency
76
- name: byebug
84
+ name: rake
77
85
  requirement: !ruby/object:Gem::Requirement
78
86
  requirements:
79
87
  - - "~>"
80
88
  - !ruby/object:Gem::Version
81
- version: '11.0'
82
- - - ">="
89
+ version: '13.0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '13.0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: simplecov
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
83
102
  - !ruby/object:Gem::Version
84
- version: 11.0.1
103
+ version: '0.21'
85
104
  type: :development
86
105
  prerelease: false
87
106
  version_requirements: !ruby/object:Gem::Requirement
88
107
  requirements:
89
108
  - - "~>"
90
109
  - !ruby/object:Gem::Version
91
- version: '11.0'
92
- - - ">="
110
+ version: '0.21'
111
+ - !ruby/object:Gem::Dependency
112
+ name: webmock
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: '3.12'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
93
123
  - !ruby/object:Gem::Version
94
- version: 11.0.1
124
+ version: '3.12'
95
125
  - !ruby/object:Gem::Dependency
96
126
  name: oauth2
97
127
  requirement: !ruby/object:Gem::Requirement
@@ -99,9 +129,6 @@ dependencies:
99
129
  - - "~>"
100
130
  - !ruby/object:Gem::Version
101
131
  version: '1.4'
102
- - - ">="
103
- - !ruby/object:Gem::Version
104
- version: 1.4.2
105
132
  type: :runtime
106
133
  prerelease: false
107
134
  version_requirements: !ruby/object:Gem::Requirement
@@ -109,10 +136,7 @@ dependencies:
109
136
  - - "~>"
110
137
  - !ruby/object:Gem::Version
111
138
  version: '1.4'
112
- - - ">="
113
- - !ruby/object:Gem::Version
114
- version: 1.4.2
115
- description:
139
+ description:
116
140
  email:
117
141
  - jarrads@live.com
118
142
  executables: []
@@ -127,36 +151,122 @@ files:
127
151
  - lib/business_central/object/account.rb
128
152
  - lib/business_central/object/aged_account_payable.rb
129
153
  - lib/business_central/object/aged_account_receivable.rb
154
+ - lib/business_central/object/argument_helper.rb
155
+ - lib/business_central/object/attachment.rb
130
156
  - lib/business_central/object/balance_sheet.rb
131
157
  - lib/business_central/object/base.rb
132
158
  - lib/business_central/object/cash_flow_statement.rb
133
159
  - lib/business_central/object/company.rb
134
160
  - lib/business_central/object/company_information.rb
135
- - lib/business_central/object/helper.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
173
+ - 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
136
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
+ - lib/business_central/object/object_helper.rb
182
+ - lib/business_central/object/payment_method.rb
183
+ - lib/business_central/object/payment_term.rb
184
+ - lib/business_central/object/picture.rb
137
185
  - lib/business_central/object/purchase_invoice.rb
138
186
  - lib/business_central/object/purchase_invoice_line.rb
139
187
  - lib/business_central/object/request.rb
140
188
  - 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
+ - lib/business_central/object/url_builder.rb
206
+ - lib/business_central/object/url_helper.rb
141
207
  - lib/business_central/object/validation.rb
142
208
  - lib/business_central/object/vendor.rb
209
+ - lib/business_central/object/vendor_purchase.rb
143
210
  - lib/business_central/version.rb
211
+ - lib/business_central/web_service.rb
144
212
  - lib/core_ext/string.rb
145
213
  - test/business_central/client_test.rb
146
214
  - test/business_central/object/account_test.rb
147
215
  - test/business_central/object/aged_account_payable_test.rb
148
216
  - test/business_central/object/aged_account_receivable_test.rb
217
+ - test/business_central/object/attachment_test.rb
149
218
  - test/business_central/object/balance_sheet_test.rb
219
+ - test/business_central/object/base_test.rb
150
220
  - test/business_central/object/cash_flow_statement_test.rb
151
221
  - test/business_central/object/company_information_test.rb
152
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
235
+ - 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
153
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
+ - test/business_central/object/picture_test.rb
154
246
  - test/business_central/object/purchase_invoice_line_test.rb
155
247
  - test/business_central/object/purchase_invoice_test.rb
156
248
  - test/business_central/object/request_test.rb
157
249
  - 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
158
266
  - test/business_central/object/validation_test.rb
267
+ - test/business_central/object/vendor_purchase_test.rb
159
268
  - test/business_central/object/vendor_test.rb
269
+ - test/business_central/web_service_test.rb
160
270
  - test/business_central_test.rb
161
271
  - test/test_helper.rb
162
272
  homepage: https://github.com/JDrizzy/business-central
@@ -165,7 +275,7 @@ licenses:
165
275
  metadata:
166
276
  source_code_uri: https://github.com/JDrizzy/business-central
167
277
  changelog_uri: https://github.com/JDrizzy/business-central/releases
168
- post_install_message:
278
+ post_install_message:
169
279
  rdoc_options: []
170
280
  require_paths:
171
281
  - lib
@@ -180,9 +290,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
180
290
  - !ruby/object:Gem::Version
181
291
  version: '0'
182
292
  requirements: []
183
- rubyforge_project:
184
- rubygems_version: 2.7.6
185
- signing_key:
293
+ rubygems_version: 3.0.8
294
+ signing_key:
186
295
  specification_version: 4
187
296
  summary: Integration library for Microsoft Dynamic365 business central
188
297
  test_files:
@@ -190,16 +299,58 @@ test_files:
190
299
  - test/business_central/object/account_test.rb
191
300
  - test/business_central/object/aged_account_payable_test.rb
192
301
  - test/business_central/object/aged_account_receivable_test.rb
302
+ - test/business_central/object/attachment_test.rb
193
303
  - test/business_central/object/balance_sheet_test.rb
304
+ - test/business_central/object/base_test.rb
194
305
  - test/business_central/object/cash_flow_statement_test.rb
195
306
  - test/business_central/object/company_information_test.rb
196
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
320
+ - 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
197
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
+ - test/business_central/object/picture_test.rb
198
331
  - test/business_central/object/purchase_invoice_line_test.rb
199
332
  - test/business_central/object/purchase_invoice_test.rb
200
333
  - test/business_central/object/request_test.rb
201
334
  - 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
202
351
  - test/business_central/object/validation_test.rb
352
+ - test/business_central/object/vendor_purchase_test.rb
203
353
  - test/business_central/object/vendor_test.rb
354
+ - test/business_central/web_service_test.rb
204
355
  - test/business_central_test.rb
205
356
  - test/test_helper.rb