Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ jobs:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
run: bundle exec rake
run: bundle exec rspec
1 change: 0 additions & 1 deletion fattureincloud_ruby_sdk.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ Gem::Specification.new do |s|
s.metadata = {}

s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
s.add_dependency 'ostruct', '~> 0.6'

s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'

Expand Down
5 changes: 0 additions & 5 deletions spec/api/archive_api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@
it 'should work' do
opts = { "data": { "date": "2021-08-20", "category": "Altri documenti", "description": "spesa 1", "attachment_token": "YjFrbmNlc3E0NmNuaW5ocXQ0b2p0c202NG1ncWx6ZmsvZmlsZW5hbWU" } }
response = @api_instance.create_archive_document(2, opts)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @create_archive_document_response_obj.to_json
actual_json = response.to_json

Expand Down Expand Up @@ -91,7 +90,6 @@
describe 'get_archive_document test' do
it 'should work' do
response = @api_instance.get_archive_document(2, 22)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @get_archive_document_response_obj.to_json
actual_json = response.to_json

Expand All @@ -114,7 +112,6 @@
describe 'list_archive_documents test' do
it 'should work' do
response = @api_instance.list_archive_documents(2)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @list_archive_documents_response_obj.to_json
actual_json = response.to_json

Expand All @@ -133,7 +130,6 @@
describe 'modify_archive_document test' do
it 'should work' do
response = @api_instance.modify_archive_document(2, 22)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @modify_archive_document_response_obj.to_json
actual_json = response.to_json

Expand All @@ -153,7 +149,6 @@
it 'should work' do
opts = {}
response = @api_instance.upload_archive_document_attachment(2, opts)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @upload_archive_document_attachment_response_obj.to_json
actual_json = response.to_json

Expand Down
4 changes: 0 additions & 4 deletions spec/api/cashbook_api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
it 'should work' do
opts = { "data": { "date": "2021-08-24", "amount_in": 122, "payment_account_in": { "id": 21 }, "description": "Fattura n. 201\/2021", "entity_name": "Rossi S.r.l.", "kind": "issued_document", "document": { "id": 54321 }, "type": "in" } }
response = @api_instance.create_cashbook_entry(2, opts)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @create_cashbook_entry_response_obj.to_json
actual_json = response.to_json

Expand Down Expand Up @@ -89,7 +88,6 @@
describe 'get_cashbook_entry test' do
it 'should work' do
response = @api_instance.get_cashbook_entry(2, 22)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @get_cashbook_entry_response_obj.to_json
actual_json = response.to_json

Expand All @@ -111,7 +109,6 @@
describe 'list_cashbook_entries test' do
it 'should work' do
response = @api_instance.list_cashbook_entries(2, "2020-12-12", "2021-12-12")
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @list_cashbook_entries_response_obj.to_json
actual_json = response.to_json

Expand All @@ -131,7 +128,6 @@
it 'should work' do
opts = { "data": { "date": "2021-08-24", "amount_in": 122, "payment_account_in": { "id": 21 }, "description": "Fattura n. 201\/2021", "entity_name": "Rossi S.r.l.", "kind": "issued_document", "document": { "id": 54321 }, "type": "in" } }
response = @api_instance.modify_cashbook_entry(2, opts)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @modify_cashbook_entry_response_obj.to_json
actual_json = response.to_json

Expand Down
4 changes: 0 additions & 4 deletions spec/api/clients_api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
it 'should work' do
opts = { "data": { "date": "2021-08-24", "amount_in": 122, "payment_account_in": { "id": 21 }, "description": "Fattura n. 201\/2021", "entity_name": "Rossi S.r.l.", "kind": "issued_document", "document": { "id": 54321 }, "type": "in" } }
response = @api_instance.create_client(2, opts)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @create_client_response_obj.to_json
actual_json = response.to_json

Expand Down Expand Up @@ -89,7 +88,6 @@
describe 'get_client test' do
it 'should work' do
response = @api_instance.get_client(2, 22)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @get_client_response_obj.to_json
actual_json = response.to_json

Expand All @@ -112,7 +110,6 @@
describe 'list_clients test' do
it 'should work' do
response = @api_instance.list_clients(2)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @list_clients_response_obj.to_json
actual_json = response.to_json

Expand All @@ -132,7 +129,6 @@
it 'should work' do
opts = { "data": { "date": "2021-08-24", "amount_in": 122, "payment_account_in": { "id": 21 }, "description": "Fattura n. 201\/2021", "entity_name": "Rossi S.r.l.", "kind": "issued_document", "document": { "id": 54321 }, "type": "in" } }
response = @api_instance.modify_client(2, opts)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @modify_client_response_obj.to_json
actual_json = response.to_json

