def setUp(self): self.session_manager = Oauth1SessionManager( sandbox=True, consumer_key=os.environ.get('CONSUMER_KEY'), consumer_secret=os.environ.get('CONSUMER_SECRET'), access_token=os.environ.get('ACCESS_TOKEN'), access_token_secret=os.environ.get('ACCESS_TOKEN_SECRET'), ) self.qb_client = QuickBooks(session_manager=self.session_manager, sandbox=True, company_id=os.environ.get('COMPANY_ID')) self.account_number = datetime.now().strftime('%d%H%M') self.name = "Test Item {0}".format(self.account_number) self.income_account = Account.where( "AccountType = 'Income' and AccountSubType = 'SalesOfProductIncome'", max_results=1, qb=self.qb_client)[0] self.expense_account = Account.where( "AccountSubType = 'SuppliesMaterialsCogs'", max_results=1, qb=self.qb_client)[0] self.asset_account = Account.where("AccountSubType = 'Inventory'", max_results=1, qb=self.qb_client)[0]
def setUp(self): self.session_manager = Oauth1SessionManager( sandbox=True, consumer_key=os.environ.get('CONSUMER_KEY'), consumer_secret=os.environ.get('CONSUMER_SECRET'), access_token=os.environ.get('ACCESS_TOKEN'), access_token_secret=os.environ.get('ACCESS_TOKEN_SECRET'), ) self.qb_client = QuickBooks(session_manager=self.session_manager, sandbox=True, company_id=os.environ.get('COMPANY_ID'))
def setUp(self): self.session_manager = Oauth1SessionManager( sandbox=True, consumer_key=os.environ.get('CONSUMER_KEY'), consumer_secret=os.environ.get('CONSUMER_SECRET'), access_token=os.environ.get('ACCESS_TOKEN'), access_token_secret=os.environ.get('ACCESS_TOKEN_SECRET'), ) self.qb_client = QuickBooks(session_manager=self.session_manager, sandbox=True, company_id=os.environ.get('COMPANY_ID')) self.name = "TaxCode {0}".format(datetime.now().strftime('%d%H%M'))
def setUp(self): self.session_manager = Oauth2SessionManager( sandbox=True, client_id=os.environ.get('CLIENT_ID'), client_secret=os.environ.get('CLIENT_SECRET'), access_token=os.environ.get('AUTH2_ACCESS_TOKEN'), ) self.qb_client = QuickBooks( session_manager=self.session_manager, sandbox=True, company_id=os.environ.get('COMPANY_ID2') ) self.account_number = datetime.now().strftime('%d%H%M') self.name = "Test Account {0}".format(self.account_number)
def setUp(self): super(QuickbooksTestCase, self).setUp() self.auth_client = AuthClient( client_id=os.environ.get('CLIENT_ID'), client_secret=os.environ.get('CLIENT_SECRET'), environment=Environments.SANDBOX, redirect_uri='http://localhost:8000/callback', ) self.qb_client = QuickBooks( auth_client=self.auth_client, refresh_token=os.environ.get('REFRESH_TOKEN'), company_id=os.environ.get('COMPANY_ID'), ) self.qb_client.sandbox = True
import os from intuitquickbooks.client import QuickBooks QuickBooks(sandbox=True, consumer_key=os.environ.get('CONSUMER_KEY'), consumer_secret=os.environ.get('CONSUMER_SECRET'), access_token=os.environ.get('ACCESS_TOKEN'), access_token_secret=os.environ.get('ACCESS_TOKEN_SECRET'), company_id=os.environ.get('COMPANY_ID'))