dear-inventory-ruby 0.1.5 → 0.1.6

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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -9
  3. data/docs/Account.md +43 -0
  4. data/docs/Accounts.md +21 -0
  5. data/docs/Address.md +2 -2
  6. data/docs/Contact.md +1 -1
  7. data/docs/Customer.md +7 -7
  8. data/docs/InventoryApi.md +731 -25
  9. data/docs/PaymentTerm.md +27 -0
  10. data/docs/PaymentTerms.md +21 -0
  11. data/docs/Success.md +17 -0
  12. data/docs/Tax.md +33 -0
  13. data/docs/TaxComponent.md +23 -0
  14. data/docs/Taxes.md +21 -0
  15. data/lib/dear-inventory-ruby.rb +8 -0
  16. data/lib/dear-inventory-ruby/api/inventory_api.rb +740 -14
  17. data/lib/dear-inventory-ruby/models/account.rb +477 -0
  18. data/lib/dear-inventory-ruby/models/accounts.rb +229 -0
  19. data/lib/dear-inventory-ruby/models/address.rb +10 -0
  20. data/lib/dear-inventory-ruby/models/contact.rb +12 -3
  21. data/lib/dear-inventory-ruby/models/customer.rb +42 -3
  22. data/lib/dear-inventory-ruby/models/payment_term.rb +319 -0
  23. data/lib/dear-inventory-ruby/models/payment_terms.rb +229 -0
  24. data/lib/dear-inventory-ruby/models/success.rb +207 -0
  25. data/lib/dear-inventory-ruby/models/tax.rb +360 -0
  26. data/lib/dear-inventory-ruby/models/tax_component.rb +306 -0
  27. data/lib/dear-inventory-ruby/models/taxes.rb +229 -0
  28. data/lib/dear-inventory-ruby/version.rb +1 -1
  29. data/spec/api/inventory_api_spec.rb +148 -4
  30. data/spec/models/account_spec.rb +131 -0
  31. data/spec/models/accounts_spec.rb +53 -0
  32. data/spec/models/payment_term_spec.rb +75 -0
  33. data/spec/models/payment_terms_spec.rb +53 -0
  34. data/spec/models/success_spec.rb +41 -0
  35. data/spec/models/tax_component_spec.rb +59 -0
  36. data/spec/models/tax_spec.rb +89 -0
  37. data/spec/models/taxes_spec.rb +53 -0
  38. metadata +34 -2
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.2.3
11
11
  =end
12
12
 
13
13
  module DearInventoryRuby
14
- VERSION = '0.1.5'
14
+ VERSION = '0.1.6'
15
15
  end
@@ -32,11 +32,23 @@ describe 'InventoryApi' do
32
32
  end
33
33
  end
34
34
 
35
+ # unit tests for create_account
36
+ # Allows you to create an Account
37
+ # @param account an Account object with properties to create
38
+ # @param [Hash] opts the optional parameters
39
+ # @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
40
+ # @return [Accounts]
41
+ describe 'create_account test' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
35
47
  # unit tests for create_customer
36
48
  # Allows you to create a customer
37
- # @param customer a Contact object with properties to create
49
+ # @param customer a customer object with properties to create
38
50
  # @param [Hash] opts the optional parameters
39
- # @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created obejcts and any with validation errors
51
+ # @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
40
52
  # @return [Customers]
41
53
  describe 'create_customer test' do
42
54
  it 'should work' do
@@ -44,6 +56,67 @@ describe 'InventoryApi' do
44
56
  end
45
57
  end
46
58
 
59
+ # unit tests for create_payment_term
60
+ # Allows you to create a payment term
61
+ # @param payment_term a payment term object with properties to create
62
+ # @param [Hash] opts the optional parameters
63
+ # @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
64
+ # @return [PaymentTerms]
65
+ describe 'create_payment_term test' do
66
+ it 'should work' do
67
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
+ end
69
+ end
70
+
71
+ # unit tests for create_tax
72
+ # Allows you to create a tax
73
+ # @param tax a tax object with properties to create
74
+ # @param [Hash] opts the optional parameters
75
+ # @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
76
+ # @return [Taxes]
77
+ describe 'create_tax test' do
78
+ it 'should work' do
79
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
80
+ end
81
+ end
82
+
83
+ # unit tests for delete_account
84
+ # Allows you to delete an Account
85
+ # @param [Hash] opts the optional parameters
86
+ # @option opts [String] :code Code
87
+ # @return [Success]
88
+ describe 'delete_account test' do
89
+ it 'should work' do
90
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
91
+ end
92
+ end
93
+
94
+ # unit tests for delete_payment_term
95
+ # Allows you to delete a payment term
96
+ # @param [Hash] opts the optional parameters
97
+ # @option opts [String] :id Default is nil
98
+ # @return [Success]
99
+ describe 'delete_payment_term test' do
100
+ it 'should work' do
101
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
102
+ end
103
+ end
104
+
105
+ # unit tests for get_accounts
106
+ # Allows you to retrieve the Chart of Accounts
107
+ # @param [Hash] opts the optional parameters
108
+ # @option opts [String] :page Default is 1
109
+ # @option opts [String] :limit Default is 100
110
+ # @option opts [String] :id Default is nil
111
+ # @option opts [String] :name Default is nil
112
+ # @option opts [String] :bank Default is nil
113
+ # @return [Accounts]
114
+ describe 'get_accounts test' do
115
+ it 'should work' do
116
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
117
+ end
118
+ end
119
+
47
120
  # unit tests for get_customers
