Ejemplo n.º 1
0
 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)
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
 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
Ejemplo n.º 4
0
 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
Ejemplo n.º 5
0
    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
Ejemplo n.º 6
0
    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