コード例 #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)
コード例 #2
0
ファイル: common.py プロジェクト: LetsUnlockiPhone/Servo
 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)
コード例 #3
0
ファイル: common.py プロジェクト: LetsUnlockiPhone/Servo
 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
コード例 #4
0
ファイル: common.py プロジェクト: ipwnosx/Servo
 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
コード例 #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
コード例 #6
0
ファイル: common.py プロジェクト: LetsUnlockiPhone/Servo
    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