xero-ruby 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +6 -6
- data/git_push.sh +1 -1
- data/lib/xero-ruby/models/account.rb +1 -1
- data/lib/xero-ruby/models/accounts.rb +1 -1
- data/lib/xero-ruby/models/accounts_payable.rb +1 -1
- data/lib/xero-ruby/models/accounts_receivable.rb +1 -1
- data/lib/xero-ruby/models/address.rb +1 -1
- data/lib/xero-ruby/models/allocation.rb +1 -1
- data/lib/xero-ruby/models/allocations.rb +1 -1
- data/lib/xero-ruby/models/attachment.rb +1 -1
- data/lib/xero-ruby/models/attachments.rb +1 -1
- data/lib/xero-ruby/models/balances.rb +1 -1
- data/lib/xero-ruby/models/bank_transaction.rb +1 -1
- data/lib/xero-ruby/models/bank_transactions.rb +1 -1
- data/lib/xero-ruby/models/bank_transfer.rb +1 -1
- data/lib/xero-ruby/models/bank_transfers.rb +1 -1
- data/lib/xero-ruby/models/batch_payment.rb +1 -1
- data/lib/xero-ruby/models/batch_payment_details.rb +1 -1
- data/lib/xero-ruby/models/batch_payments.rb +1 -1
- data/lib/xero-ruby/models/bill.rb +1 -1
- data/lib/xero-ruby/models/branding_theme.rb +1 -1
- data/lib/xero-ruby/models/branding_themes.rb +1 -1
- data/lib/xero-ruby/models/cis_org_setting.rb +1 -1
- data/lib/xero-ruby/models/cis_setting.rb +1 -1
- data/lib/xero-ruby/models/cis_settings.rb +1 -1
- data/lib/xero-ruby/models/contact.rb +1 -1
- data/lib/xero-ruby/models/contact_group.rb +1 -1
- data/lib/xero-ruby/models/contact_groups.rb +1 -1
- data/lib/xero-ruby/models/contact_person.rb +1 -1
- data/lib/xero-ruby/models/contacts.rb +1 -1
- data/lib/xero-ruby/models/credit_note.rb +1 -1
- data/lib/xero-ruby/models/credit_notes.rb +1 -1
- data/lib/xero-ruby/models/currencies.rb +1 -1
- data/lib/xero-ruby/models/currency.rb +1 -1
- data/lib/xero-ruby/models/element.rb +1 -1
- data/lib/xero-ruby/models/employee.rb +1 -1
- data/lib/xero-ruby/models/employees.rb +1 -1
- data/lib/xero-ruby/models/error.rb +1 -1
- data/lib/xero-ruby/models/expense_claim.rb +1 -1
- data/lib/xero-ruby/models/expense_claims.rb +1 -1
- data/lib/xero-ruby/models/external_link.rb +1 -1
- data/lib/xero-ruby/models/history_record.rb +1 -1
- data/lib/xero-ruby/models/history_records.rb +1 -1
- data/lib/xero-ruby/models/invoice.rb +1 -1
- data/lib/xero-ruby/models/invoice_reminder.rb +1 -1
- data/lib/xero-ruby/models/invoice_reminders.rb +1 -1
- data/lib/xero-ruby/models/invoices.rb +1 -1
- data/lib/xero-ruby/models/item.rb +1 -1
- data/lib/xero-ruby/models/items.rb +1 -1
- data/lib/xero-ruby/models/journal.rb +1 -1
- data/lib/xero-ruby/models/journal_line.rb +1 -1
- data/lib/xero-ruby/models/journals.rb +1 -1
- data/lib/xero-ruby/models/line_item.rb +1 -1
- data/lib/xero-ruby/models/line_item_tracking.rb +1 -1
- data/lib/xero-ruby/models/linked_transaction.rb +1 -1
- data/lib/xero-ruby/models/linked_transactions.rb +1 -1
- data/lib/xero-ruby/models/manual_journal.rb +1 -1
- data/lib/xero-ruby/models/manual_journal_line.rb +1 -1
- data/lib/xero-ruby/models/manual_journals.rb +1 -1
- data/lib/xero-ruby/models/online_invoice.rb +1 -1
- data/lib/xero-ruby/models/online_invoices.rb +1 -1
- data/lib/xero-ruby/models/organisation.rb +1 -1
- data/lib/xero-ruby/models/organisations.rb +1 -1
- data/lib/xero-ruby/models/overpayment.rb +1 -1
- data/lib/xero-ruby/models/overpayments.rb +1 -1
- data/lib/xero-ruby/models/payment.rb +1 -1
- data/lib/xero-ruby/models/payment_service.rb +1 -1
- data/lib/xero-ruby/models/payment_services.rb +1 -1
- data/lib/xero-ruby/models/payment_term.rb +1 -1
- data/lib/xero-ruby/models/payments.rb +1 -1
- data/lib/xero-ruby/models/phone.rb +1 -1
- data/lib/xero-ruby/models/prepayment.rb +1 -1
- data/lib/xero-ruby/models/prepayments.rb +1 -1
- data/lib/xero-ruby/models/purchase.rb +1 -1
- data/lib/xero-ruby/models/purchase_order.rb +1 -1
- data/lib/xero-ruby/models/purchase_orders.rb +1 -1
- data/lib/xero-ruby/models/receipt.rb +1 -1
- data/lib/xero-ruby/models/receipts.rb +1 -1
- data/lib/xero-ruby/models/repeating_invoice.rb +1 -1
- data/lib/xero-ruby/models/repeating_invoices.rb +1 -1
- data/lib/xero-ruby/models/report.rb +1 -1
- data/lib/xero-ruby/models/report_attribute.rb +1 -1
- data/lib/xero-ruby/models/report_cell.rb +1 -1
- data/lib/xero-ruby/models/report_fields.rb +1 -1
- data/lib/xero-ruby/models/report_row.rb +1 -1
- data/lib/xero-ruby/models/report_rows.rb +1 -1
- data/lib/xero-ruby/models/report_with_row.rb +1 -1
- data/lib/xero-ruby/models/report_with_rows.rb +1 -1
- data/lib/xero-ruby/models/reports.rb +1 -1
- data/lib/xero-ruby/models/request_empty.rb +1 -1
- data/lib/xero-ruby/models/sales_tracking_category.rb +1 -1
- data/lib/xero-ruby/models/schedule.rb +1 -1
- data/lib/xero-ruby/models/tax_component.rb +1 -1
- data/lib/xero-ruby/models/tax_rate.rb +1 -1
- data/lib/xero-ruby/models/tax_rates.rb +1 -1
- data/lib/xero-ruby/models/ten_nintey_nine_contact.rb +1 -1
- data/lib/xero-ruby/models/tracking_categories.rb +1 -1
- data/lib/xero-ruby/models/tracking_category.rb +1 -1
- data/lib/xero-ruby/models/tracking_option.rb +1 -1
- data/lib/xero-ruby/models/tracking_options.rb +1 -1
- data/lib/xero-ruby/models/user.rb +1 -1
- data/lib/xero-ruby/models/users.rb +1 -1
- data/lib/xero-ruby/models/validation_error.rb +1 -1
- data/lib/xero-ruby/version.rb +1 -1
- data/pkg/xero-ruby-0.1.2.gem +0 -0
- data/spec/api/accounting_api_spec.rb +410 -58
- data/spec/api_client_spec.rb +31 -31
- data/spec/configuration_spec.rb +5 -5
- data/spec/models/account_spec.rb +6 -6
- data/spec/models/account_type_spec.rb +5 -5
- data/spec/models/accounts_payable_spec.rb +5 -5
- data/spec/models/accounts_receivable_spec.rb +5 -5
- data/spec/models/accounts_spec.rb +5 -5
- data/spec/models/address_spec.rb +5 -5
- data/spec/models/allocation_spec.rb +5 -5
- data/spec/models/allocations_spec.rb +5 -5
- data/spec/models/attachment_spec.rb +5 -5
- data/spec/models/attachments_spec.rb +5 -5
- data/spec/models/balances_spec.rb +5 -5
- data/spec/models/bank_transaction_spec.rb +7 -7
- data/spec/models/bank_transactions_spec.rb +5 -5
- data/spec/models/bank_transfer_spec.rb +5 -5
- data/spec/models/bank_transfers_spec.rb +5 -5
- data/spec/models/batch_payment_details_spec.rb +5 -5
- data/spec/models/batch_payment_spec.rb +5 -5
- data/spec/models/batch_payments_spec.rb +5 -5
- data/spec/models/bill_spec.rb +5 -5
- data/spec/models/branding_theme_spec.rb +5 -5
- data/spec/models/branding_themes_spec.rb +5 -5
- data/spec/models/cis_org_setting_spec.rb +5 -5
- data/spec/models/cis_setting_spec.rb +5 -5
- data/spec/models/cis_settings_spec.rb +5 -5
- data/spec/models/contact_group_spec.rb +5 -5
- data/spec/models/contact_groups_spec.rb +5 -5
- data/spec/models/contact_person_spec.rb +5 -5
- data/spec/models/contact_spec.rb +5 -5
- data/spec/models/contacts_spec.rb +5 -5
- data/spec/models/country_code_spec.rb +5 -5
- data/spec/models/credit_note_spec.rb +5 -5
- data/spec/models/credit_notes_spec.rb +5 -5
- data/spec/models/currencies_spec.rb +5 -5
- data/spec/models/currency_code_spec.rb +5 -5
- data/spec/models/currency_spec.rb +5 -5
- data/spec/models/element_spec.rb +5 -5
- data/spec/models/employee_spec.rb +5 -5
- data/spec/models/employees_spec.rb +5 -5
- data/spec/models/error_spec.rb +5 -5
- data/spec/models/expense_claim_spec.rb +5 -5
- data/spec/models/expense_claims_spec.rb +5 -5
- data/spec/models/external_link_spec.rb +5 -5
- data/spec/models/history_record_spec.rb +5 -5
- data/spec/models/history_records_spec.rb +5 -5
- data/spec/models/invoice_reminder_spec.rb +5 -5
- data/spec/models/invoice_reminders_spec.rb +5 -5
- data/spec/models/invoice_spec.rb +12 -6
- data/spec/models/invoices_spec.rb +5 -5
- data/spec/models/item_spec.rb +5 -5
- data/spec/models/items_spec.rb +5 -5
- data/spec/models/journal_line_spec.rb +5 -5
- data/spec/models/journal_spec.rb +5 -5
- data/spec/models/journals_spec.rb +5 -5
- data/spec/models/line_amount_types_spec.rb +5 -5
- data/spec/models/line_item_spec.rb +11 -5
- data/spec/models/line_item_tracking_spec.rb +5 -5
- data/spec/models/linked_transaction_spec.rb +5 -5
- data/spec/models/linked_transactions_spec.rb +5 -5
- data/spec/models/manual_journal_line_spec.rb +5 -5
- data/spec/models/manual_journal_spec.rb +5 -5
- data/spec/models/manual_journals_spec.rb +5 -5
- data/spec/models/online_invoice_spec.rb +5 -5
- data/spec/models/online_invoices_spec.rb +5 -5
- data/spec/models/organisation_spec.rb +7 -7
- data/spec/models/organisations_spec.rb +5 -5
- data/spec/models/overpayment_spec.rb +6 -6
- data/spec/models/overpayments_spec.rb +5 -5
- data/spec/models/payment_service_spec.rb +5 -5
- data/spec/models/payment_services_spec.rb +5 -5
- data/spec/models/payment_spec.rb +5 -5
- data/spec/models/payment_term_spec.rb +5 -5
- data/spec/models/payment_term_type_spec.rb +5 -5
- data/spec/models/payments_spec.rb +5 -5
- data/spec/models/phone_spec.rb +5 -5
- data/spec/models/prepayment_spec.rb +6 -6
- data/spec/models/prepayments_spec.rb +5 -5
- data/spec/models/purchase_order_spec.rb +5 -5
- data/spec/models/purchase_orders_spec.rb +5 -5
- data/spec/models/purchase_spec.rb +5 -5
- data/spec/models/receipt_spec.rb +7 -7
- data/spec/models/receipts_spec.rb +5 -5
- data/spec/models/repeating_invoice_spec.rb +5 -5
- data/spec/models/repeating_invoices_spec.rb +5 -5
- data/spec/models/report_attribute_spec.rb +5 -5
- data/spec/models/report_cell_spec.rb +5 -5
- data/spec/models/report_fields_spec.rb +5 -5
- data/spec/models/report_row_spec.rb +5 -5
- data/spec/models/report_rows_spec.rb +5 -5
- data/spec/models/report_spec.rb +5 -5
- data/spec/models/report_with_row_spec.rb +5 -5
- data/spec/models/report_with_rows_spec.rb +5 -5
- data/spec/models/reports_spec.rb +5 -5
- data/spec/models/request_empty_spec.rb +5 -5
- data/spec/models/row_type_spec.rb +5 -5
- data/spec/models/schedule_spec.rb +5 -5
- data/spec/models/tax_component_spec.rb +5 -5
- data/spec/models/tax_rate_spec.rb +6 -6
- data/spec/models/tax_rates_spec.rb +5 -5
- data/spec/models/tax_type_spec.rb +5 -5
- data/spec/models/ten_nintey_nine_contact_spec.rb +5 -5
- data/spec/models/time_zone_spec.rb +5 -5
- data/spec/models/tracking_categories_spec.rb +5 -5
- data/spec/models/tracking_category_spec.rb +6 -6
- data/spec/models/tracking_option_spec.rb +6 -6
- data/spec/models/tracking_options_spec.rb +5 -5
- data/spec/models/user_spec.rb +6 -6
- data/spec/models/users_spec.rb +5 -5
- data/spec/models/validation_error_spec.rb +5 -5
- data/spec/spec_helper.rb +3 -3
- data/xero-ruby.gemspec +2 -2
- metadata +5 -7
- data/lib/.DS_Store +0 -0
- data/pkg/xero-ruby-0.1.0.gem +0 -0
- data/pkg/xero-ruby-1.0.0.gem +0 -0
data/spec/api_client_spec.rb
CHANGED
@@ -3,60 +3,60 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
OpenAPI
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 4.0.3
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'spec_helper'
|
14
14
|
|
15
|
-
describe
|
15
|
+
describe XeroRuby::ApiClient do
|
16
16
|
context 'initialization' do
|
17
17
|
context 'URL stuff' do
|
18
18
|
context 'host' do
|
19
19
|
it 'removes http from host' do
|
20
|
-
|
21
|
-
expect(
|
20
|
+
XeroRuby.configure { |c| c.host = 'http://example.com' }
|
21
|
+
expect(XeroRuby::Configuration.default.host).to eq('example.com')
|
22
22
|
end
|
23
23
|
|
24
24
|
it 'removes https from host' do
|
25
|
-
|
26
|
-
expect(
|
25
|
+
XeroRuby.configure { |c| c.host = 'https://wookiee.com' }
|
26
|
+
expect(XeroRuby::ApiClient.default.config.host).to eq('wookiee.com')
|
27
27
|
end
|
28
28
|
|
29
29
|
it 'removes trailing path from host' do
|
30
|
-
|
31
|
-
expect(
|
30
|
+
XeroRuby.configure { |c| c.host = 'hobo.com/v4' }
|
31
|
+
expect(XeroRuby::Configuration.default.host).to eq('hobo.com')
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
35
|
context 'base_path' do
|
36
36
|
it "prepends a slash to base_path" do
|
37
|
-
|
38
|
-
expect(
|
37
|
+
XeroRuby.configure { |c| c.base_path = 'v4/dog' }
|
38
|
+
expect(XeroRuby::Configuration.default.base_path).to eq('/v4/dog')
|
39
39
|
end
|
40
40
|
|
41
41
|
it "doesn't prepend a slash if one is already there" do
|
42
|
-
|
43
|
-
expect(
|
42
|
+
XeroRuby.configure { |c| c.base_path = '/v4/dog' }
|
43
|
+
expect(XeroRuby::Configuration.default.base_path).to eq('/v4/dog')
|
44
44
|
end
|
45
45
|
|
46
46
|
it "ends up as a blank string if nil" do
|
47
|
-
|
48
|
-
expect(
|
47
|
+
XeroRuby.configure { |c| c.base_path = nil }
|
48
|
+
expect(XeroRuby::Configuration.default.base_path).to eq('')
|
49
49
|
end
|
50
50
|
end
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
54
|
describe 'params_encoding in #build_request' do
|
55
|
-
let(:config) {
|
56
|
-
let(:api_client) {
|
55
|
+
let(:config) { XeroRuby::Configuration.new }
|
56
|
+
let(:api_client) { XeroRuby::ApiClient.new(config) }
|
57
57
|
|
58
58
|
it 'defaults to nil' do
|
59
|
-
expect(
|
59
|
+
expect(XeroRuby::Configuration.default.params_encoding).to eq(nil)
|
60
60
|
expect(config.params_encoding).to eq(nil)
|
61
61
|
|
62
62
|
request = api_client.build_request(:get, '/test')
|
@@ -71,11 +71,11 @@ describe Petstore::ApiClient do
|
|
71
71
|
end
|
72
72
|
|
73
73
|
describe 'timeout in #build_request' do
|
74
|
-
let(:config) {
|
75
|
-
let(:api_client) {
|
74
|
+
let(:config) { XeroRuby::Configuration.new }
|
75
|
+
let(:api_client) { XeroRuby::ApiClient.new(config) }
|
76
76
|
|
77
77
|
it 'defaults to 0' do
|
78
|
-
expect(
|
78
|
+
expect(XeroRuby::Configuration.default.timeout).to eq(0)
|
79
79
|
expect(config.timeout).to eq(0)
|
80
80
|
|
81
81
|
request = api_client.build_request(:get, '/test')
|
@@ -91,7 +91,7 @@ describe Petstore::ApiClient do
|
|
91
91
|
|
92
92
|
describe '#deserialize' do
|
93
93
|
it "handles Array<Integer>" do
|
94
|
-
api_client =
|
94
|
+
api_client = XeroRuby::ApiClient.new
|
95
95
|
headers = { 'Content-Type' => 'application/json' }
|
96
96
|
response = double('response', headers: headers, body: '[12, 34]')
|
97
97
|
data = api_client.deserialize(response, 'Array<Integer>')
|
@@ -100,7 +100,7 @@ describe Petstore::ApiClient do
|
|
100
100
|
end
|
101
101
|
|
102
102
|
it 'handles Array<Array<Integer>>' do
|
103
|
-
api_client =
|
103
|
+
api_client = XeroRuby::ApiClient.new
|
104
104
|
headers = { 'Content-Type' => 'application/json' }
|
105
105
|
response = double('response', headers: headers, body: '[[12, 34], [56]]')
|
106
106
|
data = api_client.deserialize(response, 'Array<Array<Integer>>')
|
@@ -109,7 +109,7 @@ describe Petstore::ApiClient do
|
|
109
109
|
end
|
110
110
|
|
111
111
|
it 'handles Hash<String, String>' do
|
112
|
-
api_client =
|
112
|
+
api_client = XeroRuby::ApiClient.new
|
113
113
|
headers = { 'Content-Type' => 'application/json' }
|
114
114
|
response = double('response', headers: headers, body: '{"message": "Hello"}')
|
115
115
|
data = api_client.deserialize(response, 'Hash<String, String>')
|
@@ -121,8 +121,8 @@ describe Petstore::ApiClient do
|
|
121
121
|
describe "#object_to_hash" do
|
122
122
|
it 'ignores nils and includes empty arrays' do
|
123
123
|
# uncomment below to test object_to_hash for model
|
124
|
-
# api_client =
|
125
|
-
# _model =
|
124
|
+
# api_client = XeroRuby::ApiClient.new
|
125
|
+
# _model = XeroRuby::ModelName.new
|
126
126
|
# update the model attribute below
|
127
127
|
# _model.id = 1
|
128
128
|
# update the expected value (hash) below
|
@@ -133,7 +133,7 @@ describe Petstore::ApiClient do
|
|
133
133
|
|
134
134
|
describe '#build_collection_param' do
|
135
135
|
let(:param) { ['aa', 'bb', 'cc'] }
|
136
|
-
let(:api_client) {
|
136
|
+
let(:api_client) { XeroRuby::ApiClient.new }
|
137
137
|
|
138
138
|
it 'works for csv' do
|
139
139
|
expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
|
@@ -161,7 +161,7 @@ describe Petstore::ApiClient do
|
|
161
161
|
end
|
162
162
|
|
163
163
|
describe '#json_mime?' do
|
164
|
-
let(:api_client) {
|
164
|
+
let(:api_client) { XeroRuby::ApiClient.new }
|
165
165
|
|
166
166
|
it 'works' do
|
167
167
|
expect(api_client.json_mime?(nil)).to eq false
|
@@ -178,7 +178,7 @@ describe Petstore::ApiClient do
|
|
178
178
|
end
|
179
179
|
|
180
180
|
describe '#select_header_accept' do
|
181
|
-
let(:api_client) {
|
181
|
+
let(:api_client) { XeroRuby::ApiClient.new }
|
182
182
|
|
183
183
|
it 'works' do
|
184
184
|
expect(api_client.select_header_accept(nil)).to be_nil
|
@@ -194,7 +194,7 @@ describe Petstore::ApiClient do
|
|
194
194
|
end
|
195
195
|
|
196
196
|
describe '#select_header_content_type' do
|
197
|
-
let(:api_client) {
|
197
|
+
let(:api_client) { XeroRuby::ApiClient.new }
|
198
198
|
|
199
199
|
it 'works' do
|
200
200
|
expect(api_client.select_header_content_type(nil)).to eq('application/json')
|
@@ -209,7 +209,7 @@ describe Petstore::ApiClient do
|
|
209
209
|
end
|
210
210
|
|
211
211
|
describe '#sanitize_filename' do
|
212
|
-
let(:api_client) {
|
212
|
+
let(:api_client) { XeroRuby::ApiClient.new }
|
213
213
|
|
214
214
|
it 'works' do
|
215
215
|
expect(api_client.sanitize_filename('sun')).to eq('sun')
|
data/spec/configuration_spec.rb
CHANGED
@@ -3,23 +3,23 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
OpenAPI
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 4.0.3
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'spec_helper'
|
14
14
|
|
15
|
-
describe
|
16
|
-
let(:config) {
|
15
|
+
describe XeroRuby::Configuration do
|
16
|
+
let(:config) { XeroRuby::Configuration.default }
|
17
17
|
|
18
18
|
before(:each) do
|
19
19
|
# uncomment below to setup host and base_path
|
20
20
|
# require 'URI'
|
21
21
|
# uri = URI.parse("https://api.xero.com/api.xro/2.0")
|
22
|
-
#
|
22
|
+
# XeroRuby.configure do |c|
|
23
23
|
# c.host = uri.host
|
24
24
|
# c.base_path = uri.path
|
25
25
|
# end
|
data/spec/models/account_spec.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
OpenAPI
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 4.0.3
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -14,13 +14,13 @@ require 'spec_helper'
|
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
16
|
|
17
|
-
# Unit tests for
|
17
|
+
# Unit tests for XeroRuby::Account
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
19
|
# Please update as you see appropriate
|
20
20
|
describe 'Account' do
|
21
21
|
before do
|
22
22
|
# run before each test
|
23
|
-
@instance =
|
23
|
+
@instance = XeroRuby::Account.new
|
24
24
|
end
|
25
25
|
|
26
26
|
after do
|
@@ -29,7 +29,7 @@ describe 'Account' do
|
|
29
29
|
|
30
30
|
describe 'test an instance of Account' do
|
31
31
|
it 'should create an instance of Account' do
|
32
|
-
expect(@instance).to be_instance_of(
|
32
|
+
expect(@instance).to be_instance_of(XeroRuby::Account)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
describe 'test attribute "code"' do
|
@@ -81,7 +81,7 @@ describe 'Account' do
|
|
81
81
|
describe 'test attribute "bank_account_type"' do
|
82
82
|
it 'should work' do
|
83
83
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
84
|
-
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["BANK", "CREDITCARD", "PAYPAL", ""])
|
84
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["BANK", "CREDITCARD", "PAYPAL", "NONE", ""])
|
85
85
|
# validator.allowable_values.each do |value|
|
86
86
|
# expect { @instance.bank_account_type = value }.not_to raise_error
|
87
87
|
# end
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
OpenAPI
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 4.0.3
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -14,13 +14,13 @@ require 'spec_helper'
|
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
16
|
|
17
|
-
# Unit tests for
|
17
|
+
# Unit tests for XeroRuby::AccountType
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
19
|
# Please update as you see appropriate
|
20
20
|
describe 'AccountType' do
|
21
21
|
before do
|
22
22
|
# run before each test
|
23
|
-
@instance =
|
23
|
+
@instance = XeroRuby::AccountType.new
|
24
24
|
end
|
25
25
|
|
26
26
|
after do
|
@@ -29,7 +29,7 @@ describe 'AccountType' do
|
|
29
29
|
|
30
30
|
describe 'test an instance of AccountType' do
|
31
31
|
it 'should create an instance of AccountType' do
|
32
|
-
expect(@instance).to be_instance_of(
|
32
|
+
expect(@instance).to be_instance_of(XeroRuby::AccountType)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
end
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
OpenAPI
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 4.0.3
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -14,13 +14,13 @@ require 'spec_helper'
|
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
16
|
|
17
|
-
# Unit tests for
|
17
|
+
# Unit tests for XeroRuby::AccountsPayable
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
19
|
# Please update as you see appropriate
|
20
20
|
describe 'AccountsPayable' do
|
21
21
|
before do
|
22
22
|
# run before each test
|
23
|
-
@instance =
|
23
|
+
@instance = XeroRuby::AccountsPayable.new
|
24
24
|
end
|
25
25
|
|
26
26
|
after do
|
@@ -29,7 +29,7 @@ describe 'AccountsPayable' do
|
|
29
29
|
|
30
30
|
describe 'test an instance of AccountsPayable' do
|
31
31
|
it 'should create an instance of AccountsPayable' do
|
32
|
-
expect(@instance).to be_instance_of(
|
32
|
+
expect(@instance).to be_instance_of(XeroRuby::AccountsPayable)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
describe 'test attribute "outstanding"' do
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
OpenAPI
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 4.0.3
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -14,13 +14,13 @@ require 'spec_helper'
|
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
16
|
|
17
|
-
# Unit tests for
|
17
|
+
# Unit tests for XeroRuby::AccountsReceivable
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
19
|
# Please update as you see appropriate
|
20
20
|
describe 'AccountsReceivable' do
|
21
21
|
before do
|
22
22
|
# run before each test
|
23
|
-
@instance =
|
23
|
+
@instance = XeroRuby::AccountsReceivable.new
|
24
24
|
end
|
25
25
|
|
26
26
|
after do
|
@@ -29,7 +29,7 @@ describe 'AccountsReceivable' do
|
|
29
29
|
|
30
30
|
describe 'test an instance of AccountsReceivable' do
|
31
31
|
it 'should create an instance of AccountsReceivable' do
|
32
|
-
expect(@instance).to be_instance_of(
|
32
|
+
expect(@instance).to be_instance_of(XeroRuby::AccountsReceivable)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
describe 'test attribute "outstanding"' do
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
OpenAPI
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 4.0.3
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -14,13 +14,13 @@ require 'spec_helper'
|
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
16
|
|
17
|
-
# Unit tests for
|
17
|
+
# Unit tests for XeroRuby::Accounts
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
19
|
# Please update as you see appropriate
|
20
20
|
describe 'Accounts' do
|
21
21
|
before do
|
22
22
|
# run before each test
|
23
|
-
@instance =
|
23
|
+
@instance = XeroRuby::Accounts.new
|
24
24
|
end
|
25
25
|
|
26
26
|
after do
|
@@ -29,7 +29,7 @@ describe 'Accounts' do
|
|
29
29
|
|
30
30
|
describe 'test an instance of Accounts' do
|
31
31
|
it 'should create an instance of Accounts' do
|
32
|
-
expect(@instance).to be_instance_of(
|
32
|
+
expect(@instance).to be_instance_of(XeroRuby::Accounts)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
describe 'test attribute "accounts"' do
|
data/spec/models/address_spec.rb
CHANGED
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
OpenAPI
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 4.0.3
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -14,13 +14,13 @@ require 'spec_helper'
|
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
16
|
|
17
|
-
# Unit tests for
|
17
|
+
# Unit tests for XeroRuby::Address
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
19
|
# Please update as you see appropriate
|
20
20
|
describe 'Address' do
|
21
21
|
before do
|
22
22
|
# run before each test
|
23
|
-
@instance =
|
23
|
+
@instance = XeroRuby::Address.new
|
24
24
|
end
|
25
25
|
|
26
26
|
after do
|
@@ -29,7 +29,7 @@ describe 'Address' do
|
|
29
29
|
|
30
30
|
describe 'test an instance of Address' do
|
31
31
|
it 'should create an instance of Address' do
|
32
|
-
expect(@instance).to be_instance_of(
|
32
|
+
expect(@instance).to be_instance_of(XeroRuby::Address)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
describe 'test attribute "address_type"' do
|
@@ -3,10 +3,10 @@
|
|
3
3
|
|
4
4
|
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
5
|
|
6
|
-
OpenAPI
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
7
|
Contact: api@xero.com
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 4.0.3
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -14,13 +14,13 @@ require 'spec_helper'
|
|
14
14
|
require 'json'
|
15
15
|
require 'date'
|
16
16
|
|
17
|
-
# Unit tests for
|
17
|
+
# Unit tests for XeroRuby::Allocation
|
18
18
|
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
19
|
# Please update as you see appropriate
|
20
20
|
describe 'Allocation' do
|
21
21
|
before do
|
22
22
|
# run before each test
|
23
|
-
@instance =
|
23
|
+
@instance = XeroRuby::Allocation.new
|
24
24
|
end
|
25
25
|
|
26
26
|
after do
|
@@ -29,7 +29,7 @@ describe 'Allocation' do
|
|
29
29
|
|
30
30
|
describe 'test an instance of Allocation' do
|
31
31
|
it 'should create an instance of Allocation' do
|
32
|
-
expect(@instance).to be_instance_of(
|
32
|
+
expect(@instance).to be_instance_of(XeroRuby::Allocation)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
describe 'test attribute "invoice"' do
|