def test_list_with_query(self, netvisor, responses): responses.add( method='GET', url='http://koulutus.netvisor.fi/CompanyList.nv?QueryTerm=acme', body=get_response_content('CompanyList.xml'), content_type='text/html; charset=utf-8', match_querystring=True) companies = netvisor.companies.list(query=u'acme') assert companies == [{ 'id': 125, 'is_active': True, 'name': u'ACME', 'finnish_organization_identifier': u'1234567-8' }]
def test_get_raises_error_if_sales_invoice_not_found( self, netvisor, responses): responses.add( method='GET', url= ('http://koulutus.netvisor.fi/GetPurchaseInvoice.nv?NetvisorKey=123&Version=2' ), body=get_response_content('GetPurchaseInvoiceNotFound.xml'), content_type='text/html; charset=utf-8', match_querystring=True) with pytest.raises(InvalidData) as excinfo: netvisor.purchase_invoices.get(123) assert str(excinfo.value) == ( 'Data form incorrect:. ' 'Purchase invoice not found with Netvisor identifier: 123')
def test_get_with_minimal_customer(self, netvisor, responses): responses.add(method='GET', url='http://koulutus.netvisor.fi/GetCustomer.nv?id=5', body=get_response_content('GetCustomerMinimal.xml'), content_type='text/html; charset=utf-8', match_querystring=True) customer = netvisor.customers.get(5) assert customer == { 'customer_base_information': { 'internal_identifier': None, 'external_identifier': None, 'customer_group_netvisor_key': 1, 'customer_group_name': u'Asiakasryhm\xe4 1', 'name': u'Maija Mallikas', 'name_extension': None, 'street_address': None, 'city': None, 'post_number': None, 'country': u'FI', 'phone_number': None, 'fax_number': None, 'email': None, 'email_invoicing_address': None, 'home_page_uri': None, 'is_active': False, }, 'customer_finvoice_details': { 'finvoice_address': None, 'finvoice_router_code': None, }, 'customer_delivery_details': { 'delivery_name': None, 'delivery_street_address': None, 'delivery_post_number': None, 'delivery_city': None, }, 'customer_contact_details': { 'contact_person': None, 'contact_person_email': None, 'contact_person_phone': None, }, 'customer_additional_information': { 'comment': None, 'reference_number': None, 'balance_limit': None, } }
def test_list(self, netvisor, responses): responses.add(method='GET', url='http://koulutus.netvisor.fi/CustomerList.nv', body=get_response_content('CustomerList.xml'), content_type='text/html; charset=utf-8', match_querystring=True) customers = netvisor.customers.list() assert customers == [{ 'netvisor_key': 165, 'name': u'Anni Asiakas', 'code': u'AA', 'organisation_identifier': u'12345678-9', }, { 'netvisor_key': 166, 'name': u'Matti Mallikas', 'code': None, 'organisation_identifier': None, }]
def test_create_product(self, netvisor, responses): responses.add(method='POST', url='http://koulutus.netvisor.fi/Product.nv?method=add', body=get_response_content('ProductCreate.xml'), content_type='text/html; charset=utf-8', match_querystring=True) netvisor_id = netvisor.products.create({ 'product_base_information': { 'product_code': u'CC', 'product_group': u'Kirjat', 'name': u'Code Complete', 'description': u'Toinen painos', 'unit_price': { 'amount': decimal.Decimal('42.5'), 'type': u'gross' }, 'unit': u'kpl', 'purchase_price': decimal.Decimal('25.00'), 'tariff_heading': u'Code Complete', 'comission_percentage': decimal.Decimal('11'), 'is_active': True, 'is_sales_product': False, 'inventory_enabled': False, 'country_of_origin': u'FI', }, 'product_book_keeping_details': { 'default_vat_percentage': decimal.Decimal('22'), }, 'product_additional_information': { 'product_net_weight': decimal.Decimal('11.2'), 'product_gross_weight': decimal.Decimal('12.6'), 'product_weight_unit': u'kg' }, 'product_package_information': { 'package_width': decimal.Decimal('7.3'), 'package_height': decimal.Decimal('15.0'), 'package_length': decimal.Decimal('36.1') } }) request = responses.calls[0].request assert netvisor_id == 8 assert request.body == get_request_content('Product.xml')
def test_create_minimal(self, netvisor, responses): responses.add( method='POST', url='http://koulutus.netvisor.fi/salesinvoice.nv?method=add', body=get_response_content('SalesInvoiceCreate.xml'), content_type='text/html; charset=utf-8', match_querystring=True) netvisor_id = netvisor.sales_invoices.create({ 'date': date(2008, 12, 12), 'amount': decimal.Decimal('244.00'), 'status': 'unsent', 'invoicing_customer_identifier': u'1', 'payment_term_net_days': 14, 'payment_term_cash_discount_days': 5, 'payment_term_cash_discount': decimal.Decimal('9'), 'invoice_lines': [{ 'identifier': dict(identifier="1697", type="netvisor"), 'name': 'Omena', 'unit_price': { 'amount': decimal.Decimal('6.90'), 'type': 'net' }, 'vat_percentage': { 'percentage': decimal.Decimal('22'), 'code': 'KOMY', }, 'quantity': decimal.Decimal('2'), }] }) request = responses.calls[0].request assert netvisor_id == 8 assert xmltodict.parse(request.body) == xmltodict.parse( get_request_content('SalesInvoiceMinimal.xml'))
def test_create_dimension(self, netvisor, responses): responses.add( method='POST', url='http://koulutus.netvisor.fi/DimensionItem.nv?method=add', body=get_response_content('DimensionCreate.xml'), content_type='text/html; charset=utf-8', match_querystring=True) netvisor.dimensions.create({ "name": "Example Dimension", "item": "Example Dimension Item Sub-Item 1", "father_id": "0", "father_item": "Example Dimension Item 2", "is_hidden": False }) request = responses.calls[0].request assert xmltodict.parse(request.body) == xmltodict.parse( get_request_content('Dimension.xml'))
def test_get_with_minimal_product(self, netvisor, responses): responses.add(method='GET', url='http://koulutus.netvisor.fi/GetProduct.nv?id=165', body=get_response_content('GetProductMinimal.xml'), content_type='text/html; charset=utf-8', match_querystring=True) product = netvisor.products.get(165) assert product == { 'product_base_information': { 'netvisor_key': 165, 'product_code': None, 'product_group': None, 'name': u'Code Complete', 'description': None, 'unit_price': { 'amount': decimal.Decimal('0.0000'), 'type': 'brutto' }, 'unit': None, 'unit_weight': None, 'purchase_price': None, 'tariff_heading': None, 'comission_percentage': None, 'is_active': False, 'is_sales_product': None, }, 'product_book_keeping_details': { 'default_vat_percent': decimal.Decimal('0'), 'default_domestic_account_number': u'3000', 'default_eu_account_number': u'3360', 'default_outside_eu_account_number': u'3380', }, 'product_inventory_details': { 'inventory_amount': decimal.Decimal('0.00'), 'inventory_mid_price': decimal.Decimal('0.0000'), 'inventory_value': decimal.Decimal('0.00'), 'inventory_reserved_amount': decimal.Decimal('0.00'), 'inventory_ordered_amount': decimal.Decimal('0.00'), } }
def test_get_minimal(self, netvisor, responses): responses.add( method='GET', url= 'http://koulutus.netvisor.fi/GetPurchaseInvoice.nv?NetvisorKey=1025&Version=2', body=get_response_content('GetPurchaseInvoiceMinimal.xml'), content_type='text/html; charset=utf-8', match_querystring=True) purchase_invoice = netvisor.purchase_invoices.get(1025) assert purchase_invoice == { "netvisor_key": 1025, "number": 152212, "date": date(2018, 1, 2), "delivery_date": date(2014, 10, 2), "due_date": date(2018, 1, 31), "value_date": date(2018, 1, 15), "reference_number": "011234", "vendor_bank_account_number": "FI000111234567", "amount": Decimal('100.00'), "paid_amount": Decimal('0.00'), "foreign_currency_amount": Decimal('100'), "foreign_currency_name_id": "EUR", "status": "Avoin", "approval_status": "open", "our_reference": "111234", "your_reference": "21134", "description": "Comment text", "vendor_name": "Vendor Oy Ab", "vendor_addressline": "Pajukuja 5", "vendor_postnumber": "53100", "vendor_town": "Lappeenranta", "vendor_country": "FI", "voucher_id": None, "accounted": False, "preview_image": None, "lines": None, "orders": None, }
def test_create_minimal_product(self, netvisor, responses): responses.add(method='POST', url='http://koulutus.netvisor.fi/Product.nv?method=add', body=get_response_content('ProductCreate.xml'), content_type='text/html; charset=utf-8', match_querystring=True) netvisor_id = netvisor.products.create({ 'product_base_information': { 'product_group': u'Kirjat', 'name': u'Code Complete', 'unit_price': { 'amount': decimal.Decimal('42.5'), 'type': u'gross' }, 'is_active': True, 'is_sales_product': False, } }) request = responses.calls[0].request assert netvisor_id == 8 assert request.body == get_request_content('ProductMinimal.xml')
def test_create_voucher(self, netvisor, responses): responses.add(method='POST', url='http://koulutus.netvisor.fi/Accounting.nv', body=get_response_content('AccountingCreateVoucher.xml'), content_type='text/html; charset=utf-8', match_querystring=True) netvisor_id = netvisor.accounting.create({ "mode": "net", "date": date(2018, 6, 11), "description": "Test Company Oy, invoice 1", "class": "Myyntilasku", "voucher_line": [{ "line_sum": { "sum": Decimal("-10000.00"), "type": "net" }, "description": u"Test Company Oy, invoice 1", "account_number": 3000, "vat_percent": dict(percentage=Decimal("24"), code="KOMY"), "account_dimension": { "dimension": "Test account", "type": "name" }, "dimension": { "name": "Projects", "item": "Project X" } }, { "line_sum": { "sum": Decimal("-5000"), "type": "net" }, "description": u"Test Company Oy, invoice 1", "account_number": 2939, "vat_percent": dict(percentage=Decimal(0), code=u"NONE"), }, { "line_sum": { "sum": Decimal("20000"), "type": "net" }, "description": u"Test Company Oy, invoice 1", "account_number": 1701, "vat_percent": dict(percentage=Decimal(0), code=u"NONE"), }], "attachments": [{ "mime_type": "application/pdf", "description": "Test attachment", "filename": "attachment.pdf", "data": "JVBERi0xLjQNJeLjz9MNCjYgMCB" }], }) request = responses.calls[0].request assert netvisor_id == 8 assert xmltodict.parse(request.body) == xmltodict.parse( get_request_content('Voucher.xml'))
def test_list(self, netvisor, responses): responses.add(method='GET', url='http://koulutus.netvisor.fi/AccountingLedger.nv', body=get_response_content('AccountingList.xml'), content_type='text/html; charset=utf-8', match_querystring=True) accounting = netvisor.accounting.list() assert accounting == [{ 'status': 'valid', 'key': 12, 'date': date(2000, 1, 1), 'number': 13, 'description': 'Invoice 14', 'class': 'PI Purchase Invoice', 'linked_source': { 'type': 'purchaseinvoice', 'key': 15 }, 'uri': 'https:/netvisor.com/voucher/16', 'lines': [{ 'key': 121, 'line_sum': Decimal('-17.18'), 'description': 'Invoice 19', 'account_number': 100, 'vat_percent': 20, 'vat_code': '-', 'dimensions': [] }, { 'key': 122, 'line_sum': Decimal('-21.22'), 'description': 'Invoice 23', 'account_number': 200, 'vat_percent': 24, 'vat_code': 'KOMY', 'dimensions': [] }] }, { 'status': 'invalidated', 'key': 25, 'date': date(2000, 1, 2), 'number': 26, 'description': 'Invoice 27', 'class': 'SA Sales Invoice', 'linked_source': { 'type': 'salesinvoice', 'key': 28 }, 'uri': 'https:/netvisor.com/voucher/29', 'lines': [{ 'key': 251, 'line_sum': Decimal('-30.31'), 'description': 'Invoice 32', 'account_number': 300, 'vat_percent': 33, 'vat_code': '-', 'dimensions': [{ 'name': 'Sales', 'item': 'Mike' }, { 'name': 'Purchase', 'item': 'Matt' }] }] }, { 'key': 36, 'date': date(2000, 1, 3), 'number': 37, 'description': 'Invoice 38', 'class': 'Placeholder', 'linked_source': { 'type': 'salesinvoice', 'key': 38 }, 'uri': 'https:/netvisor.com/voucher/39', 'lines': [] }]
def test_list(self, netvisor, responses): responses.add(method='GET', url='http://koulutus.netvisor.fi/PurchaseInvoiceList.nv', body=get_response_content('PurchaseInvoiceList.xml'), content_type='text/html; charset=utf-8', match_querystring=True) purchase_invoice_list = netvisor.purchase_invoices.list() from pprint import pprint pprint(purchase_invoice_list) assert purchase_invoice_list == [{ "netvisor_key": 1, "number": 123, "date": date(2017, 11, 16), "vendor": "Simon Supplier", "vendor_organization_identifier": "1234567-8", "sum": Decimal("25"), "payments": Decimal("25"), "open_sum": Decimal("0"), "uri": "http://*****.*****.**/getpurchaseinvoice.nv?netvisorkey=*" }, { "netvisor_key": 2, "number": 234, "date": date(2017, 11, 23), "vendor": "Simon Supplier", "vendor_organization_identifier": "1234567-8", "sum": Decimal("30"), "payments": Decimal("0"), "open_sum": Decimal("30"), "uri": "http://*****.*****.**/getpurchaseinvoice.nv?netvisorkey=*" }, { "netvisor_key": 3, "number": 345, "date": date(2017, 11, 16), "vendor": "Sara Supplier", "vendor_organization_identifier": None, "sum": Decimal("30"), "payments": Decimal("0"), "open_sum": Decimal("30"), "uri": "http://*****.*****.**/getpurchaseinvoice.nv?netvisorkey=*" }]
def test_update(self, netvisor, responses): responses.add( method='POST', url='http://koulutus.netvisor.fi/Customer.nv?method=edit&id=8', body=get_response_content('CustomerEdit.xml'), content_type='text/html; charset=utf-8', match_querystring=True) data = { 'customer_base_information': { 'internal_identifier': u'MM', 'external_identifier': u'1967543-8', 'name': u'Matti Meikäläinen', 'name_extension': u'Toimitusjohtaja', 'street_address': u'c/o Yritys Oy', 'additional_address_line': u'Pajukuja 1', 'city': u'Lappeenranta', 'post_number': u'53100', 'country': u'FI', 'customer_group_name': u'Alennusasiakkaat', 'phone_number': u'040 123456', 'fax_number': u'05 123456', 'email': u'*****@*****.**', 'email_invoicing_address': u'*****@*****.**', 'home_page_uri': u'www.firma.fi', 'is_active': True, }, 'customer_finvoice_details': { 'finvoice_address': u'FI109700021497', 'finvoice_router_code': 'NDEAFIHH' }, 'customer_delivery_details': { 'delivery_name': u'Maija Mehiläinen', 'delivery_street_address': u'Pajukuja 2', 'delivery_city': u'Lappeenranta', 'delivery_post_number': u'53900', 'delivery_country': u'FI', }, 'customer_contact_details': { 'contact_person': u'Matti Meikäläinen', 'contact_person_email': u'*****@*****.**', 'contact_person_phone': u'040 987 254', }, 'customer_additional_information': { 'comment': u'Kommentti', 'customer_reference_number': u'1070', 'invoicing_language': u'FI', 'invoice_print_channel_format': u'1', 'your_default_reference': 'Default reference', 'default_text_before_invoice_lines': 'Default text before invoice lines', 'default_text_after_invoice_lines': 'Default text after invoice lines', } } assert netvisor.customers.update(id=8, data=data) is None request = responses.calls[0].request assert request.body == get_request_content('Customer.xml')
def test_update(self, netvisor, responses): responses.add( method='POST', url='http://koulutus.netvisor.fi/salesinvoice.nv?method=edit&id=8', body=get_response_content('SalesInvoiceEdit.xml'), content_type='text/html; charset=utf-8', match_querystring=True) data = { 'number': '107', 'date': date(2008, 12, 12), 'value_date': date(2008, 11, 30), 'delivery_date': date(2008, 7, 25), 'reference_number': '1070', 'amount': decimal.Decimal('244.00'), 'currency': 'EUR', 'seller_identifier': 32, 'status': 'unsent', 'invoicing_customer_identifier': u'1', 'invoicing_customer_name': u'Matti Mallikas', 'invoicing_customer_name_extension': u'Masa', 'invoicing_customer_address_line': u'Pajukuja 1', 'invoicing_customer_additional_address_line': None, 'invoicing_customer_post_number': u'53100', 'invoicing_customer_town': u'Lappeenranta', 'invoicing_customer_country_code': u'FI', 'delivery_address_name': u'Netvisor Oy', 'delivery_address_name_extension': u'Ohjelmistokehitys ja tuotanto', 'delivery_address_line': u'Snelmanninkatu 12', 'delivery_address_post_number': u'53100', 'delivery_address_town': u'LPR', 'delivery_address_country_code': u'FI', 'payment_term_net_days': 14, 'payment_term_cash_discount_days': 5, 'payment_term_cash_discount': decimal.Decimal('9'), 'invoice_lines': [{ 'identifier': dict(identifier="1697", type="netvisor"), 'name': 'Omena', 'unit_price': { 'amount': decimal.Decimal('6.90'), 'type': 'net' }, 'vat_percentage': { 'percentage': decimal.Decimal('22'), 'code': 'KOMY', }, 'quantity': decimal.Decimal('2'), 'discount_percentage': decimal.Decimal('0'), 'free_text': 'Punainen', 'accounting_account_suggestion': '3000' }, { 'identifier': dict(identifier="1697", type="netvisor"), 'name': 'Banaani', 'unit_price': { 'amount': decimal.Decimal('100.00'), 'type': 'net' }, 'vat_percentage': { 'percentage': decimal.Decimal('22'), 'code': 'KOMY', }, 'quantity': decimal.Decimal('1'), 'free_text': 'Keltainen', 'accounting_account_suggestion': '3200' }], 'attachments': [{ 'mime_type': "application/pdf", 'description': 'This is a file', 'filename': 'invoice-attachment.pdf', 'data': 'SSdtIG5vdCBtYWRlIGJ5IGRlc2lnbg==', 'type': 'pdf', }] } assert netvisor.sales_invoices.update(id=8, data=data) is None request = responses.calls[0].request assert request.body == get_request_content('SalesInvoice.xml')
def test_get(self, netvisor, responses): responses.add( method='GET', url='http://koulutus.netvisor.fi/GetSalesInvoice.nv?NetvisorKey=5', body=get_response_content('GetSalesInvoice.xml'), content_type='text/html; charset=utf-8', match_querystring=True) sales_invoice = netvisor.sales_invoices.get(5) assert sales_invoice == { 'number': 3, 'date': date(2012, 1, 27), 'delivery_date': date(2012, 1, 27), 'due_date': date(2012, 2, 11), 'reference_number': u'1070', 'amount': decimal.Decimal(244.00), 'seller_identifier': u'Jarmo', 'invoice_status': u'Unsent', 'free_text_before_lines': None, 'free_text_after_lines': None, 'our_reference': None, 'your_reference': None, 'private_comment': None, 'invoicing_customer_name': u'Matti Mallikas', 'invoicing_customer_address_line': u'Pajukuja 1', 'invoicing_customer_post_number': u'53100', 'invoicing_customer_town': u'Lappeenranta', 'invoicing_customer_country_code': u'FINLAND', 'match_partial_payments_by_default': False, 'delivery_address_name': u'Netvisor Oy', 'delivery_address_line': u'Snelmanninkatu 12', 'delivery_address_post_number': u'53100', 'delivery_address_town': u'LPR', 'delivery_address_country_code': u'FINLAND', 'delivery_method': None, 'delivery_term': None, 'payment_term_net_days': 14, 'payment_term_cash_discount_days': 5, 'payment_term_cash_discount': decimal.Decimal('9'), 'invoice_lines': [{ 'identifier': u'OMENA', 'name': u'Omena', 'unit_price': decimal.Decimal('6.9000'), 'vat_percentage': { 'percentage': decimal.Decimal('22'), 'code': u'KOMY', }, 'quantity': decimal.Decimal('2'), 'discount_percentage': decimal.Decimal('0'), 'free_text': None, 'vat_sum': decimal.Decimal('3.04'), 'sum': decimal.Decimal('16.84'), 'accounting_account_suggestion': u'551', }, { 'identifier': u'BANAANI', 'name': u'Banaani', 'unit_price': decimal.Decimal('2.4900'), 'vat_percentage': { 'percentage': decimal.Decimal('22'), 'code': u'KOMY', }, 'quantity': decimal.Decimal('1'), 'discount_percentage': decimal.Decimal('0'), 'free_text': None, 'vat_sum': decimal.Decimal('0.5478'), 'sum': decimal.Decimal('3.0378'), 'accounting_account_suggestion': u'551' }] }
def test_get(self, netvisor, responses): responses.add( method='GET', url= 'http://koulutus.netvisor.fi/GetPurchaseInvoice.nv?NetvisorKey=1025&Version=2', body=get_response_content('GetPurchaseInvoice.xml'), content_type='text/html; charset=utf-8', match_querystring=True) purchase_invoice = netvisor.purchase_invoices.get(1025) assert purchase_invoice == { "netvisor_key": 1025, "number": 152212, "date": date(2018, 1, 2), "delivery_date": date(2014, 10, 2), "due_date": date(2018, 1, 31), "value_date": date(2018, 1, 15), "reference_number": "011234", "vendor_bank_account_number": "FI000111234567", "amount": Decimal('100.00'), "paid_amount": Decimal('0.00'), "foreign_currency_amount": Decimal('100'), "foreign_currency_name_id": "EUR", "status": "Avoin", "approval_status": "open", "our_reference": "111234", "your_reference": "21134", "description": "Comment text", "vendor_name": "Vendor Oy Ab", "vendor_addressline": "Pajukuja 5", "vendor_postnumber": "53100", "vendor_town": "Lappeenranta", "vendor_country": "FI", 'vendor_bank_account_number': 'FI000111234567', "voucher_id": 1, "accounted": False, "preview_image": "Text", "lines": { "items": [{ "netvisor_key": 1051, "line_sum": Decimal('125.25'), "line_net_sum": Decimal('102.6639'), "unit_price": Decimal('5.480000000000'), "vat_percent": Decimal('22'), "vat_code": "KOOS", "description": "Description text", "unit": "kpl", "ordered_amount": Decimal('15'), "delivered_amount": Decimal('10'), "product_code": "15243", "discount_percentage": Decimal('1.5'), "product_name": "Test Product", "purchase_price": Decimal('24.00'), "bookkeeping_account_netvisor_key": "643", "bookkeeping_account": "4000 Ostot" }, { "netvisor_key": 1052, "line_sum": Decimal('125.25'), "line_net_sum": Decimal('102.6639'), "unit_price": Decimal('5.480000000000'), "vat_percent": Decimal('22'), "vat_code": "KOOS", "description": "Description text", "unit": "kpl", "ordered_amount": Decimal('15'), "delivered_amount": Decimal('10'), "product_code": "15243", "discount_percentage": Decimal('1.5'), "product_name": "Test Product", "purchase_price": Decimal('24.00'), "bookkeeping_account_netvisor_key": "643", "bookkeeping_account": "4000 Ostot" }], "dimensions": [{ "name": "Projects", "netvisor_key": 3, "detail_name": "Project 1", "detail_netvisor_key": 3 }, { "name": "Projects", "netvisor_key": 4, "detail_name": "Project 2", "detail_netvisor_key": 4 }] }, "orders": [{ "netvisor_key": 123, "number": 1, }, { "netvisor_key": 456, "number": 2 }] }
def test_get(self, netvisor, responses): responses.add( method='GET', url=('http://koulutus.netvisor.fi/GetCompanyInformation.nv?' 'OrganizationIdentifier=1234567-8'), body=get_response_content('GetCompanyInformation.xml'), content_type='text/html; charset=utf-8', match_querystring=True) company = netvisor.companies.get('1234567-8') assert company == { 'name': u'General Motors Finland', 'finnish_organization_identifier': u'1234567-8', 'type': u'Osakeyhtiö', 'responsible_person_authorization_rule': (u'Yhteisösääntöjen mukaan toiminimen kirjoittavat hallituksen ' u'puheenjohtaja, toimitusjohtaja ja toimitusjohtajan sijainen ' u'kukin yksin.'), 'established_date': date(2009, 12, 31), 'terminated_date': date(2009, 12, 31), 'most_recent_change_date': date(2009, 12, 31), 'current_activity_status': u'active', 'current_special_status': None, 'domicile': u'Helsinki', 'activity_description': u'Kebab', 'street_address': { 'street': u'Esimerkkikatu 123', 'postal_code': u'00100', 'postal_office': u'Helsinki', }, 'postal_address': { 'street': None, 'postal_code': u'00002', 'postal_office': u'Helsinki', }, 'email': u'*****@*****.**', 'phone': u'020 1234567', 'fax': u'(09) 5551234', 'registered_person_roles': [{ 'type': u'Yhtiön muu johto', 'identifier': u'Toimitusjohtaja', 'established_date': date(2009, 12, 31), 'name': u'Gunnar Peterson', 'nationality': u'FI', }], 'registered_names': [{ 'type': u'Päätoiminimi', 'name': u'Pekan yritys Oy', 'current_activity_status': u'active', 'established_date': date(2009, 12, 31), 'terminated_date': date(2009, 12, 31), }], 'stat_employer_register_status': u'never_registered', 'stat_revenue_size': u'100-200', 'stat_staff_size': u'4-9', 'stat_vat_register_status': u'currently_registered', 'stat_standard_industrial_classification2008': u'Kaivostoiminta', 'stat_tax_prepayment_register_status': u'previously_registered', }