Expand Down
1 change: 0 additions & 1 deletion spec/api/companies_api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
describe 'get_company_info test' do
it 'should work' do
response = @api_instance.get_company_info(2)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @get_company_info_response_obj.to_json
actual_json = response.to_json

Expand Down
1 change: 0 additions & 1 deletion spec/api/emails_api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
describe 'list_emails test' do
it 'should work' do
response = @api_instance.list_emails(2)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @list_emails_response_obj.to_json
actual_json = response.to_json

Expand Down
16 changes: 0 additions & 16 deletions spec/api/info_api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
describe 'list_archive_categories test' do
it 'should work' do
response = @api_instance.list_archive_categories(2)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @list_archive_categories_response_obj.to_json
actual_json = response.to_json

Expand All @@ -107,7 +106,6 @@
describe 'list_cities test' do
it 'should work' do
response = @api_instance.list_cities(2)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @list_cities_response_obj.to_json
actual_json = response.to_json

Expand All @@ -124,7 +122,6 @@
describe 'list_cost_centers test' do
it 'should work' do
response = @api_instance.list_cost_centers(2)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @list_cost_centers_response_obj.to_json
actual_json = response.to_json

Expand All @@ -140,7 +137,6 @@
describe 'list_countries test' do
it 'should work' do
response = @api_instance.list_countries(2)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @list_countries_response_obj.to_json
actual_json = response.to_json

Expand All @@ -156,7 +152,6 @@
describe 'list_detailed_countries test' do
it 'should work' do
response = @api_instance.list_detailed_countries(2)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @list_detailed_countries_response_obj.to_json
actual_json = response.to_json

Expand All @@ -172,7 +167,6 @@
describe 'list_currencies test' do
it 'should work' do
response = @api_instance.list_currencies(2)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @list_currencies_response_obj.to_json
actual_json = response.to_json

Expand All @@ -188,7 +182,6 @@
describe 'list_delivery_notes_default_causals test' do
it 'should work' do
response = @api_instance.list_delivery_notes_default_causals(2)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @list_delivery_notes_default_causals_response_obj.to_json
actual_json = response.to_json

Expand All @@ -204,7 +197,6 @@
describe 'list_languages test' do
it 'should work' do
response = @api_instance.list_languages(2)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @list_languages_response_obj.to_json
actual_json = response.to_json

Expand All @@ -224,7 +216,6 @@
describe 'list_payment_accounts test' do
it 'should work' do
response = @api_instance.list_payment_accounts(2)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @list_payment_accounts_response_obj.to_json
actual_json = response.to_json

Expand All @@ -244,7 +235,6 @@
describe 'list_payment_methods test' do
it 'should work' do
response = @api_instance.list_payment_methods(2)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @list_payment_methods_response_obj.to_json
actual_json = response.to_json

Expand All @@ -262,7 +252,6 @@
describe 'list_product_categories test' do
it 'should work' do
response = @api_instance.list_product_categories(2, "issued_documents")
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @list_product_categories_response_obj.to_json
actual_json = response.to_json

Expand All @@ -279,7 +268,6 @@
describe 'list_received_document_categories test' do
it 'should work' do
response = @api_instance.list_received_document_categories(2)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @list_received_document_categories_response_obj.to_json
actual_json = response.to_json

Expand All @@ -296,7 +284,6 @@
describe 'list_revenue_centers test' do
it 'should work' do
response = @api_instance.list_revenue_centers(2)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @list_revenue_centers_response_obj.to_json
actual_json = response.to_json

Expand All @@ -314,7 +301,6 @@
describe 'list_default_templates test' do
it 'should work' do
response = @api_instance.list_default_templates(2)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @list_templates_response_obj.to_json
actual_json = response.to_json

Expand All @@ -330,7 +316,6 @@
describe 'list_units_of_measure test' do
it 'should work' do
response = @api_instance.list_units_of_measure(2)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @list_units_of_measure_response_obj.to_json
actual_json = response.to_json

Expand All @@ -348,7 +333,6 @@
describe 'list_vat_types test' do
it 'should work' do
response = @api_instance.list_vat_types(2)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @list_vat_types_response_obj.to_json
actual_json = response.to_json

Expand Down
11 changes: 0 additions & 11 deletions spec/api/issued_documents_api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
it 'should work' do
opts = { "data": { "date": "2021-08-24", "amount_in": 122, "payment_account_in": { "id": 21 }, "description": "Fattura n. 201\/2021", "entity_name": "Rossi S.r.l.", "kind": "issued_document", "document": { "id": 54321 }, "type": "in" } }
response = @api_instance.create_issued_document(2, opts)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @create_issued_document_response_obj.to_json
actual_json = response.to_json