48
121
  # Allows you to retrieve the customers
49
122
  # @param [Hash] opts the optional parameters
@@ -60,11 +133,58 @@ describe 'InventoryApi' do
60
133
  end
61
134
  end
62
135
 
136
+ # unit tests for get_payment_terms
137
+ # Allows you to retrieve the payment terms
138
+ # @param [Hash] opts the optional parameters
139
+ # @option opts [String] :page Default is 1
140
+ # @option opts [String] :limit Default is 100
141
+ # @option opts [String] :id Default is nil
142
+ # @option opts [String] :name Default is nil
143
+ # @option opts [String] :method Default is nil
144
+ # @option opts [Boolean] :is_active Default is nil
145
+ # @option opts [Boolean] :is_default Default is nil
146
+ # @return [PaymentTerms]
147
+ describe 'get_payment_terms test' do
148
+ it 'should work' do
149
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
150
+ end
151
+ end
152
+
153
+ # unit tests for get_taxes
154
+ # Allows you to retrieve the taxes
155
+ # @param [Hash] opts the optional parameters
156
+ # @option opts [String] :page Default is 1
157
+ # @option opts [String] :limit Default is 100
158
+ # @option opts [String] :id Default is nil
159
+ # @option opts [String] :name Default is nil
160
+ # @option opts [Boolean] :is_active Default is nil
161
+ # @option opts [Boolean] :is_tax_for_sale Default is nil
162
+ # @option opts [Boolean] :is_tax_for_purchase Default is nil
163
+ # @option opts [String] :account Default is nil
164
+ # @return [Taxes]
165
+ describe 'get_taxes test' do
166
+ it 'should work' do
167
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
168
+ end
169
+ end
170
+
171
+ # unit tests for update_account
172
+ # Allows you to update an Account
173
+ # @param account an Account object with properties to update
174
+ # @param [Hash] opts the optional parameters
175
+ # @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
176
+ # @return [Accounts]
177
+ describe 'update_account test' do
178
+ it 'should work' do
179
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
180
+ end
181
+ end
182
+
63
183
  # unit tests for update_customer
64
184
  # Allows you to update a customer
65
- # @param customer a Contact object with properties to create
185
+ # @param customer a customer object with properties to update
66
186
  # @param [Hash] opts the optional parameters
67
- # @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created obejcts and any with validation errors
187
+ # @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
68
188
  # @return [Customers]
69
189
  describe 'update_customer test' do
70
190
  it 'should work' do
@@ -72,4 +192,28 @@ describe 'InventoryApi' do
72
192
  end
73
193
  end
74
194
 
195
+ # unit tests for update_payment_term
196
+ # Allows you to update a payment term
197
+ # @param payment_term a payment term object with properties to update
198
+ # @param [Hash] opts the optional parameters
199
+ # @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
200
+ # @return [PaymentTerms]
201
+ describe 'update_payment_term test' do
202
+ it 'should work' do
203
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
204
+ end
205
+ end
206
+
207
+ # unit tests for update_tax
208
+ # Allows you to update a tax
209
+ # @param tax a tax object with properties to update
210
+ # @param [Hash] opts the optional parameters
211
+ # @option opts [Boolean] :summarize_errors If false return 200 OK and mix of successfully created objects and any with validation errors
212
+ # @return [Taxes]
213
+ describe 'update_tax test' do
214
+ it 'should work' do
215
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
216
+ end
217
+ end
218
+
75
219
  end
