|
@@ -0,0 +1,25 @@
|
|
|
+'''Created on 4 Jun 2024 @author: vnc-console'''
|
|
|
+
|
|
|
+from anafapi.anafapi import anafAPI
|
|
|
+
|
|
|
+class Partner(object):
|
|
|
+ '''classdocs'''
|
|
|
+ api = anafAPI()
|
|
|
+
|
|
|
+ def __init__(self, vat_code):
|
|
|
+ '''Constructor'''
|
|
|
+ self.vat_code = vat_code
|
|
|
+ self.fiscal_code = self.vat_code.replace('RO', '')
|
|
|
+ _, self.part = self.api.get_vat(self.fiscal_code)
|
|
|
+ self.name = self.part['denumire']
|
|
|
+
|
|
|
+ # def get_data(self):
|
|
|
+ # _, part = self.api.get_vat(self.fiscal_code)
|
|
|
+ # self.name = part['denumire']
|
|
|
+ # return self.api.get_vat(self.fiscal_code)
|
|
|
+
|
|
|
+
|
|
|
+if __name__ == '__main__':
|
|
|
+ partner = Partner('11358358')
|
|
|
+ # print(partner.get_data())
|
|
|
+ print(partner.part)
|