Expand Down Expand Up @@ -120,7 +119,6 @@
describe 'get_email_data test' do
it 'should work' do
response = @api_instance.get_email_data(2, 22)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @get_email_data_response_obj.to_json
actual_json = response.to_json

Expand All @@ -139,7 +137,6 @@
describe 'get_existing_issued_document_totals test' do
it 'should work' do
response = @api_instance.get_existing_issued_document_totals(2, 22)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @get_existing_issued_document_totals_response_obj.to_json
actual_json = response.to_json

Expand All @@ -159,7 +156,6 @@
describe 'get_issued_document test' do
it 'should work' do
response = @api_instance.get_issued_document(2, 22)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @get_issued_document_response_obj.to_json
actual_json = response.to_json

Expand All @@ -177,7 +173,6 @@
describe 'get_issued_document_pre_create_info test' do
it 'should work' do
response = @api_instance.get_issued_document_pre_create_info(2, 22)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @get_issued_document_pre_create_info_response_obj.to_json
actual_json = response.to_json

Expand All @@ -196,7 +191,6 @@
it 'should work' do
opts = { "data": { "date": "2021-08-24", "amount_in": 122, "payment_account_in": { "id": 21 }, "description": "Fattura n. 201\/2021", "entity_name": "Rossi S.r.l.", "kind": "issued_document", "document": { "id": 54321 }, "type": "in" } }
response = @api_instance.get_new_issued_document_totals(2, opts)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @get_new_issued_document_totals_response_obj.to_json
actual_json = response.to_json

Expand All @@ -220,7 +214,6 @@
describe 'list_issued_documents test' do
it 'should work' do
response = @api_instance.list_issued_documents(2, "invoices")
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @list_issued_documents_response_obj.to_json
actual_json = response.to_json

Expand All @@ -240,7 +233,6 @@
it 'should work' do
opts = { "data": { "date": "2021-08-24", "amount_in": 122, "payment_account_in": { "id": 21 }, "description": "Fattura n. 201\/2021", "entity_name": "Rossi S.r.l.", "kind": "issued_document", "document": { "id": 54321 }, "type": "in" } }
response = @api_instance.modify_issued_document(2, opts)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @modify_issued_document_response_obj.to_json
actual_json = response.to_json

Expand Down Expand Up @@ -273,7 +265,6 @@
describe 'upload_issued_document_attachment test' do
it 'should work' do
response = @api_instance.upload_issued_document_attachment(2, {})
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @upload_issued_document_attachment_response_obj.to_json
actual_json = response.to_json

Expand All @@ -286,7 +277,6 @@
describe 'transform_issued_document test' do
it 'should work' do
response = @api_instance.transform_issued_document(2, 54321, "proforma")
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @transform_issued_document_response_obj.to_json
actual_json = response.to_json

Expand All @@ -299,7 +289,6 @@
describe 'join_issued_documents test' do
it 'should work' do
response = @api_instance.join_issued_documents(2, {})
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @join_issued_documents_response_obj.to_json
actual_json = response.to_json

Expand Down
3 changes: 0 additions & 3 deletions spec/api/issued_e_invoices_api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
describe 'send_e_invoice test' do
it 'should work' do
response = @api_instance.send_e_invoice(2, 22)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @send_e_invoice_response_obj.to_json
actual_json = response.to_json

Expand All @@ -74,7 +73,6 @@
describe 'verify_e_invoice_xml test' do
it 'should work' do
response = @api_instance.verify_e_invoice_xml(2, 22)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @verify_e_invoice_xml_response_obj.to_json
actual_json = response.to_json

Expand Down Expand Up @@ -109,7 +107,6 @@
describe 'get_e_invoice_rejection_reason test' do
it 'should work' do
response = @api_instance.get_e_invoice_rejection_reason(2, 22)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @get_e_invoice_rejection_reason_response_obj.to_json
actual_json = response.to_json

Expand Down
2 changes: 0 additions & 2 deletions spec/api/price_lists_api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
describe 'get_price_list_items test' do
it 'should work' do
response = @api_instance.get_price_list_items(2, '10')
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @get_price_list_items_response_obj.to_json
actual_json = response.to_json

Expand All @@ -66,7 +65,6 @@
describe 'get_price_lists test' do
it 'should work' do
response = @api_instance.get_price_lists(2)
response_obj = JSON.parse(response.to_json, object_class: OpenStruct)
expected_json = @get_price_lists_response_obj.to_json
actual_json = response.to_json

Expand Down
Loading
Loading