def test(self): """ Tests that the account details are correct """ gsxws.connect(sold_to=self.sold_to, user_id=self.user_id, environment=self.environment)
def fallback(cls): """ Connect to fallback GSX account """ act = cls.get_default_account() gsxws.connect(user_id=act.user_id, sold_to=act.sold_to, timezone=act.timezone, environment=act.environment,) return act
def connect(self, user, location=None): """ Connects to this GSX Account """ if user.gsx_userid: self.user_id = user.gsx_userid if location is None: timezone = user.location.gsx_tz else: timezone = location.gsx_tz gsxws.connect(user_id=self.user_id, sold_to=self.sold_to, environment=self.environment, timezone=timezone) return self