code: def get_my_credits(self, access_token=None, user_id=None):
          
          if access_token:
              self.req.credential.set_token(access_token)
          if user_id:
              self.req.credential.set_user_id(user_id)
          if not self.check_credentials():
              raise CredentialsError('credentials invalid')
          else:
              user_data_url = '/users/' + self.req.credential.get_user_id()
              user_data = self.req.get(user_data_url)
              if "credit" in user_data:
                  if "promotionalCodesUsed" in user_data["credit"]:
                      del user_data["credit"]["promotionalCodesUsed"]
                  if "lastRefill" in user_data["credit"]:
                      del user_data["credit"]["lastRefill"]
                  return user_data["credit"]
              return {}
docs: Get the credits by user to use in the QX Platform