@@ -0,0 +1,131 @@
1
+ =begin
2
+ #DEAR Inventory API
3
+
4
+ #This specifing endpoints for DEAR Inventory API
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: nnhansg@gmail.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.3
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for DearInventoryRuby::Account
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'Account' do
21
+ before do
22
+ # run before each test
23
+ @instance = DearInventoryRuby::Account.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of Account' do
31
+ it 'should create an instance of Account' do
32
+ expect(@instance).to be_instance_of(DearInventoryRuby::Account)
33
+ end
34
+ end
35
+ describe 'test attribute "code"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "name"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "type"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["BANK", "CURRLIAB", "LIABILITY", "TERMLIA", "PAYGLIABILITY", "SUPERANNUATIONLIABILITY", "WAGESPAYABLELIABILITY"])
51
+ # validator.allowable_values.each do |value|
52
+ # expect { @instance.type = value }.not_to raise_error
53
+ # end
54
+ end
55
+ end
56
+
57
+ describe 'test attribute "status"' do
58
+ it 'should work' do
59
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
60
+ end
61
+ end
62
+
63
+ describe 'test attribute "description"' do
64
+ it 'should work' do
65
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
66
+ end
67
+ end
68
+
69
+ describe 'test attribute "_class"' do
70
+ it 'should work' do
71
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
72
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ASSET", "LIABILITY", "EXPENSE", "EQUITY", "REVENUE"])
73
+ # validator.allowable_values.each do |value|
74
+ # expect { @instance._class = value }.not_to raise_error
75
+ # end
76
+ end
77
+ end
78
+
79
+ describe 'test attribute "system_account"' do
80
+ it 'should work' do
81
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
82
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["BANKCURRENCYGAIN", "CREDITORS", "DEBTORS", "GST", "GSTONIMPORTS", "HISTORICAL", "REALISEDCURRENCYGAIN", "RETAINEDEARNINGS", "ROUNDING", "TRACKINGTRANSFERS", "UNPAIDEXPCLM", "UNREALISEDCURRENCYGAIN", "WAGEPAYABLES"])
83
+ # validator.allowable_values.each do |value|
84
+ # expect { @instance.system_account = value }.not_to raise_error
85
+ # end
86
+ end
87
+ end
88
+
89
+ describe 'test attribute "for_payments"' do
90
+ it 'should work' do
91
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
92
+ end
93
+ end
94
+
95
+ describe 'test attribute "display_name"' do
96
+ it 'should work' do
97
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
98
+ end
99
+ end
100
+
101
+ describe 'test attribute "old_code"' do
102
+ it 'should work' do
103
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
104
+ end
105
+ end
106
+
107
+ describe 'test attribute "bank"' do
108
+ it 'should work' do
109
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
110
+ end
111
+ end
112
+
113
+ describe 'test attribute "bank_account_number"' do
114
+ it 'should work' do
115
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
116
+ end
117
+ end
118
+
119
+ describe 'test attribute "bank_account_id"' do
120
+ it 'should work' do
121
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
122
+ end
123
+ end
124
+
125
+ describe 'test attribute "currency"' do
126
+ it 'should work' do
127
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
128
+ end
129
+ end
130
+
131
+ end
@@ -0,0 +1,53 @@
1
+ =begin
2
+ #DEAR Inventory API
3
+
4
+ #This specifing endpoints for DEAR Inventory API
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: nnhansg@gmail.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.3
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for DearInventoryRuby::Accounts
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'Accounts' do
21
+ before do
22
+ # run before each test
23
+ @instance = DearInventoryRuby::Accounts.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of Accounts' do
31
+ it 'should create an instance of Accounts' do
32
+ expect(@instance).to be_instance_of(DearInventoryRuby::Accounts)
33
+ end
34
+ end
35
+ describe 'test attribute "total"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "page"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "accounts_list"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ end
@@ -0,0 +1,75 @@
1
+ =begin
2
+ #DEAR Inventory API
3
+
4
+ #This specifing endpoints for DEAR Inventory API
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: nnhansg@gmail.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.3
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for DearInventoryRuby::PaymentTerm
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'PaymentTerm' do
21
+ before do
22
+ # run before each test
23
+ @instance = DearInventoryRuby::PaymentTerm.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of PaymentTerm' do
31
+ it 'should create an instance of PaymentTerm' do
32
+ expect(@instance).to be_instance_of(DearInventoryRuby::PaymentTerm)
33
+ end
34
+ end
35
+ describe 'test attribute "id"' do
36
+ it 'should work' do
37
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
38
+ end
39
+ end
40
+
41
+ describe 'test attribute "name"' do
42
+ it 'should work' do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ describe 'test attribute "duration"' do
48
+ it 'should work' do
49
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
50
+ end
51
+ end
52
+
53
+ describe 'test attribute "method"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["number of days", "day of next month", "last day of next month", "days since the end of the month"])
57
+ # validator.allowable_values.each do |value|
58
+ # expect { @instance.method = value }.not_to raise_error
59
+ # end
60
+ end
61
+ end
62
+
63
+ describe 'test attribute "is_active"' do
64
+ it 'should work' do
65
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
66
+ end
67
+ end
68
+
69
+ describe 'test attribute "is_default"' do
70
+ it 'should work' do
71
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
72
+ end
73
+ end
74
+
75
+ end